protected void starting(Description description) { TestCaseStartedEvent event = new TestCaseStartedEvent(suiteUid, description.getMethodName()); AnnotationManager am = new AnnotationManager(description.getAnnotations()); am.update(event); getLifecycle().fire(event); }
@Test public void testCaseReportRuleStartedTest() throws Exception { Description description = mock(Description.class); when(description.getAnnotations()).thenReturn(Collections.<Annotation>emptyList()); when(description.getMethodName()).thenReturn("some.method.name"); testCaseReportRule.starting(description); verify(allure).fire(eq(new TestCaseStartedEvent("some.uid", "some.method.name"))); }
private void dump(Description description) { final String methodName = description.getMethodName(); System.out.println("***************************************************"); System.out.println(" - isSuite: " + description.isSuite()); System.out.println(" - isTest: " + description.isTest()); System.out.println(" - annotations: " + description.getAnnotations()); System.out.println(" - TestClass: " + description.getTestClass()); System.out.println(" - class name: " + description.getClassName()); System.out.println(" - method name: " + description.getMethodName()); System.out.println("###################################################"); }