-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Closed
Copy link
Labels
in: testIssues in the test moduleIssues in the test modulestatus: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement
Description
Stepan Koltsov opened SPR-8710 and commented
Status Quo
AFAIU currently test initialization and finalization code must be placed into a test class (not in the application context), so code cannot be easily reused between unrelated test classes.
Proposal
SpringJUnit4ClassRunner
could publish a TestStartedEvent
before each test method and a TestFinishedEvent
after each test in the application context. Listeners to these events could be used to clean caches from the previous test run, recreate database state before a test method, etc.
Issue Links:
- Publish test execution events to the test ApplicationContext [SPR-13916] #18490 Publish TestExecutionListener events to the ApplicationContext under test
- Introduce support for test-scoped beans in the TestContext framework [SPR-14034] #18606 Introduce support for test-scoped beans in the TestContext framework
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test modulestatus: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement