Reputation: 5022
In our big application written with C# we have automated tests.
Some of tests are integration tests; they are mostly testing integration points with other systems, they are slower than unit tests and to get them to succeed on a new machine some configuration is needed.
Some are unit tests; they are much faster, do not need any configuration.
In related test projects we have two folders in general: UnitTest and IntegrationTest. Hence I have not an option to run them seperately.
What I need is, clear seperation between unit and integration tests. I want to be able to run only integration tests or just unit tests.
How can I achive this seperation? What are your experiences on the subject?
Upvotes: 1
Views: 1662
Reputation: 646
You can also use the TestCategory attribute (just Category in NUnit). Then run the tests in that category.
something like TestCategory("Unit") or TestCategory("Integration")
Upvotes: 2
Reputation: 44295
In visual studio go to the Test menu > Windows > Test List editor. All test methods can be selected/deselected in this window. At the top left click the arrow and choose Run checked tests or debug checked tests.
Upvotes: 2