jenkinsci / cucumber-reports-plugin

Jenkins plugin to generate cucumber-jvm reports
https://plugins.jenkins.io/cucumber-reports/
GNU Lesser General Public License v2.1
209 stars 231 forks source link

Advance option properties (skipped-steps-percentage, failed-scenarios-percentage & failed-features-percentage) for cucumber report is not reflecting in Jenkins Job Config through Yaml file #446

Open dsharma8x8 opened 12 months ago

dsharma8x8 commented 12 months ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

OS Version - MacOS monterey 12.6.8 Jenkins Version - 2.346.3 Cucumber Reports Plugin Version - 5.7.3

Reproduction steps

  1. Add below property in yaml file for Cucumber Report under publish - publishers:
    • cucumber-reports: json-reports-path: "" file-include-pattern: '**/cucumber-report.json' failed-steps-number: 1 skipped-steps-number: -1 pending-steps-number: -1 undefined-steps-number: -1 failed-scenarios-number: -1 failed-features-number: -1 failed-scenarios-percentage: 100.0 skipped-steps-percentage: 100.0 failed-features-percentage: 100.0 build-status: FAILURE sorting-method: ALPHABETICAL
  2. Run the Yaml file to reflect the changes in Jenkins job configuration
  3. Verify the cucumber Report configuration in job config

Expected Results

Cucumber report advance option in job config should show all the parameters defined in yaml file.

Actual Results

Below parameters are not reflecting in Jenkins job config for cucumber report - failed-scenarios-percentage: 100.0 skipped-steps-percentage: 100.0 failed-features-percentage: 100.0 The value is for above properties is showing as default(Zero) instead of 100.0

Anything else?

Jenkins Documentation also don't have the mentioned percentage parameters for Cucumber Report - https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.cucumber-reports

damianszczepanik commented 11 months ago

Add some reference how Jenkins supports yaml format in case of configuration

dsharma8x8 commented 11 months ago

Add some reference how Jenkins supports yaml format in case of configuration

It should be like this in yaml - Please refer last 3 percentage parameters, which Jenkins should support for Cucumber config.

publishers:
      - cucumber-reports:
          json-reports-path: ""
          file-include-pattern: '**/cucumber-report.json'
          failed-steps-number: 1
          skipped-steps-number: -1
          pending-steps-number: -1
          undefined-steps-number: -1
          failed-scenarios-number: -1
          failed-features-number: -1
          build-status: FAILURE
          sorting-method: ALPHABETICAL
          failed-scenarios-percentage: 100.0
          skipped-steps-percentage: 100.0
          failed-features-percentage: 100.0
damianszczepanik commented 11 months ago

All configurations are developed https://github.com/jenkinsci/cucumber-reports-plugin/blob/529bf7bfd4d058997b0fc959d3255024b6382685/src/main/java/net/masterthought/jenkins/CucumberReportPublisher.java#L269 so I believe percentage can be configured as well

dsharma8x8 commented 11 months ago

Thanks @damianszczepanik for the update. I will verify it and keep you posted. Thank You!