Forum Discussion
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?
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_McCrae10 years agoCommunity 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 ....