Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anyone know where to find NUnit console exit codes meanings?

I am getting error message from my MSBuild:

"nunit-console.exe" exited with code -100.

Where can the meaning of the NUnit console exit codes be found?

like image 412
DarkDeny Avatar asked Oct 08 '10 10:10

DarkDeny


People also ask

Where can I find NUnit console exe?

The preferred way to download NUnit is through the NuGet package manager. The latest releases of can always be found on the relevant GitHub releases pages.

What is NUnit console?

The nunit-console.exe program is a text-based runner and can be used when you want to run all your tests and don't need a red/yellow/green indication of success or failure. It is useful for automation of tests and integration into other systems.

Which of the following runners are provided by NUnit?

Nunit provides three different runners, which may be used to load and run your tests. The console runner, nunit-console.exe, is used for batch execution. The gui runner, nunit.exe, provides interactive loading and running of tests.


2 Answers

Error code -100 stands for UNEXPECTED_ERROR

static ConsoleUi() {     OK = 0;     INVALID_ARG = -1;     FILE_NOT_FOUND = -2;     FIXTURE_NOT_FOUND = -3;     TRANSFORM_ERROR = -4;     UNEXPECTED_ERROR = -100; } 

EDIT: Additional information from a thread on the NUnit-Discuss google group:

Additionally, positive values give a count of failed tests in the run.

The -100 return code is a catch-all, usually indicating an unhandled exception in your application or test. It should normally come with a stack trace.

like image 61
Julien Hoarau Avatar answered Oct 29 '22 04:10

Julien Hoarau


A minor update as of NUnit v3, the TRANSFORM_ERROR code appears to have been removed.

The full list now stands as:

OK = 0; INVALID_ARG = -1; INVALID_ASSEMBLY = -2; FIXTURE_NOT_FOUND = -3;       //Reserved, but not in use since v3.0 INVALID_TEST_FIXTURE = -4;    //From v3.4 UNEXPECTED_ERROR = -100; 

The source for this is currently located here.

UPDATE: Five years on, we finally documented these. Hooray!

like image 41
Chris Avatar answered Oct 29 '22 04:10

Chris