Generating .TRX file in jenkins using .Net Framework 4.7.2 using xunit

497 Views Asked by At

So I've got a .Net 4.7.2 solution with a unit testing project also using 4.7.2 and xunit.

I've got a jenkins job setup to run the unit tests every 5 minutes and send an email to me if any tests fail. Currently, I only know how to generate and send off an XML file, but I've got another jenkins job for unit testing against a .Net Core solution which sends off a TRX file to me if any jobs fail.

I really like the TRX file format (the template and information contained within) and I'd like to change my .Net 4.7.2 job to send off a TRX file instead, but from what I can find, MSTEST is the only way to generate a TRX file and it only works with .Net Core.

I only have a loose understanding of what options I have in regards to reporting from jenkins, but I was wondering if it's possible to either generate a TRX file or convert the XML file to TRX post build.

Thanks in advance

Current Jenkins Windows Batch Command

cd "C:\Program Files (x86)\Jenkins\workspace\JenkinsJobName\packages\xunit.runner.console.2.3.1\tools\net452\"
xunit.console "C:\Program Files (x86)\Jenkins\workspace\JenkinsJobName\TestProject\bin\Debug\TestProject.dll" 
-xml "C:\Program Files (x86)\Jenkins\workspace\JenkinsJobName\report.xml"
0

There are 0 best solutions below