Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18642

Job build is marked as failed if NUnit test result contains only ignored tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: nunit-plugin
    • Labels:
      None
    • Environment:
      Windows 7, Jenkins, NUnit Publisher 0.14, NUnit 2.5.10
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          bartensud Thomas Bartensud added a comment -

          Created a pull request in git repository for the fix:
          https://github.com/jenkinsci/nunit-plugin/pull/6

          Show
          bartensud Thomas Bartensud added a comment - Created a pull request in git repository for the fix: https://github.com/jenkinsci/nunit-plugin/pull/6
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: bartensud
          Path:
          src/main/java/hudson/plugins/nunit/NUnitPublisher.java
          http://jenkins-ci.org/commit/nunit-plugin/84fa15267a1914c097fbe7975a816f23bf15ab8d
          Log:
          Fix for issue JENKINS-18642 (Job build is marked as failed if NUnit test
          result contains only ignored tests)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: bartensud Path: src/main/java/hudson/plugins/nunit/NUnitPublisher.java http://jenkins-ci.org/commit/nunit-plugin/84fa15267a1914c097fbe7975a816f23bf15ab8d Log: Fix for issue JENKINS-18642 (Job build is marked as failed if NUnit test result contains only ignored tests)
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Bruno P. Kinoshita
          Path:
          src/main/java/hudson/plugins/nunit/NUnitPublisher.java
          http://jenkins-ci.org/commit/nunit-plugin/b4dce994b29118b093c32edd92e0d3efe1fe5a7c
          Log:
          Merge pull request #6 from bartensud/master

          Fix for issue JENKINS-18642 (Job build is marked as failed if NUnit test result contains only ignored tests)

          Compare: https://github.com/jenkinsci/nunit-plugin/compare/c97be8f9e824...b4dce994b291

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: src/main/java/hudson/plugins/nunit/NUnitPublisher.java http://jenkins-ci.org/commit/nunit-plugin/b4dce994b29118b093c32edd92e0d3efe1fe5a7c Log: Merge pull request #6 from bartensud/master Fix for issue JENKINS-18642 (Job build is marked as failed if NUnit test result contains only ignored tests) Compare: https://github.com/jenkinsci/nunit-plugin/compare/c97be8f9e824...b4dce994b291
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Fixed in 0.16

          Show
          kinow Bruno P. Kinoshita added a comment - Fixed in 0.16

            People

            • Assignee:
              redsolo redsolo
              Reporter:
              bartensud Thomas Bartensud
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: