|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TestExecutionListener
TestExecutionListener defines a listener API for
reacting to test execution events published by the TestContextManager
with which the listener is registered.
Concrete implementations must provide a public no-args
constructor, so that listeners can be instantiated transparently by tools and
configuration mechanisms.
Spring provides the following out-of-the-box implementations:
DependencyInjectionTestExecutionListenerDirtiesContextTestExecutionListenerTransactionalTestExecutionListener
| Method Summary | |
|---|---|
void |
afterTestMethod(TestContext testContext)
Post-processes a test just after execution of the test method in the supplied
test context, for example for tearing down test
fixtures. |
void |
beforeTestMethod(TestContext testContext)
Pre-processes a test just before execution of the test method in the supplied
test context, for example for setting up test
fixtures. |
void |
prepareTestInstance(TestContext testContext)
Prepares the test instance of the supplied
test context, for example for injecting
dependencies. |
| Method Detail |
|---|
void prepareTestInstance(TestContext testContext)
throws Exception
test instance of the supplied
test context, for example for injecting
dependencies.
This method should be called immediately after instantiation but prior to any framework-specific lifecycle callbacks.
testContext - the test context for the test (never null)
Exception - allows any exception to propagate
void beforeTestMethod(TestContext testContext)
throws Exception
test method in the supplied
test context, for example for setting up test
fixtures.
testContext - the test context in which the test method will be
executed (never null)
Exception - allows any exception to propagate
void afterTestMethod(TestContext testContext)
throws Exception
test method in the supplied
test context, for example for tearing down test
fixtures.
testContext - the test context in which the test method was
executed (never null)
Exception - allows any exception to propagate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||