Annotation Type BeforeAllTests
A procedure with this annotation ought to give some indication that it has successfully completed its assigned set-up tasks, such as by writing a message to that effect to the console.
A procedure with this annotation should be public but not static. It will
run before any procedures annotated BeforeEachTest
, Test
,
AfterEachTest
or AfterAllTests
. That is guaranteed because
I have written tests for this in the test class for TestRunner
.
One test class may have more than one procedure annotated
@BeforeAllTests
. I make no guarantees as to what order multiple
procedures with this annotation will run in, other that they won't run after
procedures with the other annotations from this package unless they are
explicitly called directly. Nor do I make any promises that later releases of
this framework will behave in the same way with multiple annotations of this
kind in the same test class.
For that reason, if a test class has multiple annotations of this kind, they should not depend on each other to run in any particular order.
In any case it's preferable for a test class to only have one procedure with this annotation, if any. Such a procedure may make calls to private helper procedures.
You may use any identifier the compiler allows, but it's recommended that
it be something that clearly indicates what the procedure does, such as
setUpClass()
.
- Since:
- 1.0
- Author:
- Alonso del Arte