Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to run unit testing tests from command line?
    text
    copied!<p>I googled and found the below helpful references. Currently I want to run all from the command-line (for easy of execution &amp; quickness) in cases:</p> <ol> <li>A specific test (ie. a test written by a method marked [TestMethod()])</li> <li>All tests in a class</li> <li>All impacted tests of the current TFS pending change of mine.</li> <li>All tests</li> <li>All tests except the ones marked as category [TestCategory("some-category")]</li> </ol> <p>I'm not sure how can I write a correct command for my needs above.</p> <p>References:</p> <ol> <li>the MSTest.exe <a href="http://msdn.microsoft.com/en-us/library/ms182487.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms182487.aspx</a></li> <li>the MSTest.exe's detailed options <a href="http://msdn.microsoft.com/en-us/library/ms182489.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms182489.aspx</a></li> <li>obtaining the result <a href="http://msdn.microsoft.com/en-us/library/ms182488.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms182488.aspx</a></li> </ol> <h2>[Edit]</h2> <p>After a while, I found the below useful tips.</p> <ol> <li>run Visual Studio unit tests by using MSTest.exe, located at <code>%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe</code> in my case.</li> <li>using <code>/testcontainer:Path\To\Your\TestProjectAssembly.dll</code> to indicate where your tests are coded. You can specify multiple '/testcontainer' options if required.</li> <li>using <code>/test:TestFilter</code> to filter the tests to run. Note that this filter is applied to the full test method name (ie. FullNamespace.Classname.MethodName)</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload