forked from scalatest/test-interface
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Status.java
63 lines (53 loc) · 1.92 KB
/
Status.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package sbt.testing;
/**
* Represents the status of running a test. Test frameworks can decided which of these to
* use and what they mean, but in general, the intended meanings are:
*
* <ul>
* <li>Success - a test succeeded</li>
* <li>Error - an "error" occurred during a test</li>
* <li>Failure - an "failure" during a test</li>
* <li>Skipped - a test was skipped for any reason</li>
* <li>Ignored - a test was ignored, <em>i.e.</em>, temporarily disabled with the intention of fixing it later</li>
* <li>Canceled - a test was canceled, <em>i.e.</em>, not able to be completed because of some unmet pre-condition, such as a database being offline that the test requires</li>
* <li>Pending - a test was declared as pending, <em>i.e.</em>, with test code and/or production code as yet unimplemented </li>
* </ul>
*
* <p>
* The difference between errors and failures, if any, is determined by the test frameworks.
* JUnit and specs2 differentiate between errors and failures. ScalaTest reports everything (both assertion failures and unexpected errors) as failures.
* JUnit and ScalaTest support ignored tests. ScalaTest and specs2 support a notion of pending tests. ScalaTest differentiates between ignored and
* canceled tests, whereas specs2 only supports skipped tests, which are implemented like ScalaTest's canceled tests. TestNG uses "skipped" to report tests
* that were not executed because of failures in dependencies, which is also similar to canceled tests in ScalaTest.
* </p>
*/
public enum Status {
/**
* Indicates a test succeeded.
*/
Success,
/**
* Indicates an "error" occurred.
*/
Error,
/**
* Indicates a "failure" occurred.
*/
Failure,
/**
* Indicates a test was skipped.
*/
Skipped,
/**
* Indicates a test was ignored.
*/
Ignored,
/**
* Indicates a test was canceled.
*/
Canceled,
/**
* Indicates a test was declared as pending.
*/
Pending
}