如何在cucumber中获取当前重试次数

如何在cucumber中获取当前重试次数,cucumber,cucumber-jvm,Cucumber,Cucumber Jvm,我在runner类中使用了@ExtendedCucumberOptions,在这里我可以给出重试计数,如果我的测试场景失败,我会尝试根据我在这个runner文件中给出的计数重新运行它,但这里我想知道在我的场景中间我需要获得或知道重试计数值是多少 Runner类,我在pom中使用了mkolisnyk依赖项: @ExtendedCucumberOptions( jsonReport = "target/81/cucumber.json", retryCount = 3

我在runner类中使用了@ExtendedCucumberOptions,在这里我可以给出重试计数,如果我的测试场景失败,我会尝试根据我在这个runner文件中给出的计数重新运行它,但这里我想知道在我的场景中间我需要获得或知道重试计数值是多少

Runner类,我在pom中使用了mkolisnyk依赖项:

@ExtendedCucumberOptions(
        jsonReport = "target/81/cucumber.json",
        retryCount = 3)
@CucumberOptions(
        features = { "src/test/java/com/github/mkolisnyk/cucumber/features/Test.feature" },
        tags = { "@failed" },
        glue = "com/github/mkolisnyk/cucumber/steps", plugin = {
        "html:target/81", "json:target/81/cucumber.json",
        "pretty:target/81/cucumber-pretty.txt",
        "usage:target/81/cucumber-usage.json", "junit:target/81/cucumber-results.xml" })
public static class SampleTestRetry {
}
这里我保留了<强> RejyCuth<强> 3,我已经开始执行我的套件中的一个场景了,第一次它失败了,开始重试,所以我在课前的中间想马上取重试次数。所以我需要帮助,我不能在我的中间获取<强> RejyCube <强>。测试用例,所以请在这方面帮助我