I’ve been using Katalon Automation Recorder for over a year now and have spent hundreds of hours learning how to use it and building up a large repository of scripts.
As I wanted to back it up today (as I hadn’t before) I selected the Export button. Next thing I knew the extension crashed on me and Chrome told me that the extension was corrupted and prompted me to repair it.
I clicked Repair and when it was done, the next thing I knew, ALL of my scripts are gone!
Can anyone please help me to get this back.
It is vital that I do, as I’ve invested so much time and energy into everything I’ve built up there and to lose it in an instant would be more than heart breaking.
If I can even at least know the filename Katalon Automation Recorder uses (and where it’s kept) to store the scripts created in it, then I could at least attempt to use a hard drive recovery tool to try and find this.
You never saved test cases/ test suites in files before? That’s very risky.
Like a year ago or so i dig into Katalon in dev tools (I’m almost 100% sure it was Katalon not some other tool) and i found tast cases stored there, but unfortunately i can’t find it now.
Maybe @devalex88 can help with it.
@Piotr Normally, it would’ve been the norm for me to back up, but can’t say 2020 had me thinking as clearly as I normally would’ve. I agree it was very risky and now it may have cost me severely.
I’ve been trying to dig into Katalon’s Chrome Extension folder but this doesn’t appear to store anything. Not sure if it’s stored in IndexedDB, an LDB file somewhere, etc.
Wish I hadn’t just clicked Repair in Chrome when the extension got corrupted, but in the past, when i’ve had other extensions corrupted, hitting Repair never caused any real harm.
If @devalex88 can help I would be extremely grateful.
I assume that Repair bttn just reinstall extension so that why it works well with other extensions as they never save any data.
Maybe instead of searching for specific file use notepad++ to search for some text that u have in your tests like url which is in every test case. Use search in files tab in search window.
Searching for a related text string would likely only work if the repaired extension hadn’t ‘deleted’ the previous installation in order to do the re-install, but in order for Katalon Automation Recorder to now come up empty, it must have indeed deleted them (well, at least it’s appear that how this works, but i’m sure @devalex88 can confirm).
So at least if I can find out the filename/location it stores it in, I can at least try to use hard drive recovery tools to find it.
I don’t know if either of these offer a straightforward text search…
Tread carefully - these are dangerous in the wrong hands.
Text search revealed some interesting stuff, including a log file which I presume was generated when executing test scripts (so FWIW, it at least recorded some of the selectors used… even if in no apparent order).
However, all this searching isn’t really proving fruitful, as I’m still not sure what the filename is used by the Chrome extension.
Let’s do a broader shoutout…
@ThanhTo @duyluong @Jass @huynguyen
Did some further digging into this. Appears that the scripts are stored within LDB files, but how to identify which one it is i’m still to figure out and how to get Katalon Automation Recorder then using those files again is also a different matter (e.g. if I recover the files and put it back into a relevant folder).
Keep in mind, those developer guys are 11-14 hours ahead of US time. You may see some response later tonight, US time, or tomorrow - all of which is “today” for them
Thanks @Russ_Thomas, that’s good to know!
Under the hood, Katalon Recorder automatically persists your data into extension storage. All of the data in the storage will be cleared once the extension is removed. As in your case, I guess the browser has to remove and install the extension again, and that causes your data to be lost.
Restore the old storage data is not a trivial task. So far, we haven’t found any way to achieve that. We are very sorry for that.
We highly recommend saving your tests to files, or setting up to automatically backup your data to TestOps, as described in the following document.
Thanks for the response @huynguyen.
I actually have now managed to (largely) resolve this issue myself. After some further digging, I was able to identify the filenames that Katalon was using to store the scripts in.
Here are some of the steps that I took to solve this:
- As I wanted to identify where the files might be stored (having never looked into where Chrome extensions actually store files before), I discovered that many store their data with Chrome’s Profile folder, often in Google’s own DB format (LDB), at times within IndexedDB and other times using other options
- I found in the case of Katalon, it had created two folders, one that stored the extension itself (and related code) and one for storing data, it stores it within the ‘Local Extension Setting’ subfolder of Chrome’s Profile folder (in its own folder)
- I discovered that the Katalon Chrome extension actually uses the following UID ‘ljdobmomdgdljniojadhoplhkpialdid’ and that the folder these files sit within are named using this UID
- Using the ‘repaired’ installation of Katalon’s Chrome extension, I then created a tiny script, just so that I could identify what filename it actually stores its data in within the above folder. From this, I then discovered that it stores it within a LDB file. It uses the numeric syntax of XXXXXX.ldb (e.g. 000101.ldb). Even though I didn’t have a way to properly open this file format, Atom Text Editor was still sufficient for me to be able to identify that the scripts were stored in this file.
- Based on this knowledge, I then used a HDD recovery tool and searched for the folder name used by Katalon (ljdobmomdgdljniojadhoplhkpialdid) and filtered the results to only show files in the LDB format. Thanks to this, I discovered a couple of LDB files sitting within this folder (files that had disappeared when Chrome ‘repaired’ the extension), which I recovered. None had timestamps from this week unfortunately, but they did have timestamps from the end of last week, so it wasn’t that significant a gap.
- I then copied these files into the relevant subfolder for the extension within the ‘Local Extension Settings’ (and got rid of the new LDB file created) and attempted to disable and re-enable the extension to see if it would now show up. Initially (and to my confusion at first), it only showed the test script I created earlier.
- I then quit and re-opened Chrome and re-opened the extension and bingo, my scripts were largely restored!
Fortunately, this means that i’ve now only lost hours of time that I put into using it this week and recovered the majority of what I had previously created. I also immediately took the opportunity to save my test suites out too. (So i’ve now finally been able to successfully save my test files!)
Side note: Also discovered that the XXXXXX.log file (e.g. 000102.log) that sits within the extensions settings subfolder also contained what is effectively an HTML version of the test scripts (in a structure that reminded me of Selenium IDE). This is far more human-readable, but requires ‘transformation’ and ‘clean up’ before it can be used as an actual HTML document.
Hopefully the above might help anyone else who finds themselves in a position similar to me!
Excellent detective work, Guy. And thanks for reporting back.
You should write a Tips & Tricks article and link to the post above.
Yes, it fit perfectly in Tips & Tricks - It’s not a basic thing, it’s not covered in documentation but it may bevery usefull for someone.
I can add from myself that I create simple powershell script for making backup of my tests files which keeps last 2 backups. So if anyone is interest in it;s look like this:
Rename-Item D:\backups\KatalonTestSNew.zip D:\backups\KatalonTestSOld.zip
Compress-Archive -Path D:\Tools\KatalonTests -DestinationPath D:\backups\KatalonTestSNew.zip
It’s run once a week through windows scheduler.
Edit: I will add this to Tips & Tricks aswell.