View Javadoc
1   package org.apache.maven.surefire.report;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  /**
23   * Describes a single entry for a test report
24   *
25   */
26  public interface ReportEntry
27  {
28      /**
29       * The class name of the test
30       *
31       * @return A string with the class name
32       */
33      String getSourceName();
34  
35      /**
36       * The name of the test case
37       *
38       * @return A string describing the test case
39       */
40      String getName();
41  
42      /**
43       * The group/category of the testcase
44       *
45       * @return A string
46       */
47      String getGroup();
48  
49      /**
50       * The group/category of the testcase
51       *
52       * @return A string
53       */
54      StackTraceWriter getStackTraceWriter();
55  
56      /**
57       * Gets the runtime for the item. Optional parameter. If the value is not set, it will be determined within
58       * the reporting subsustem. Some providers like to calculate this value themselves, and it gets the
59       * most accurate value.
60       */
61      Integer getElapsed();
62  
63  
64      /**
65       * A message relating to a non-successful termination.
66       * May be the "message" from an exception or the reason for a test being ignored
67       *
68       * @return A string that explains an anomaly
69       */
70      String getMessage();
71  
72      /**
73       * A name of the test case together with the group or category (if any exists).
74       *
75       * @return A string with the test case name and group/category, or just the name.
76       */
77      String getNameWithGroup();
78  }