/** * Sets title using fluent-api * * @param title value to set * @return modified instance */ public TestCaseStartedEvent withTitle(String title) { setTitle(title); return this; }
@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); } }
event.setTitle(scenario.getName());
public void update(TestCaseStartedEvent event) { if (isTitleAnnotationPresent()) { event.setTitle(getTitle()); } if (isDescriptionAnnotationPresent()) { event.setDescription(getDescription()); } if (isStoriesAnnotationPresent()) { event.getLabels().addAll(getStoryLabels()); } if (isFeaturesAnnotationPresent()) { event.getLabels().addAll(getFeatureLabels()); } if (isSeverityAnnotationPresent()) { event.setSeverity(getSeverity()); } }
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); }
event.setTitle(getTitle());