3

I have some C# tests, and I want to run these tests from Command Prompt.

How can I run these tests?

Please help me.

1
  • With what framework? MSTest? NUnit? Is it being run as a console app? A web app? A WinForms app? A WPF app? Commented Sep 9, 2013 at 13:44

1 Answer 1

2

If you are using Visual Studio 2012, then you will use vstest.console.exe to run the tests like Visual Studio, for example:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe UnitTests.dll /logger:trx

The VSTest.Console.exe documentation is here.

Otherwise, you will use mstest on the command line if Visual Studio 2010:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest.exe

The MSTest.exe documentation is here.

The same applies when running Selenium tests; there is nothing special about them as far as running from the command line is concerned.

Sign up to request clarification or add additional context in comments.

1 Comment

I appreciate that note at the end about Selenium tests. I thought they were going to be far more difficult to set-up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.