Jenkins VSTest Runner未按预期工作

ttvkxqim  于 2023-04-20  发布在  Jenkins
关注(0)|答案(1)|浏览(137)

有问题让VSTest插件在Jenkins中工作.所以首先这个命令行版本的作品现场,所以我知道路径等是正确的-

"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" C:\Pelican\Debug\net6.0\Test.dll /TestCaseFilter:"SidebarMobile" /Logger:trx

所以回到Jenkins Dashboard〉Manage Jenkins〉Tools we have x1c 0d1x
在工作本身

因此,当我运行作业时,即使路径是正确的,我也会在控制台输出中看到这一点

Path To VSTest.console.exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\
no files matching the pattern C:\Pelican\Debug\net6.0\Test.dll
Executing VSTest: cmd.exe /C C:\Users\jenkins\AppData\Local\Temp\vstest7467014175321632084.bat && exit %ERRORLEVEL%
[Pi Mobile Tests] $ cmd.exe /C C:\Users\jenkins\AppData\Local\Temp\vstest7467014175321632084.bat && exit %ERRORLEVEL%

C:\Users\jenkins\AppData\Local\Jenkins\.jenkins\workspace\Pi Mobile Tests>C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\ /Tests:Sidebar /TestCaseFilter:"SidebarMobile" /UseVsixExtensions:false /Logger:trx 
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

所以回到Jenkins Dashboard〉管理Jenkins〉我们现在拥有的工具

C:\PROGRA~1\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\

我现在明白了

Path To VSTest.console.exe: C:\PROGRA~1\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\
no files matching the pattern C:\Pelican\Debug\net6.0\Test.dll
Executing VSTest: cmd.exe /C C:\Users\jenkins\AppData\Local\Temp\vstest17161354381707712024.bat && exit %ERRORLEVEL%
[Pi Mobile Tests] $ cmd.exe /C C:\Users\jenkins\AppData\Local\Temp\vstest17161354381707712024.bat && exit %ERRORLEVEL%

C:\Users\jenkins\AppData\Local\Jenkins\.jenkins\workspace\Pi Mobile Tests>C:\PROGRA~1\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\ /Tests:Sidebar /TestCaseFilter:"SidebarMobile" /UseVsixExtensions:false /Logger:trx 
'C:\PROGRA~1\Microsoft' is not recognized as an internal or external command,
operable program or batch file.

有什么解决方案吗

0h4hbjxa

0h4hbjxa1#

我现在使用“执行Windows批处理命令”,从那里工作正常

相关问题