- Launch Maven test in debug mode
mvn -Dmaven.surefire.debug test
- Create a breakpoint in
AbstractRunnerHelper
- package:
org.drools.workbench.screens.scenariosimulation.backend.server.runner
- method:
run
- line: `validateAssertion(scenarioRunnerData.getResults(),scenario);
- In your Java IDE launch debug attaching the Maven process that is listening on port 5005
- Example of configuration in vscode:
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - mvn test",
"request": "attach",
"hostName": "localhost",
"port": "5005"
}
]
}
- Inspect the variable
scenarioRunnerData
results
contains the list of execution testsresults[i].factMappingValue.rawValue
shows the expected valueresults[i].resultValue
shows the actual value
org.drools.scenariosimulation.backend.runner.IndexedScenarioException: #3: null(/home/donato/git/demo/rhdm-qlb-loan/qlb-loan-application-repo/target/test-classes/com/redhat/demo/qlb/loan_application/eligibility-test.scesim)
at org.drools.scenariosimulation.backend.runner.AbstractScenarioRunner.singleRunScenario(AbstractScenarioRunner.java:112)
Lack of dependecy
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-decisiontables</artifactId>
<version>7.30.0.Final-redhat-00003</version>
<scope>test</scope>
</dependency>
Unknown resource type: ResourceType = 'jBPM BPMN2 Language'
Lack of dependecy
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-bpmn2</artifactId>
</dependency>