diff --git a/doc/available_metrics.md b/doc/available_metrics.md index a7c29f79..457da728 100644 --- a/doc/available_metrics.md +++ b/doc/available_metrics.md @@ -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: diff --git a/src/main/java/jenkinsci/plugins/influxdb/generators/RobotFrameworkPointGenerator.java b/src/main/java/jenkinsci/plugins/influxdb/generators/RobotFrameworkPointGenerator.java index 464df916..62913277 100644 --- a/src/main/java/jenkinsci/plugins/influxdb/generators/RobotFrameworkPointGenerator.java +++ b/src/main/java/jenkinsci/plugins/influxdb/generators/RobotFrameworkPointGenerator.java @@ -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 tagResults; @@ -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()); for (String tag : caseResult.getTags()) { markTagResult(tag, caseResult);