尝试在詹金斯上运行mstest时出错

编程入门 行业动态 更新时间:2024-10-21 12:57:28
本文介绍了尝试在詹金斯上运行mstest时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试在jenkins上配置MSTest构建插件,但出现以下错误:

I´m trying to configure MSTest build plugin on jenkins, but I´m getting the following error:

Path To MSTest.exe: mstest.exe Result file was not found so no action has been taken. file:/C:/Program%20Files%20(x86)/Jenkins/jobs/SoftwrenchvNext/workspace/TestResult.trx FATAL: null java.lang.NullPointerException at org.jenkinsci.plugins.MsTestBuilder.perform(MsTestBuilder.java:144)

该配置仅将TestResult.trx指定为ResultFileName.该文件没有版本,我希望可以在每个版本上创建它.

The configuration simply specifies TestResult.trx as ResultFileName. This file is not versioned, and I expect it to be created on each build.

为此需要做什么?

推荐答案

我也有这个完全相同的错误消息!

I too had this exact same error message!

我的建议是替换用MSTest运行单元测试"步骤.使用执行Windows批处理命令"步骤.这对我有用.

My recommendation is to replace the "Run unit tests with MSTest" step. with an "Execute Windows batch command" step. This worked for me.

命令

del TestResults.trx "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe" /testcontainer:Example.Tests\bin\Debug\Example.Tests.dll /resultsfile:TestResults.trx

使用此技术,您仍然可以使用发布MSTest测试结果报告"步骤指定...

Using this technique you may still use the "Publish MSTest test result report" step specifying...

测试报告TRX文件

TestResults.trx

祝你好运!

此外,您可以通过"EXIT"调用模拟"失败测试继续"功能,如下所示.

Also, you can "simulate" the "Continue on failed tests" functionality with an "EXIT" call, seen below.

del TestResults.trx "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe" /testcontainer:Example.Tests\bin\Debug\Example.Tests.dll /resultsfile:TestResults.trx /nologo EXIT /B 0

更多推荐

尝试在詹金斯上运行mstest时出错

本文发布于:2023-11-16 16:28:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1605946.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:金斯   mstest

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!