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

Cucumber json test reporting fails when parsing result with status pending

    XMLWordPrintable

Details

    Description

      The Cucumber json test reporting plugin does not parse the scenario to html when the result-type is pending. Please see the attached example report.

      Exception: java.lang.IllegalArgumentException: No enum constant org.jenkinsci.plugins.cucumber.jsontestsupport.ScenarioToHTML.RESULT_TYPE.at java.lang.Enum.valueOf(Enum.java:236)

      Cucumber json test reporting version 0.5.2
      Jenkins version 1.574

      Attachments

        Activity

          Code changed in jenkins
          User: James Nord
          Path:
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberUtils.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/ScenarioToHTML.java
          http://jenkins-ci.org/commit/cucumber-testresult-plugin/4cc56b6381a172ad4de0b14325a1b708e907d55b
          Log:
          JENKINS-24061 quick fix to not crash on pending steps.

          This prevents the crash for any pending steps, however pending scenarious/steps should
          somehow be flagged (perhaps marked as skipped in the overview?).

          This needs to be investigated and fixed properly - but for now do not fall over.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberUtils.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/ScenarioToHTML.java http://jenkins-ci.org/commit/cucumber-testresult-plugin/4cc56b6381a172ad4de0b14325a1b708e907d55b Log: JENKINS-24061 quick fix to not crash on pending steps. This prevents the crash for any pending steps, however pending scenarious/steps should somehow be flagged (perhaps marked as skipped in the overview?). This needs to be investigated and fixed properly - but for now do not fall over.
          teilo James Nord added a comment - build that hopefully will not fall over at https://jenkins.ci.cloudbees.com/job/plugins/job/cucumber-testresult-plugin/19/org.jenkins-ci.plugins$cucumber-testresult-plugin/artifact/org.jenkins-ci.plugins/cucumber-testresult-plugin/0.6-SNAPSHOT/cucumber-testresult-plugin-0.6-SNAPSHOT.hpi build is not yet tested so YMMV.

          Code changed in jenkins
          User: James Nord
          Path:
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/BackgroundResult.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/BeforeAfterResult.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberTestResult.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberTestResultArchiver.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/FeatureResult.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/ScenarioResult.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/ScenarioToHTML.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/StepResult.java
          src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/TagResult.java
          src/test/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberJSONParserTest.java
          src/test/resources/org/jenkinsci/plugins/cucumber/jsontestsupport/ScenarioResultTest/pending.json
          http://jenkins-ci.org/commit/cucumber-testresult-plugin/c19e0f727b46b0d89d5db7130ec2f5c5349bbe48
          Log:
          [FIXED JENKINS-24061] pending steps are not handled correctly.

          Pending steps now show up as skipped tests in the report.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/BackgroundResult.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/BeforeAfterResult.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberTestResult.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberTestResultArchiver.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/FeatureResult.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/ScenarioResult.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/ScenarioToHTML.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/StepResult.java src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/TagResult.java src/test/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberJSONParserTest.java src/test/resources/org/jenkinsci/plugins/cucumber/jsontestsupport/ScenarioResultTest/pending.json http://jenkins-ci.org/commit/cucumber-testresult-plugin/c19e0f727b46b0d89d5db7130ec2f5c5349bbe48 Log: [FIXED JENKINS-24061] pending steps are not handled correctly. Pending steps now show up as skipped tests in the report.

          People

            Unassigned Unassigned
            stigbd Stig B. Dørmænen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: