I'm looking for test framework which will perform mutation testing for code written in Drools, i.e. it should check if there're tests that fails when one of the rules is removed from KnowledgeBase. It's needed for confidence that every rule is covered by tests
Asked
Active
Viewed 410 times
3
-
Rerunning the tests after a change should tell you that. Or what "magic" are you referring to? – laune Apr 25 '14 at 11:32
-
I don't want change code and then rerun tests by myself. I'm looking for framework like pitest.org that will work with Drools – Maksim Baishev Apr 25 '14 at 11:48
-
Per my understanding of Drools, the rule files are compiled into Java bytecode, which is added to classpath for the rule engine to use it. So, basically you could you pitest.org for that. Analysing the results may get compilicated though. This is just my two cents, my knowledge on the topic is quite limited. – kaskelotti Apr 25 '14 at 20:49
-
Great! Don't forget to write back here on your results. – kaskelotti Apr 27 '14 at 19:21
-
1UPDATE: as pitest changes byte-code, we decided not to try it on drools, as drools generates it's own byte-code (AFAIK). Instead of this we implemented some kind of mutation test - every time we run test we excluded on rule from activation, and then we checked if some test failed) – Maksim Baishev Dec 03 '14 at 11:28
-
You can add test-scenarios - [link](https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_BPM_Suite/6.1/html/Development_Guide/chap-Using_JBoss_Developer_Studio_to_Create_and_Test_Rules.html) – GauRang Omar Mar 03 '17 at 11:27
1 Answers
0
Try droolsassert. You can specify a 'snapshot' of rules you want to be triggered for predefined scenario.

Mike
- 20,010
- 25
- 97
- 140