The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
cucumber
: Cucumber reportsPublishes Cucumber results
This plugin requires that you use cucumber library to generate a json report. The plugin uses the json report to produce html reports that are available from jenkins on the build page after a build has run.
import cucumber.junit.Cucumber; import org.junit.runner.RunWith; @RunWith(Cucumber.class) @Cucumber.Options(format = {"pretty", "html:target/cucumber", "json:target/cucumber.json"}) public class MyTest { }
fileIncludePattern
Filter for the files that should be processed. Leave empty to use default pattern **/*.json
.
String
buildStatus
(optional)
Build result to which the build should be set when the report is marked as failed or unstable.
String
classifications
(optional)
Configure additional information as key-value displayed on main page of the report.
Pairs key-value which are passed to the report to be displayed.
key
Name of the classification.
String
value
Value of the classification. Hyperlink, HTML code and Jenkins variable can be used for values, check Token Macro Plugin for details.
String
classificationsFilePattern
(optional)
Filter for the properties files that should be processed as classifications. Leave empty to use default pattern **/*.properties
.
String
customCssFiles
(optional)
Comma separated list of CSS files or patterns (relative to workspace) to include into all report pages.
String
customJsFiles
(optional)
Comma separated list of JS files or patterns (relative to workspace) to include into all report pages.
String
expandAllSteps
(optional)
boolean
failedAsNotFailingStatus
(optional)
Failed statuses for the step is counted as not failing status and does not fail scenario.
boolean
failedFeaturesNumber
(optional)
Maximum number of failed features above which build result is triggered. Provide value -1 if the rule should be skipped.
int
failedFeaturesPercentage
(optional)
Maximum percentage of failed features above which build result is changed.
double
failedScenariosNumber
(optional)
Maximum number of failed scenarios above which build result is triggered. Provide value -1 if the rule should be skipped.
int
failedScenariosPercentage
(optional)
Maximum percentage of failed scenarios above which build result is changed.
double
failedStepsNumber
(optional)
Maximum number of failed steps above which build result is triggered. Provide value -1 if the rule should be skipped.
int
failedStepsPercentage
(optional)
Maximum percentage of failed steps above which build result is changed.
double
fileExcludePattern
(optional)
Filter for the files that should be excluded from the report.
String
hideEmptyHooks
(optional)
boolean
jsonReportDirectory
(optional)
Directory where the JSON cucumber reports are located. By default and for empty value whole workspace is scanned.
String
mergeFeaturesById
(optional)
Merge features with different JSON files that have same ID so scenarios are be stored in single feature.
boolean
mergeFeaturesWithRetest
(optional)
Merge features and scenarios from different JSON files of different runs into a single report by features and scenarios ids.
Example:
Original cucumber report is "cucumber.json". Let's look a situation when couple of tests failed there. Cucumber runner generates a new report, for example, cucumber-rerun.json as a result of rerun the failed tests.
In that case you will have a merged report where all failed tests from the original cucumber.json file are overridden with the results from the cucumber-rerun.json.
boolean
pendingAsNotFailingStatus
(optional)
Pending statuses for the step is counted as not failing status and does not fail scenario.
boolean
pendingStepsNumber
(optional)
Maximum number of pending steps above which build result is triggered. Provide value -1 if the rule should be skipped.
int
pendingStepsPercentage
(optional)
Maximum percentage of pending steps above which build result is changed.
double
reportTitle
(optional)
String
skipEmptyJSONFiles
(optional)
Skip empty JSON reports. If this flag is not selected then report generation fails on empty file.
boolean
skippedAsNotFailingStatus
(optional)
Skipped statuses for the step is counted as not failing status and does not fail scenario.
boolean
skippedStepsNumber
(optional)
Maximum number of skipped steps above which build result is triggered. Provide value -1 if the rule should be skipped.
int
skippedStepsPercentage
(optional)
Maximum percentage of skipped steps above which build result is changed.
double
sortingMethod
(optional)
This section allows to configure what is default sorting method for features:
String
stopBuildOnFailedReport
(optional)
The default behaviour is to carry on with the build even if the cucumber report contains failures. This option stops the build. Particularly useful when for example there is a need for all tests to pass before deploying to production. Note that this overrides the Build Status option, and it always marks the build as failed.
boolean
trendsLimit
(optional)
Number of historical reports that should be presented.
int
undefinedAsNotFailingStatus
(optional)
Undefined statuses for the step is counted as not failing status and does not fail scenario.
boolean
undefinedStepsNumber
(optional)
Maximum number of undefined steps above which build result is triggered. Provide value -1 if the rule should be skipped.
int
undefinedStepsPercentage
(optional)
Maximum percentage of undefined steps above which build result is changed.
double
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.