Actually during functional testing we want to test our service which in turn
calls rules and we want to test the service with changing rules. But we do not
want to change the rules in Guvnor rather we want to somehow mock it. Means
depending on our tests we want to use different modified rules. For this if we
can mock the session or guvnor or somehow so that we session can return the
mocked fact depending on our test.
Thank you
Santhosh Hegde A
From: Stephen Masters [via Drools]
[mailto:ml-node+s46999n4030608...@n3.nabble.com]
Sent: Friday, August 08, 2014 9:10 PM
To: Ajekar, Santhosh Hegde (HP-IT)
Subject: Re: [rules-users] Mocking Guvnor
Possibly also worth pointing out that inserting a fact and executing a session
do not connect to Guvnor anyway?
Although, as Mike mentions, the simplest approach tends to be to create a
service which wraps knowledge base access and mock that. Although you could
also mock the session.
Although, I must admit I’m not sure what question is being asked...
Steve
On 8 Aug 2014, at 13:07, Michael Anstis <[hidden
email]</user/SendEmail.jtp?type=node&node=4030608&i=0>> wrote:
I assume you have a service encapsulating your use of Drools?
Why not mock this service to use an implementation that returns what you need?
On 8 August 2014 03:13, san_hegde <[hidden
email]</user/SendEmail.jtp?type=node&node=4030608&i=1>> wrote:
Hi ,
We have requirement where in during functional testing we do not want to
connect to Guvnor rather want to mock it.
For example mocking could be like this.
We send Fact object as input during calling
knowledgeSession.execute() method and in rule we update the result in that fact
object itself. So here can we mock the output fact object, so that during
functional testing we no need to connect to Guvnor rather mocked result fact
object is returned.
Thank you
Santhosh Hegde A
________________________________
View this message in context: Mocking
Guvnor<http://drools.46999.n3.nabble.com/Mocking-Guvnor-tp4030601.html>
Sent from the Drools: User forum mailing list
archive<http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html> at
Nabble.com<http://Nabble.com>.
_______________________________________________
rules-users mailing list
[hidden email]</user/SendEmail.jtp?type=node&node=4030608&i=2>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[hidden email]</user/SendEmail.jtp?type=node&node=4030608&i=3>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[hidden email]</user/SendEmail.jtp?type=node&node=4030608&i=4>
https://lists.jboss.org/mailman/listinfo/rules-users
________________________________
If you reply to this email, your message will be added to the discussion below:
http://drools.46999.n3.nabble.com/Mocking-Guvnor-tp4030601p4030608.html
To start a new topic under Drools: User forum, email
ml-node+s46999n4700...@n3.nabble.com<mailto:ml-node+s46999n4700...@n3.nabble.com>
To unsubscribe from Drools: User forum, click
here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=47000&code=c2FudGhvc2guaGVnZGVAaHAuY29tfDQ3MDAwfC00NDQzMTAxMzA=>.
NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context:
http://drools.46999.n3.nabble.com/Mocking-Guvnor-tp4030601p4030609.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users