コード例 #1
0
  protected void starting(Description description) {
    TestCaseStartedEvent event = new TestCaseStartedEvent(suiteUid, description.getMethodName());
    AnnotationManager am = new AnnotationManager(description.getAnnotations());

    am.update(event);

    getLifecycle().fire(event);
  }
コード例 #2
0
  @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")));
  }
コード例 #3
0
 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("###################################################");
 }