Contributions
Re: Setup and Tear down, as well as Try Catch questions.
Thank you for your suggestion for event handlers. Those are exactly what I was looking for. I do have a follow up question about try/catch errors. I basically want to shut down my application before I try to open it. So, what I planned on doing is in a try block, put in the function to shut down my application, and not really do much in catch. Doing it this way, even with that option unchecked, this behavior will make it look like all my tests fail, when it only failed expectedly when it could not find my open application. I just thought try catch blocks did not report a test had failed, unless you threw your own error in the catch block. Is there a better way to check processes or something to verify if my application is running before trying to close it? I just thought the try catch was a pretty easy way to do this, until it actually reported successful tests were failures.3.1KViews0likes3CommentsSetup and Tear down, as well as Try Catch questions.
Hello, I am fairly new to TestComplete, so please bear with me. I am using TestComplete to test a windows application. I am more used to the NUnit side of things. In NUnit, you can have setup and teardown functions that will run before any test as well as after any test, even if there is an failure in that test. Does TestComplete have this kind of functionality? If it does not, is there any easy work around to always be in a consistent state for each test? Also, I am trying a try catch block using JavaScript in TestComplete. Basically to try to close my app, and if it cannot, catch by writing to the log. My problem is, if inside the try look, there is an error, the test just stops. So, I am unsure why it just doesnt kick to the catch, and move on like nothing is wrong. Is this expected, and if so, what is the point of try catches in TestComplete. Thanks for all of your time.3.1KViews0likes8Comments