Forum Discussion

dcfecker's avatar
dcfecker
Contributor
8 years ago
Solved

TestComplete crashed, and on return my scripts/Unit tests were all gone

Something causes TestComplete to crash, I'm not sure what. But when I re-opened it an error popped up about a corrupted log file. I click "OK" (only other option was "Help" which open the standard help documentation). And when I looked at my project scripts folder there was nothing in the Unit1 tests. 

 

I closed and re-opened TestComplete to confirm there was an error in loading. And still the same problem. I navigated to the project folder and dug into the scripts sub-folder and both the Unit1.js and Unit1.js.bak are completely empty. Does that mean I'm SOL?

  • Understandable... high pressure.

    Obviously, we cover the "duh" cases... are you certain that, when you run TestComplete and go to File -> Open you're selecting the project you were working with? I know that one of the first bits of confusion that some new users have is the whole difference between project, project suite, etc.  Making sure that you actually have the correct project file open is step one to potentially recovering your work.  It's easy enough to open the wrong project.  And since the default code unit created is "Unit1" it's entirely possible you might be looking at the wrong "Unit1" if it's under the wrong Project/Script folder.

    Helpful to have screenshots to see what you're doing to make sure there's no misunderstanding.

     

     

8 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Try right-clicking on the folder where the scripts belong and do Add->Existing Item.  You should still be able to find them in your directory there.

    • dcfecker's avatar
      dcfecker
      Contributor

       


      Marsha_R wrote:

      Try right-clicking on the folder where the scripts belong and do Add->Existing Item.  You should still be able to find them in your directory there.


      That's one of the first things I did after backing up the entire projects folder. But it was an empty file. I assume I have lost everything and I'm now spending time looking for other App/UI testing tools. Any suggestions are appreciated.

       

      Thanks,

       

      Dave

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        So... you put all your tests that you were working on in a single code unit file, basically the default code unit file of Unit1 that is created when you create your Automation project?  And it's enough code in that file that losing all of it is devastating enough of an event to warrant dumping the tool and looking for another one?

        That seems a bit drastic, especially if the tool is being utilized in a way that doesn't make sense from a code development perspective.  When writing application level code, you wouldn't write your entire application in a single code unit unless it's an extremely simplistic application. Additionally, there's the general rule "save and save often" when it comes to working with code.  Always save your code as frequently and as often as possible to make sure you don't lose something.

         

        Now, you mentioned something just now... you backed up your project folder... was that before or after the crash? If before, you should be able to grab your code from there.  If after... well... closed the barn door after the horses escaped as my grandfather used to say.

        That said... do you know what you were attempting upon TestComplete crashing? Again, I'm assuming since you were using the single unit of code (Unit1) that there probably wasn't a LOT of stuff in there. Is this something you can set up quick and reproduce?  What kind of application are you testing? What were you attempting to do against that application? What version of TestComplete?  There are reports and such of TC crashes occasionally happening for other folks... and patches that have been released to correct them.  So, if you can give information as to what was going on, it is something that could potentially already have a fix.