-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
OLD Prototype Feedback
Give us your feedback on the current prototype APIs and SPIs!
In current implementation, @Before/@After/@BeforeAll/@AfterAfterAll
are supported.
I believe it is useful to support method/class level annotations that are called only once before/after running all tests, suites, or tags.
In unittest, most of the time, @Before/@BeforeAll...
are good enough. But in integration tests, it is often required to prepare beans shared across all tests. For example, authenticated remote access beans, shared connection pools, selenium drivers, etc.
Ideally, @BeforeAllTests
can be annotated outside of Test classes. If it has to be inside of a test class, it enforces inheriting such parent class in all test classes (and can be done with @BeforeAll
with a initialized
boolean flag).
This may be a bit of challenge for IDEs. If it is annotated outside of the test class, when user chose a test method to run from IDE(right click and run), it has to detect corresponding @BeforeAllTests
methods to call (or give selection box to the user).
In addition to annotations, if @BeforeAllTests
methods can populate test context (such as EngineExecutionContext
), it would be nice to provide dependency injection for populated objects into test instances or method argument resolution.
It is getting overlapping with spring DI, but would be useful for tests to be a single independent class(POJO) rather than inheriting common parent class.
- @ttddyy