Replies: 2 comments
-
I'm not sure what you're asking exactly. If you somehow locate Spring integration test classes and "select" them via the There's no need to "pass discovered tests to the Spring context", and you don't need to create the Spring context in your |
Beta Was this translation helpful? Give feedback.
-
I'm trying to implement something like this:
Now I decided to put the launcher in the main() method where I can get the tests and execute them, but still can't get them in the extension. As one of the solutions I came up with is to try replacing the extension with a listener. |
Beta Was this translation helpful? Give feedback.
-
@sbrannen thank you for answering the question.
Now I'm trying to run tests using the Launcher API in a Gradle task with the JavaExec type, which simply runs the main() method.
In the main() method I discover and run the desired tests. The tests themselves use the Spring context through the
@SpringJUnitConfig(SpringConfig.class)
annotation.Is there any way to pass discovered tests to the Spring context?
I tried to create a Spring context with the same configuration in the main() method, but in the end I get two instances of the context.
P.S. I would appreciate any other suggestions for integrating the Launcher API and SpringExtension.
Beta Was this translation helpful? Give feedback.
All reactions