Initially we had this issue using quite an old version of xUnit (1.60) but the issue still persists after upgrading to the latest version (1.101). This is a blocker for us upgrading our code-base to NUnit 3 because we rely on the xUnit plugin processing our report file in order to pass or fail builds based on unit test success.

The most recent comment on JENKINS-27043 seems to relate to the same issue but as that bug wasn't reported for the same reason I thought it would be best to create this as a stand-alone issue as it's quite specifically a compatibility problem with NUnit 3.

Attachments

Activity

We are experiencing the same issue with Jenkins 1.625.2, xUnit plugin 1.101. Currently working around by appending ";format=nunit2" to nunit3-console.exe build step but would like to have NUnit 3 format supported.

Jason Carlberg
added a comment - 2016-04-07 22:45 We are experiencing the same issue with Jenkins 1.625.2, xUnit plugin 1.101. Currently working around by appending ";format=nunit2" to nunit3-console.exe build step but would like to have NUnit 3 format supported.

I hadn't actually seen that format argument in the NUnit docs, so you're comment is really handy as we can now upgrade to NUnit 3 and still use xUnit by making it output the results file in compatibility mode with NUnit 2. Obviously it would be great if xUnit could be upgraded to support the newer format but this is actually a really helpful solution.

Will Appleby
added a comment - 2016-04-08 09:58 Hi Jason Carlberg ,
I hadn't actually seen that format argument in the NUnit docs, so you're comment is really handy as we can now upgrade to NUnit 3 and still use xUnit by making it output the results file in compatibility mode with NUnit 2. Obviously it would be great if xUnit could be upgraded to support the newer format but this is actually a really helpful solution.
https://github.com/nunit/docs/wiki/Console-Command-Line
Thanks,
Will.

Bjørn Reppen
added a comment - 2016-08-19 05:48 The new dotnet-test-nunit vtest runner version 3.4.0-beta-2 doesn't seem to support nunit2 format anymore which can be troublesome if you want to test ASP.NET Core applications.

After changing my NUnit run step on Jenkins from old v2 console runner to V3"%NUNIT3_HOME%\nunit3-console.exe" NUnitTests.nunit /config=%MSBuildConfiguration% --framework=net-4.5 -result:TestResult.xml;format=nunit2

The last option is what did the trick: -result:TestResult.xml;format=nunit2 , that way you tell the console runner to write the output in the V2 format and also to use the legacy (v2 default) name TestResult.xml.

I'm also waiting to use a future release of the xUnit plugin with support for NUnit 3.x. I believe that the conversion process is a little bit slower for the v3 console runner.

Environment:

Lorenzo Solano Martinez
added a comment - 2016-12-27 15:39 Hi Will Appleby and Jason Carlberg ,
I did a simmilar trick, as follow:
From https://github.com/nunit/nunit-console on branch release/3.5 I found the following test scenario
Name-space: NUnit.ConsoleRunner.Tests
Test Class: CommandLineTests
Scenario: ResultOptionWithFilePathAndFormat()
Options: ConsoleOptions options = new ConsoleOptions("tests.dll", "-result:results.xml;format=nunit2");
After changing my NUnit run step on Jenkins from old v2 console runner to V3
"%NUNIT3_HOME%\nunit3-console.exe" NUnitTests.nunit /config=%MSBuildConfiguration% --framework=net-4.5 -result:TestResult.xml;format=nunit2
The last option is what did the trick: -result:TestResult.xml;format=nunit2 , that way you tell the console runner to write the output in the V2 format and also to use the legacy (v2 default) name TestResult.xml .
I'm also waiting to use a future release of the xUnit plugin with support for NUnit 3.x. I believe that the conversion process is a little bit slower for the v3 console runner.
Environment:
Windows 2012 R2
Jenkins: 1.651.1
xUnit Plugin: 1.102
NUnit: 3.5 (framework and console runner with v2 driver / plugin)