...
This test will pass.
Section |
---|
Column |
---|
| Panel |
---|
bgColor | #E0E6F8 |
---|
titleColor | #0B0B61 |
---|
titleBGColor | #CED8F6 |
---|
title | @Failure with a description. Error caught by @Test. |
---|
| @Test(expected-error-id: 'FAIL_UNSPECIFIED')
@Failure(description: 'How did this FAILURE happen?')
executeFailure()
{
log(
message: 'Annotated with failure',
log-file-name: 'test_me.log',
log-classifier: 'anyClassifier'
);
}
|
|
|
The result when you run this test:
Section |
---|
Column |
---|
| Code Block |
---|
language | text |
---|
theme | RDark |
---|
title | @Failure properly caught |
---|
| userme > te #executeFailure
Processing [1] tests
class experiment.test_me -------------------------------------------------------
1/1 .executeFailure
Passed P[1]
Tests run: 1, Successes: 1, Time elapsed: 0.178 sec |
|
|
...
This test will pass.
Section |
---|
Column |
---|
| Panel |
---|
bgColor | #E0E6F8 |
---|
titleColor | #0B0B61 |
---|
titleBGColor | #CED8F6 |
---|
title | @Failure without description. Error caught by @Test. |
---|
| @Test(expected-error-id: 'FAIL_UNSPECIFIED')
@Failure
executeFailure()
{
log(
message: 'Annotated with failure',
log-file-name: 'test_me.log',
log-classifier: 'anyClassifier'
);
}
|
|
|
The following test will not pass. It will end with an error.
Section |
---|
Column |
---|
| Panel |
---|
bgColor | #E0E6F8 |
---|
titleColor | #0B0B61 |
---|
titleBGColor | #CED8F6 |
---|
title | @Failure triggers error not caught by @Test |
---|
| @Test
@Failure
executeFailure()
{
log(
message: 'Annotated with failure',
log-file-name: 'test_me.log',
log-classifier: 'anyClassifier'
);
}
|
|
|
Section |
---|
Column |
---|
| Code Block |
---|
| userme > te #executeFailure
Processing [1] tests
class experiment.test_me -------------------------------------------------------
1/1 .executeFailure
FAIL_UNSPECIFIED
Caused an error E[1]
Tests run: 1, Errors: 1, Time elapsed: 0.16 sec |
|
|