如何在命令提示符下运行Selenium C#测试? [英] How to run selenium c# test in command prompt?

查看:103
本文介绍了如何在命令提示符下运行Selenium C#测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些c#测试,我想在命令提示符下运行此测试。

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

如何运行此测试?

请帮助我。

推荐答案

如果使用的是Visual Studio 2012,则将使用vstest.console .exe与Visual Studio相同,例如:

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

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

该文档位于此处

否则,如果使用Visual Studio 2010,您将在命令行上使用mstest:

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

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

文档位于此处

运行硒测试时也是如此,就从命令行运行而言,它们没有什么特别之处。

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

这篇关于如何在命令提示符下运行Selenium C#测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆