|
The Spring Framework | |||||||||
| 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
Prepares the 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
Exception - allows any exception to propagate
void beforeTestMethod(TestContext testContext)
throws Exception
Pre-processes a test just before execution of the
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, not null
Exception - allows any exception to propagate
void afterTestMethod(TestContext testContext)
throws Exception
Post-processes a test just after execution of the
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, not null
Exception - allows any exception to propagate
|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||