Red Hat Bugzilla – Bug 1304968
Not possible to use Stateless session in Test Scenarios
Last modified: 2016-07-31 21:11:48 EDT
Description of problem:
I have inspected the internal classes responsible for actual execution of Test Scenarios and noticed that whenever it is necessary to create a KieSession only Stateful will be created. So supplying a Stateless KieSession is simply not allowed - it will fail with this error message:
Test scenario runner could not find a stateful knowledge session with the name 'defaultSession'.
Version-Release number of selected component (if applicable):
BPM Suite 6.2.0
Steps to Reproduce:
1. Define Stateless session in business-central or directly in kmodule.xml
2. Configure Test Scenario with it
3. Run it
Test Scenarios can be configured only with Stateful session.
Test Scenarios can be configured with both, Stateful and Stateless sessions
Only Stateful is created
This is because the test scenarios can only be used with stateful sessions. Workaround is to make a stateful session for testing, but this is not ideal because then your not testing with the session that is used in production.