How to automatically run tests c#


For nunit there is a very usefull decision NUnit-Console

Using different parametres you can watch results in text or xml file.

For example

nunit-console /xml:console-test.xml nunit.tests.dll


For MSTEST there is same tool named mstest
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest" /testcontainer:"D:\TeamCity\buildAgent\work\8a4449e52545215c\web\MvcApplication2\MvcApplication2.Tests\bin\Release\MvcApplication2.Tests.dll" /test:AboutTest 

You can choose wich of tests to run by using param /test

No comments:

Post a Comment