rovsen
rovsen

Reputation: 5022

integration test - unit test seperation and best practices with visual studio 2010 + tfs

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

Answers (2)

beezler
beezler

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

P.Brian.Mackey
P.Brian.Mackey

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

Related Questions