|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented
@Target(value={METHOD,CONSTRUCTOR,TYPE})
@Retention(value=RUNTIME)
public @interface Broken
If you want to mark JUnit tests which does not work for the moment as
"broken" you can use this annotation. The tests will be skipped if you
run JUnit. You can also add a date till when you want to fix this "broken"
test. If the date is reached then the test will fail if it is not fixed
(and the @Broken removed).
Before 1.0.0 this annotation was handled by BrokenAspect. But since 1.0.0
it is handled now by the SmokeRunner class.
You should use this annotation together with @RunWith(SmokeRunner.class),
also for JUnit 3 tests.
You can also use this annotation to mark a method or constructor as
"broken". If assertions are enabled an AssertionError will be thrown if
you call such a broken method. If not only a error message will be logged.
What is the difference to @SkipTestOn?
"Broken" means, the test does not work for the moment and should be
(temporarily) skipped. "SkipTestOn" means, this test is not constructed
for that platform and should be therefore skipped on it.
SkipTestOn| Optional Element Summary | |
|---|---|
String[] |
host
With this attribute you can express that the test is broken for the given host(s). |
String[] |
javaVendor
The test is broken for a special vendor VM? |
String[] |
javaVersion
You want to mark the test as broken on a special version of the VM, e.g. on version "1.6.0_17" because you know that on this version there is a bug that caused your test not to work? |
String[] |
os
Deprecated. use osName() |
String[] |
osArch
The test is broken only for the Intel architecture? |
String[] |
osName
Should a test be skipped on a single platform e.g. for Linux? |
String[] |
osVersion
The test breaks only on a special version of the operating system? |
String[] |
property
You have some tests that are broken if some proxy properties are set? |
String |
since
Use this attribute to mark the begin of the broken area, when it was detected that your JUnit test or method does not work as expected. |
String |
till
Use this attribute till you want the broken JUnit test to be fixed. |
String[] |
user
Does the test break only for user "Bob" and you can't fix it for him at the moment? |
String |
value
You can change the default string to give a reason why the test is marked as "broken". |
String |
why
You can change the default string to give a reason why the test is marked as "broken". |
public abstract String value
public abstract String why
public abstract String since
public abstract String till
public abstract String[] os
{ "Linux", "Mac OS X" } are allowed.
public abstract String[] user
user="bob" to mark it as broken for user
account "bob".
user={"bob", "bill"} to mark the
code as broken for both user.
public abstract String[] osName
{ "Linux", "Mac OS X" } are allowed.
If no operation system is given you will get an IllegalArgumentException.
public abstract String[] osArch
"x86_64" for an
Intel-Mac with 64 bit or multiple platform like
{ "x86_32", "x86_64" } for Intel Mac with 42 or 64 bit.
public abstract String[] osVersion
public abstract String[] host
public abstract String[] javaVersion
public abstract String[] javaVendor
public abstract String[] property
property="proxy.host").
If this property is set (and its value is
not "false") the test will be skipped if this property is set as
system property.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||