Paul Mendoza
Paul Mendoza

Reputation: 5787

How can I run Microsoft Visual Studio Units Tests in an automated way using .NET code?

We have a build and deployment tool and as part of the tool before a deployment I want to validate that all of our unit tests run. I want to execute the Visual Studio unit tests using C# code if possible in some way. These tests were not built for nunit. Are there any good articles or ways of doing this that someone could recommend?

Upvotes: 2

Views: 678

Answers (2)

tarn
tarn

Reputation: 2182

If you just want to run your tests from the command line, there is MSTest.

You can also run your VS Unit Tests if your using Team Foundation Server (TFS) and its build agents. However this may not be possible or even desirable for you.

The TeamCity build server now also has built-in support for running MSTests.

Upvotes: 1

Jakob Gade
Jakob Gade

Reputation: 12427

Team Foundation Server (TFS) can run all your test projects as a part of the check-in and build process. Check out this other question, Running unit tests on Team Foundation Server (TFS) builds.

Upvotes: 3

Related Questions