Skip to content

Commit

Permalink
Add rf_age to testcase_point (#177)
Browse files Browse the repository at this point in the history
* Add rf_age to testcase_point

* Add rf_age documentation
  • Loading branch information
asimell authored Apr 26, 2024
1 parent 81f2138 commit 8244a8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/available_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ Tags specific for this measurement:
| rf_passed | integer | 0 or 1 | |
| rf_skipped | integer | 0 or 1 | 3.0 |
| rf_suite_name | string | Name of the suite of the test case | |
| rf_age | int | How many times test has failed since last pass | 3.7 |

Tags specific for this measurement:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class RobotFrameworkPointGenerator extends AbstractPointGenerator {
private static final String RF_SUITE_NAME = "rf_suite_name";
private static final String RF_TESTCASES = "rf_testcases";
private static final String RF_TAG_NAME = "rf_tag_name";
private static final String RF_AGE = "rf_age";

private final String customPrefix;
private final Map<String, RobotTagResult> tagResults;
Expand Down Expand Up @@ -129,7 +130,8 @@ private Point generateCasePoint(RobotCaseResult caseResult, long timestamp) {
.addField(RF_FAILED, caseResult.getFailed())
.addField(RF_PASSED, caseResult.getPassed())
.addField(RF_SKIPPED, caseResult.getSkipped())
.addField(RF_DURATION, caseResult.getDuration());
.addField(RF_DURATION, caseResult.getDuration())
.addField(RF_AGE, caseResult.getAge());

Check warning on line 134 in src/main/java/jenkinsci/plugins/influxdb/generators/RobotFrameworkPointGenerator.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 133-134 are not covered by tests

for (String tag : caseResult.getTags()) {
markTagResult(tag, caseResult);
Expand Down

0 comments on commit 8244a8d

Please sign in to comment.