Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
624 views
in Technique[技术] by (71.8m points)

msbuild - Error trying to run mstest on jenkins

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)

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

What needs to be done for that?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

After some investigation I was able to get MSTest to work in Jenkins by doing the following:

Select Manage Jenkins

enter image description here

From within the Manage Jenkins choose Configure System

enter image description here

In Configure System you will need to find MSTest and Add your MSTest configuration

enter image description here

Enter your configuration as you see fit. Mine appears as follows:

enter image description here

Save the configuration and then go to your build project and configure the appropriate items like shown below:

enter image description here

One thing to note is that I did not follow any of the steps listed on the author's site because they didn't seem to make any sense to me. I did however read the code and spent some time digging and realized that the missing piece was in the Configure System page of Jenkins.

Cheers!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...