Skip to content

AbstractTestNGSpringContextTests only provides @BeforeClass support, need @BeforeSuite #34622

@snelson-gocognition

Description

@snelson-gocognition

Issue was opened on TestNG side, but this is a Spring specific issue (2019).
testng-team/testng#2191

spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java

Only provides @BeforeClass TestNG support.

I believe this would be better suited as a @BeforeSuite, so that Spring Context can load and initialize for setup that should happen before the entire test suite is running, rather than only once a test class is actually initialized.

I believe setting up the context in @BeforeSuite would provide all of the benefits that are gained from the @BeforeClass

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions