Issue
I have an interface that wraps the camunda process engine. Now I want to test this wrapper like so
@Test
@Deployment
public void canGetProcessDefinitions() {
List<MyProcessDefinition> processDefinitions =
myProcessEngine.getProcessDefinitions();
Assert.assertEquals(1, processDefinitions.size());
}
I have a file next to my testfile called MyProcessEngineTest.canGetProcessDefinitions.bpmn20
.
Now this test gives me an assertion error 1 != 0, because there is no deployment stored in the database (I checked by debugging into h2).
But if I add the file in my @Before
method with a DeploymentBuilder the test works just fine, with the problem that now my deployment does not get purged after each test.
What am I doing wrong?
Solution
The file name must end on .bpmn20.xml
or .bpmn
, or else it will not be interpreted as BPMN during the deployment.
Answered By - thorben