How to save MS Test's result in a Jenkins variable?

14 views
Skip to first unread message

Umesh Chhabra

unread,
Aug 10, 2016, 12:24:46 AM8/10/16
to Jenkins Users
Hello Everyone,

One of my Jenkins job is executing MS Test. I am passing the following value to the MS Test plugin:

del TestResults.trx
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe" /testcontainer:D:\Projects\Jenkins\TestResultVerificationFromJenkins\TestResultVerificationFromJenkins\bin\Debug\TestResultVerificationFromJenkins.dll /resultsfile:TestResults.trx /nologo /detail:stdout


At the time of execution, Console Output is displaying the following values:

Starting execution...
Results               Top Level Tests
-------               ---------------
Passed                TestResultVerificationFromJenkins.UnitTest1.PassTest
[stdout] = Test is passed

1/1 test(s) Passed
Summary
-------
Test Run Completed.
  Passed  1
  ---------
  Total   1
Results file:  C:\Program Files (x86)\Jenkins\jobs\JenkinsTestResultReader\workspace\TestResults.trx
Test Settings: Default Test Settings

In the post build step, I have to pass the MS test result "Test is passed"   to a HTTP Request.

Is there any way to save this result in a Jenkins variable so that I can pass that to HTTP Request?

Regards,
Umesh
Reply all
Reply to author
Forward
0 new messages