Hello Nathan,
The problem here is that Test Studio internally calls the LaunchNewApplication() and ActiveApplication.Quit() methods automatically. If you really want to start the application with code instead of using the Configure window, you can use one of the following methods.
- Create a Unit test or convert your existing test to a Unit test using the "Convert All Steps To Code" feature. The disadvantages of this are that a unit test cannot be converted back to a Test Studio test and you have to do all the work using code.
- Create a mock application to feed to Test Studio. Then insert a coded step as the first step of the test. Use the following code which closes the mock application and launches the desired application.
To stop the application from closing:
- Select the last step from a Test Studio test and set the Pause Test Step Property to After. This will pause the test after that step leaving the app opened.
- If you are using a Unit test, simply don't use the ActiveApplication.Close() method at the end of the test.
Just out of curiosity, why do you need this? How does it help your test automation?
All the best,
Plamen
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now