Question

I have solution with a WPF application, its class libraries, WiX installer and numerous MSTest test projects.

When I build the solution the test runner (we are using Visual Studio 2012.3) correctly discovers all the tests and allows us to run them.

Now I have created a Coded UI test project with just 1 CUIT test in it. I have added the project to the solution; because it is a complete app test of the thing the solution builds this seems logically correct to me.

However the default behaviour is the new test projects CUIT test is being discovered by the test runner and so gets run when I run all tests. I do not want this I only want the other (unit) tests to be found and run this way.

Is there a way (test class attributes perhaps) to supress the DISCOVERY of the test by the test runner?

(Note this is a similar question to Testing an WPF app with CodedUI tests, should the coded ui test project share a solution or not? but asking the specific question that is;

If a solution contains some test how can I prevent those tests being discovered by the test runner?

Any solution should still allow the "undiscovered" test to be selected in a lab build for automation of MTM tests.

Was it helpful?

Solution

I simply unload the project until I want to run the tests.

Which projects are unloaded are saved in the .suo file, which can be excluded from source control if your lab build is being done automatically, or you can reload in manually if your lab building is created manually.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top