views:

104

answers:

1

I am executing a Test to Automatically start my Windows Application. To lauch the Windows Application; the Code used is "Application.Run(Client.MainForm.GetInstance())";. The Debug point comes out of this piece of Code only after i close the Windows Application.

I cannot run any other tests until then. If i try to do so; Visual Studio throws me an error "Cannot start more than one local run". IS there a way out of this problem?

+1  A: 

Unit-testing is not primarily meant to start / stop GUI's, but more to test blocks of code outside a GUI. However, if you intend to do so, you can add Client.MainForm.GetInstance().Close(); to the end of your test.

Additional info: you cannot start other unit tests while one test is still running. As your GUI test will not be completed until you terminate the GUI (e.g. your test is still running while your GUI is open), other tests cannot start.

Webleeuw