Unknown result format: nunit2 with Console runner 3.2.1

1,593 views
Skip to first unread message

Mike Long

unread,
Jun 8, 2016, 6:43:06 PM6/8/16
to NUnit-Discuss
Hello all,

I recently updated the NUnit 3.0.1 Nuget package in our solution to the 3.2.1 Nuget package. I haven't made any changes to the script that runs our NUnit tests but am receiving the following error from the NUnit3 console runner given the following command line. Has anything changed between 3.0.1 and 3.2.1 of the console runner that would result in the nunit2 results format not being recognized?

script output:
Running tests in assembly <company_name>.<product_name>.Selenium.Test.dll that match the include/exclude categories

$cmdArgs = C:\Jenkins\jobs\<product_name>_development_regression\workspace\CAT\<company_name>.<product_name>.Selenium.Test\bin\Release\<company_name>.<product_name>.Selenium.Test.dll --framework:net-4.0 --x86 --workers=2 --labels=all --work="C:\Jenkins\jobs\<product_name>_development_regression\workspace\autobuild\logs\nunit" --result="C:\Jenkins\jobs\<product_name>_development_regression\workspace\autobuild\logs\nunit\<company_name>.<product_name>.Selenium.Test.xml;format=nunit2" --where=(cat==daily_regression) and (cat!=disabled)

NUnit Console Runner 3.2.1 
Copyright (C) 2016 Charlie Poole

Unknown result format: nunit2
 Not all tests passed 

thanks for the time,
Mike Long

Charlie Poole

unread,
Jun 8, 2016, 7:02:56 PM6/8/16
to NUnit-Discuss
Apparently, you no longer have the extension that writes out nunit2
format installed or it isn't being found. What packages are present in
the packages directory?
> --
> You received this message because you are subscribed to the Google Groups
> "NUnit-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nunit-discus...@googlegroups.com.
> To post to this group, send email to nunit-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/nunit-discuss.
> For more options, visit https://groups.google.com/d/optout.

Mike Long

unread,
Jun 9, 2016, 11:52:28 AM6/9/16
to NUnit-Discuss
Thank you much for the quick response Charlie,

This was it. The nunit-v2-result-writer.dll file used to be in an add-ins sub-directory of the NUnit.Console.3.0.1 package directory, but is now in it's own package directory. I did not note the difference after the upgrade. The Jenkin's server that runs our NUnit test job was configured to only include the Console runner package directory in the build artifact archive of the build job workspace to be tested and was therefore missing out on the V2 result output glory. You saved me some serious hair pulling here (presuming I had any left).

Thank you again for you time,
Mike Long

Charlie Poole

unread,
Jun 9, 2016, 6:46:42 PM6/9/16
to NUnit-Discuss
Glad to help. If you would care to write some text about how to set up
for running NUnit tests on Jenkins, I would be glad to add it to the
docs.

Charlie

Paul Hicks

unread,
Jun 20, 2016, 7:53:26 PM6/20/16
to NUnit-Discuss
An alternative to keeping the existing NUnit results publisher + nunit2 results is to switch to nunit3 results and use the JUnit XSLT transform.
This produces junit-compatible files that Jenkins can publish using the built-in JUnit publisher.
Have a look at the NUnit Transforms project on github.

Charlie Poole

unread,
Jun 20, 2016, 7:58:40 PM6/20/16
to NUnit-Discuss
That's an option for users, of course. We need to keep supporting nunit2. :-)

LaTisha Krystof

unread,
Sep 28, 2016, 12:14:31 AM9/28/16
to NUnit-Discuss
So where exactly did you put nunit-v2-result-writer.dll in relation to  nunit3-console.exe?? I tried putting it all in the same folder still doesn't work..

[21:03:48][Step 1/2] Mode LastWriteTime Length Name
[21:03:48][Step 1/2] ---- ------------- ------ ----
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 280576 Mono.Cecil.dll
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 71168 nunit-agent-x86.exe
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 997 nunit-agent-x86.exe.config
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 71168 nunit-agent.exe
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 997 nunit-agent.exe.config
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 15872 nunit-v2-result-writer.dll
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 139264 nunit.core.dll
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 57344 nunit.core.interfaces.dll
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 18944 nunit.engine.api.dll
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 53394 nunit.engine.api.xml
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 111616 nunit.engine.dll
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 114 nunit.nuget.addins
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 21 nunit.v2.driver.addins
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 16896 nunit.v2.driver.dll
[21:03:48][Step 1/2] -a---- 9/27/2016 11:01 AM 137216 nunit3-console.exe
[21:03:49][Step 1/2] -a---- 9/27/2016 11:01 AM 761 nunit3-console.exe.config

Charlie Poole

unread,
Sep 28, 2016, 12:24:55 AM9/28/16
to NUnit-Discuss
Hi LaTisha,

While it's possible to just copy everything to a directory and make it
work, it requires some under standing of how the engine files
extensions to do it correctly.

Extensions are found by starting from the .addins files in the same
directory as the engine assembly. The two addins files you have come
from NUnit, but they are out of context here unless you have edited
them after copying all the files to the same directory. Change one of
them, or create your own, so that the entries actually list the addins
you are using.

The docs are limited, but what there is can be found at
https://github.com/nunit/docs/wiki/Engine-Extensibility#locating-addins

Charlie

Rob Prouse

unread,
Sep 28, 2016, 12:38:45 AM9/28/16
to NUnit-Discuss
LaTisha,

Are you asking because you are using the NuGet package and it isn't working? If that is the case, then you likely have the NuGet package that doesn't include extensions called NUnit.ConsoleRunner. The one you need is NUnit.Console. Probably a bit of unfortunate naming on our part.

Rob

To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discuss+unsubscribe@googlegroups.com.

To post to this group, send email to nunit-...@googlegroups.com.
Visit this group at https://groups.google.com/group/nunit-discuss.
For more options, visit https://groups.google.com/d/optout.



--

Rob Prouse

 

I welcome VSRE emails. Learn more at http://vsre.info/

Reply all
Reply to author
Forward
0 new messages