Is it possible to autoload process definitions in the test class path?

I was wondering if it is possible to load process definitions in the test classpath or if the auto-loading mechanism will automatically will pick up the resources from a path in the test path?
Currently trying to create a deployment by configuring the process engine bean in a test configuration class results in an error:

public RepositoryService repositoryService(ProcessEngine processEngine) {
    // Load bpmn from the test classes
    return processEngine.getRepositoryService();

The preferred method is to use @Deployment and either name the test process appropriately or use a resource argument to specify the process under test.
Here are the docs

Some notes,

  • the class loader usually puts the contents of the resources folder
  • you need execute .deploy() to get the process deployed to the engine

If you are using Spring Boot then the auto loading mechanism for production is the same for the tests.

By default Spring Boot configured Engine would try to load all process definitions from the processes/ directory (both from the test and production paths).

For specific tests of course the answer from @wwitt stands

I am using springboot and I added processes to my src/test/resources/processes however when I query for deployments:

List<Deployment> deploymentList = repositoryService.createDeploymentQuery().list();

I get a 0 count.

That should work indeed …
How are you configuring your test? Can you paste more of the full unit test so we can reproduce?