use of ru.yandex.qatools.allure.events.TestCaseStartedEvent in project allure-cucumberjvm by allure-framework.
the class AllureRunListener method testStarted.
@Override
public void testStarted(Description description) throws IllegalAccessException {
if (description.isTest()) {
String methodName = extractMethodName(description);
TestCaseStartedEvent event = new TestCaseStartedEvent(getSuiteUid(description), methodName);
event.setTitle(methodName);
Collection<Annotation> annotations = new ArrayList<>();
for (Annotation annotation : description.getAnnotations()) {
annotations.add(annotation);
}
AnnotationManager am = new AnnotationManager(annotations);
am.update(event);
getLifecycle().fire(event);
}
}
use of ru.yandex.qatools.allure.events.TestCaseStartedEvent in project allure-cucumberjvm by allure-framework.
the class AllureRunListener method startFakeTestCase.
public void startFakeTestCase(Description description) throws IllegalAccessException {
String uid = getSuiteUid(description);
String name = description.isTest() ? description.getMethodName() : description.getClassName();
TestCaseStartedEvent event = new TestCaseStartedEvent(uid, name);
event.setTitle(name);
AnnotationManager am = new AnnotationManager(description.getAnnotations());
am.update(event);
getLifecycle().fire(event);
}
Aggregations