[英]Example of Windows Batch Command to run XUnit Tests in Jenkins?
I have just started with Jenkins and configuring Jenkins to run unit tests. 我刚刚开始使用Jenkins并配置Jenkins来运行单元测试。 I am suppose to run Xunit tests using windows batch command.
我想使用windows batch命令运行Xunit测试。 I wanted to know how to run the XUnit tests by executing a Windows batch command.
我想知道如何通过执行Windows批处理命令来运行XUnit测试。
There are various ways to get the package (Chocolatey etc), but I assume NuGet or Paket will work, and you can decide whether to put it in the repo or not. 有各种方法来获得包(Chocolatey等),但我认为NuGet或Paket可以工作,你可以决定是否将它放入回购中。
But the core thing is to get the xunit.runner.console
NuGet package and then use one of the xunit.runner.*.exe
files in the tools/
of that 但核心的东西是让
xunit.runner.console
NuGet包,然后使用一个xunit.runner.*.exe
中的文件tools/
那
This is a simple script but should get it done OK. 这是一个简单的脚本,但应该完成它。
@echo off
cd /d "pathToSolutionDir"
".\packages\xunit.runner.console.2.2.0\tools\xunit.console.exe" "pathToTestingDll"
echo XUnit exited with %errorlevel%
pause
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.