Skip to content

Commit

Permalink
Add possibility to optionally include skip status when calculating pass
Browse files Browse the repository at this point in the history
percentage
  • Loading branch information
asimell committed Nov 13, 2024
1 parent 2462256 commit a41e398
Show file tree
Hide file tree
Showing 15 changed files with 598 additions and 541 deletions.
14 changes: 13 additions & 1 deletion src/main/java/hudson/plugins/robot/RobotBuildAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public class RobotBuildAction extends AbstractTestResultAction<RobotBuildAction>
private RobotResult result;
private String xAxisLabel;

private boolean countSkippedTests;

static {
XSTREAM.alias("result",RobotResult.class);
XSTREAM.alias("suite",RobotSuiteResult.class);
Expand All @@ -83,7 +85,8 @@ public class RobotBuildAction extends AbstractTestResultAction<RobotBuildAction>
* @param enableCache Whether we want to enable caching or not
*/
public RobotBuildAction(Run<?, ?> build, RobotResult result,
String outputPath, TaskListener listener, String logFileLink, String logHtmlLink, boolean enableCache, String xAxisLabel) {
String outputPath, TaskListener listener, String logFileLink, String logHtmlLink, boolean enableCache, String xAxisLabel,
boolean countSkippedTests) {
super();
super.onAttached(build);
this.build = build;
Expand All @@ -92,6 +95,7 @@ public RobotBuildAction(Run<?, ?> build, RobotResult result,
this.logHtmlLink = logHtmlLink;
this.enableCache = enableCache;
this.xAxisLabel = xAxisLabel;
this.countSkippedTests = countSkippedTests;
setResult(result, listener);
}

Expand Down Expand Up @@ -333,4 +337,12 @@ public String getUrlName() {
public List<RobotCaseResult> getAllTests() {
return getResult().getAllCases();
}

public boolean isCountSkippedTests() {
return countSkippedTests;
}

public void setCountSkippedTests(boolean countSkippedTests) {
this.countSkippedTests = countSkippedTests;
}

Check warning on line 347 in src/main/java/hudson/plugins/robot/RobotBuildAction.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 346-347 are not covered by tests
}
Loading

0 comments on commit a41e398

Please sign in to comment.