I have a [TestMethod] in a visual studio test project. If I build the project, I get a dll. I dont want to run the tests from the visual studio User Interface.
-
Is there any way to generate an exe of a test project so that i can run the tests from command prompt?
-
If I change the project type from Class Library to Console Application, then it requires a Main function. Is there any way to call a TestMethod from the Main()
You should already have an EXE that can execute your tests – mstest.exe. If you need to run your tests outside Visual Studio – and you’re not using some kind of build automation solution that can already do this for you – then you can call mstest.exe and have it execute your tests.
http://msdn.microsoft.com/en-us/library/ms182489(VS.100).aspx