TestingProblem

Hi there. Guys, I wrote a unit test for a process using Junit, BpmnAwareTests, and Zonky Embedded PostgreSQL. When I run the checks separately, like:

BpmnAwareTests.assertThat(processInstance).hasPassed(“StartEvent_1”)
BpmnAwareTests.assertThat(processInstance).hasPassed(“DetermineAmountThresholdTask12”)

they pass, and the test is successful.

But when I run all the test classes, I get the error:

Expecting org.camunda.bpm.engine.impl.persistence.entity.ProcessInstanceWithVariablesImpl@418eed39 to have passed activities [StartEvent_1] at least once, but actually we found that it passed . (Please make sure you have set the history service of the engine to at least ‘activity’ or a higher level before making use of this assertion!)

It says the process was not started, although in the debugger I can see the process running through all the blocks.

What could be the problem?

Hi @Sorw

How do you register the process engine / process engine extension in your unit test?

BR
Michael

Hi, I indicate @Deployment

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.