[rules-users] junit tests for drools rules

Radhakrishnan Meiappan rmeiappan at datacert.com
Tue Apr 13 17:18:23 EDT 2010


I made some progress on this today. I found that when I removed
'ruleflowgroup' from the .drl file, my unit tests were executing the
rules. 

 

Does anyone know how to make the unit tests aware of 'ruleflowgroup' ?

 

Thanks

 

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Esteban
Aliverti
Sent: Tuesday, April 13, 2010 8:59 AM
To: Rules Users List
Subject: Re: [rules-users] junit tests for drools rules

 

Can you add some code snippet or your test case? It shouldn't be any
problem modifying a Fact inside a rule's action.

2010/4/13 Radhakrishnan Meiappan <rmeiappan at datacert.com>

I'm trying to test some rules from a junit test. Inside the rule the
fact is modified. 

 

The fact is setup so that it matches the then condition in the rule, but
still my asserts are failing in my test. 

 

How do I get the fact back from the session, after the rules are fired. 

 

Can someone point me to a link that has samples for testing a rule from
a junit test. Its hard to find. 

 

Thanks

RK.


_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




-- 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100413/c4699b39/attachment.html 


More information about the rules-users mailing list