简体   繁体   中英

How to run selenium c# test in command prompt?

I have some c# tests, and I want run this tests from command prompt.

How can I run this tests ?

Please help me.

If you are using Visual Studio 2012, then you will use vstest.console.exe to be the same as 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 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 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.

getting this Error on running with vstest command. Please........ guide what is wrong I am using 2017VS this Error:

No test is available in C:\\PA_Trunk\\PA.UI.Tests\\bin\\Debug\\PA.UI.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Additionally, path to test adapters can be specified using /TestAdapterPath command. Example /TestAdapterPath:.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM