Windowtester automatically exits the application after the test case is closed. How can I prevent windowtester from quitting the application, so that I can run multiple test cases on the same instance of the application without restarting the application. Because this will save me a lot of time.
2 Answers
If you want second opinion about this and not looking for E2E I recommend you to reconsider Test consistency preserving in your case. With new instances and cleared cache you maybe closer to real-life Use case and metrics.
As example if is used Selenium each time get you clean instance of the browser. Not that you can't modify it, but it's recommended that each test should stand alone, independent from any other test or side-effects.

- 6,880
- 3
- 29
- 47
-
but i am using windows tester for a desktop based application and not a web based application so i cannot use selenium in that case. – Mandar Nageshkar Sep 10 '14 at 08:49
-
I'm rather talking about the Concept of consistency-based approach in order to gain efficient testing results. The Selenium default behavior is given as just an example to illustrate my point. – ekostadinov Sep 10 '14 at 09:06
-
Okay, agreed to your point, and thats how the system has been working till now. But that is what has been creating the problem as for around 2000 test cases it takes 2 days to complete the test, out of which 50% is the time taken just to close and reopen the application. Hence the need to change the approach. – Mandar Nageshkar Sep 10 '14 at 09:53
You can run multiple tests per test case in the same instance of the application. There might be a way to also run multiple test cases in the same instance, e.g. when you run the tests with Maven Surefire and forkmode set to 'once', but I haven't tested it yet.
As ekostadinov mentioned this is definitely not recommended.

- 104
- 8