use of ru.yandex.qatools.allure.annotations.Issues in project allure-cucumberjvm by allure-framework.
the class AllureReporter method startOfScenarioLifeCycle.
@Override
public void startOfScenarioLifeCycle(Scenario scenario) {
//to avoid duplicate steps in case of Scenario Outline
if (SCENARIO_OUTLINE_KEYWORDS.contains(scenario.getKeyword())) {
synchronized (gherkinSteps) {
gherkinSteps.clear();
}
}
currentStatus = PASSED;
TestCaseStartedEvent event = new TestCaseStartedEvent(uid, scenario.getName());
event.setTitle(scenario.getName());
Collection<Annotation> annotations = new ArrayList<>();
SeverityLevel level = getSeverityLevel(scenario);
if (level != null) {
annotations.add(getSeverityAnnotation(level));
}
Issues issues = getIssuesAnnotation(scenario);
if (issues != null) {
annotations.add(issues);
}
TestCaseId testCaseId = getTestCaseIdAnnotation(scenario);
if (testCaseId != null) {
annotations.add(testCaseId);
}
annotations.add(getFeaturesAnnotation(feature.getName()));
annotations.add(getStoriesAnnotation(scenario.getName()));
annotations.add(getDescriptionAnnotation(scenario.getDescription()));
AnnotationManager am = new AnnotationManager(annotations);
am.update(event);
event.withLabels(AllureModelUtils.createTestFrameworkLabel("CucumberJVM"));
ALLURE_LIFECYCLE.fire(event);
}
Aggregations