Forum Discussion

EnservePete's avatar
EnservePete
Occasional Contributor
9 years ago

Running TC crashes software in test.

I'm having an issue where when running test complete clicking on a certain button in the application I'm testing the software will crash when using test complete.

 

However when running the test manually the test works fine the software doesn't crash. I've tried remapping the particular button in question. However this hasn't worked.

 

I've also tried running as a process in visual studio to see if I can capture the error but it doesn't recognise the breakpoint imges.

 

Has anyone else ever encountered this issue before?

 

Or have any other suggestions?

6 Replies

  • I guess this is kind of separate to the other thread ....

     

    The only thing that comes to mind is exactly how you get to the point in the test run where the crash happens.

     

    aka - how are you interacting with the controls to get this far?

     

    To keep it short - always avoid using native methods outwith those which will happen through normal user interaction.

     

    eg:

     

    click - is fine. As this is the method that gets invoked when a user uses the mouse to click on something.

    setText (on a textbox) - is not fine. This directly populates a value to the field and is not what the user would do. I always use Keys over setText as it's what the user does. They key in the value, one letter at a time. You could argue that setText mimics copy + paste into a field. Which maybe it does. Sort of. Copy and paste still involves clicks and/or key presses when a user does it. But when you use setText, it directly populates the value to the field. No clicks or keys required. So it's not equivalent to what a user is able to do. You will also miss any trigger events which may be present. Such as validation on keypress (often used if a field does not allow numeric characters etc etc).

     

    So, what I'm wondering, is if you've used a method of a control somewhere in the test flow leading to the crash point that has left the software in an invalid state, thus prompting the crash.

     

    So, have you used any methods other than clicks (of various types - left, right, double etc) or keys to get where you've got to?

    • EnservePete's avatar
      EnservePete
      Occasional Contributor

      Hi Colin,

       

      I've not done anything to my knowledge a user wouldn't do. I fire up the software in test I then start to navigate through the menus simply clicking the buttons on the screen. Then boom. It crashes.

       

      I've been working on it this afternoon and I've noticed now that when I fire up the software manually first. Then set the TC tests off running then I don't recieve any crashes. However if I invoke the software in test with test complete this is where I start getting the problems. I've used TC for 2 months now and this is the first time I've seen it react/behave in this way.

       

      So what I've done for now as a work around is to remove each test I create from firing up the software in test and closing it at the end of the test. This now appears to resolve the issue in terms of getting the tests to run. It doesn't solve the problem of what and why it's started to happen now.

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        That is odd. Not something thats ever happened to me.

         

        How do you start the software using TC?

         

        I start my .NET/Delphi app via script using an ActiveXObject shell object and "run" and it's fine ....

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi Pete,

     

    Sorry you are having trouble. Could you please collect the crash logs to help our engineers troubleshoot it? Here's how:

     

    • Run the Report Generator (<TestComplete>\Bin\ReportGenerator.exe).
    • Select Launch/attach to TestComplete.
    • Run another instance of the Report Generator.
    • In that second instance, select Track application launch, specify your application file name without extension (e.g. winword), and click Next.
    • Run your test and reproduce the crash/error.
    • Click Generate in each Report Generator instance and save the logs.

     

    Once you have the logs, please open a support ticket and attach the logs:

    http://support.smartbear.com/message/?prod=TestComplete

     

    Our support engineers will review them and get back to you.

    • EnservePete's avatar
      EnservePete
      Occasional Contributor

      Hi Helen,

       

      I've done all that gone to upload my files and all it does is open a new support ticket so dont know if it's gone through or not either way theres no files attached is there any other way I can send you the files?

      • HKosova's avatar
        HKosova
        SmartBear Alumni (Retired)

        Hi Pete,

         

        When you opened a support case, you should have received a confirmation email with the case number - this means your submission went through. There's also a link in that email to upload additional files - you can use it to upload your logs again to be sure.