Have tried the example of ProcessTestCoverage where @Rule with ProcessEngineRule should leave a HTML file in target/process_test_coverage folder. It was mentioned that camunda.cfg.xml should be there
Method we followed- we want to avoid XML based configuration and JUNIT uses @SpringBootTest so autowiring of ProcessEngine can be done and the below is the code sample.
@SpringBootTest(classes=Application.class)
@ActiveProfiles(“test”)
@RunWith(SpringRunner.class)
public class FlowTest_3 {
@Autowired
ProcessEngine engine;
@Rule
public ProcessEngineRule rule=new ProcessEngineRule(engine);
}
Even used camunda.cfg.xml file as shown below.
<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="databaseSchemaUpdate" value="true" />
</bean>
</beans>
When i use autowired processengine(With out enginerule and cfg.xml) it asserts but when i uncomment and uses the cfg.xml and engine rule it says assertion failed. I dont understand this behavior.
Considering beginners is there any self-enrollment course ? Can the XML config be avoided in spring-boot approach ? For now i removed cfg.xml but to generate HTML files in target folder i need to use ProcessEngineRule(which in-turn searches for cfg.xml). can anyone help me with this issue? Thanks in advance.