user2761409
user2761409

Reputation: 33

How to run Selenium C# tests on Command Prompt?

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

How can I run these tests?

Please help me.

Upvotes: 3

Views: 13309

Answers (1)

acarlon
acarlon

Reputation: 17274

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.

Upvotes: 2

Related Questions