-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Windows 7, Jenkins, NUnit Publisher 0.14, NUnit 2.5.10
Job build is marked as failed if NUnit test result contains only ignored tests.
It could be said that a test suite with only ignored tests is useless and should be marked as failed. But I have an use case in a highly distributed test environment where it's a blocker for me:
A high number of a parameterized unit test is splitted up (by a filtering mechanism) in order to distribute the test executions on jenkins slaves (via matrix build). In certain cases the dynamic test splitting results in only one test case per jenkins job. And if this test case is marked as ignored then the whole (distributed) build fails
This can be easily fixed in NUnitPublisher.java by adding the red part:
if (result.getPassCount()==0 && result.getFailCount()==0 && result.getSkipCount()==0) {
throw new AbortException("None of the test reports contained any result");
}
I tested this fix in my environment and it works without any issues for several days now.