spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

Unable to test step inside flow

Open fmbenhassine opened this issue 9 months ago • 4 comments

Discussed in https://github.com/spring-projects/spring-batch/discussions/4518

Originally posted by heitormsilva December 16, 2023 Hi.

I have a configuration like this: job -> step (outerStep) -> flow (outerFlow) -> flow (innerFlow) -> step (innerStep).

I want to run a integration test of the innerStep, but I get a "java.lang.IllegalStateException: No Step found with name: [innerStep]".

If I run the test pointing to outerStep it works.

My test class is annotated with @SpringBootTest and @SpringBatchTest. I'm running the step with: jobLauncherTestUtils.launchStep("innerStep");

How can I call only the innerStep?

fmbenhassine avatar Feb 25 '25 13:02 fmbenhassine