1

Basically I want to derive the percentage of the rule execution which has been actually covered by the unit tests written around them. Suggestions would be really helpful.

Suraj Kumar
  • 5,547
  • 8
  • 20
  • 42

2 Answers2

0

You could use a RuleRuntime Listener or AgendaListener to register the name of rule fire, or activations scheduled or retracted etc. Then, compared to the list of actual Rules from KiePackage(s) from the KieBase, one could derive metrics which address your original question.

As no code was supplied with the original Question, I can only provide a generic answer, but I hope this helps!

tarilabs
  • 2,178
  • 2
  • 15
  • 23
  • Thanks for your immediate response . Could you provide me with a code snipet regarding how to derive the metrics by comparing with the actual rules ? – M.R. Prashanth Feb 08 '19 at 03:50
0

Could you try droolsassert activation report? You'll get percentage of rules triggered by the test. It works based on AgendaListener but all gory details is hidden from you.

Mike
  • 20,010
  • 25
  • 97
  • 140