Jenkins 中使用VSTest.console 进行单元测试,使用Allure 输出测试报告

这里讲一下注意点

MSBuild

  MSBuild 中可以使用 ${WORKSPACE} 来获得当前路径,如下图。

  MSBuild Version 可以在  Global Tool Configuration 中进行配置。

VsTest.Console 插件中的Test Files 指定部分指定的Dll 不支持路径,只能实在当前工作目录下。

所以需要使用 XCopy 将要测试的DLL Copy 到当前目录下。

vstest.console.exe 默认生成的测试报告在 TestResults 目录下,所以Allure Report 配置的报告地址是  TestResults 。

原文地址:https://www.cnblogs.com/xixiuling/p/13475575.html