am.update(event); event.withLabels(AllureModelUtils.createTestFrameworkLabel("CucumberJVM"));
@Override public void onTestStart(ITestResult iTestResult) { ITestNGMethod method = iTestResult.getMethod(); String testSuiteLabel = iTestResult.getTestContext().getSuite().getName(); String testGroupLabel = iTestResult.getTestContext().getCurrentXmlTest().getName(); String testClassLabel = iTestResult.getTestClass().getName(); String testMethodLabel = method.getMethodName(); String suitePrefix = getCurrentSuitePrefix(iTestResult); String testName = getName(iTestResult); startedTestNames.add(testName); testName = testName.replace(suitePrefix, ""); String invoc = getMethodInvocationsAndSuccessPercentage(iTestResult); Description description = new Description().withValue(method.getDescription()); String suiteUid = getSuiteUid(iTestResult.getTestContext()); TestCaseStartedEvent event = new TestCaseStartedEvent(suiteUid, testName + invoc).withLabels( AllureModelUtils.createTestSuiteLabel(testSuiteLabel), AllureModelUtils.createTestGroupLabel(testGroupLabel), AllureModelUtils.createTestClassLabel(testClassLabel), AllureModelUtils.createTestMethodLabel(testMethodLabel)); if (description.getValue() != null) { event.setDescription(description); } AnnotationManager am = new AnnotationManager(getMethodAnnotations(iTestResult)); am.setDefaults(getClassAnnotations(iTestResult)); am.update(event); getLifecycle().fire(event); if (AllureConfig.newInstance().areTestNgParametersEnabled()) { fireAddParameterEvents(iTestResult); } }