Spring Boot testing

Hello everyone,

I am trying to add unit test following this link
https://docs.camunda.org/manual/7.8/user-guide/spring-framework-integration/testing/

I get this error:
Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1500b2f3] to prepare test instance [com.logate.sber.unit.camunda.MyBusinessProcessTest@7eecb5b8]
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: java.io.FileNotFoundException: class path resource [org/camunda/bpm/engine/spring/test/junit4/springTypicalUsageTest-context.xml] cannot be opened because it does not exist .

I assume this is caused by @ContextConfiguration(“classpath:org/camunda/bpm/engine/spring/test/junit4/springTypicalUsageTest-context.xml”)
but I am not sure.
Can anyone help me configuring simple unit test example?

Thank you in advance

Here’s an example project that uses the Camunda Spring Boot Starter and contains an example test case: https://github.com/camunda-consulting/camunda-starter-projects/tree/master/camunda-starter-spring-boot

Cheers,
Thorben

1 Like

Unfortunately, the link is not active anymore.

@tunch refer this example might be helpful for you

1 Like

Hi @tunch,

you can also have a look at the Camunda examples repository, specifically this Camunda Spring Boot Starter example:

Best,
Tobias

1 Like