@Rule ProcessEngineRule rule=new ProcessEngineRule() does n’t work and always creates troubles. I have used cfg.xml but no luck and strangely it says nothing on console as well and JUNIT fails as below.
cfg.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processEngineConfiguration" class="org.camunda.bpm.extension.process_test_coverage.junit.rules.ProcessCoverageInMemProcessEngineConfiguration">
<property name="history" value="full" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="false" />
<property name="idGenerator">
<bean class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator"/>
</property>
</bean>
</beans>
I’m facing a new issue everyday and not able to find solutions on forum as well. i humbly request the camunda to include pre-enrolled courses.it is becoming very tough day by day with these strange problems.
JUNIT:
@RunWith(SpringRunner.class)
public class HPath {
@Rule
ProcessEngineRule rule=new ProcessEngineRule();
@Test
@Deployment(resources= {"WorkFlow.bpmn"})
public void testInit() {
ProcessInstance instance=runtimeService().startProcessInstanceByKey("CsWorkFlow");
System.out.println(instance.getId());
assert(instance).isEnded();
}
}
NOTE: Initialization error does n’t appear when processenginerule is commented.