<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title>Re: [rules-users] Existing Test Harnesses for Drools?</title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 12.04.2011 14:46, John Peterson wrote:
<blockquote
cite="mid:ECB1508FB86BEF47A7A8256EF9FFD8D401A787@WPSDGQFS.OPR.STATEFARM.ORG"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font face="Calibri" size="2"><span style="font-size: 11pt;">
<div>I was wondering if anyone out there is aware of any Test
Harnesses that could be used for regression testing Drools
applications out there? </div>
<div> </div>
<div>We found this spreadsheet tester from Michael Neale:</div>
<div><font face="Times New Roman"><a moz-do-not-send="true"
href="https://github.com/michaelneale/rule-spreadsheet-tester/#readme"><font
color="blue" face="Calibri"><u>https://github.com/michaelneale/rule-spreadsheet-tester/#readme</u></font></a></font></div>
<div><font face="Times New Roman"> </font></div>
<div>Are there any others?</div>
</span></font></blockquote>
<br>
Hi John, hi all,<br>
<br>
we used a similar approach (Excel) for some time, but dropped it
well over a year ago because it's very hard to maintain. We're now
using plain Java tests to load *.drl files and run a plethora of
tiny unit tests against individual rules. A few larger tests load
most of our rules and execute integration test scenarios.<br>
<br>
Regarding maintainability: we're using a pojo based fact model to
represent our knowledge which needs to be changed from time to time,
driven by new features. This is easier if tests are in Java than if
they were Excel. Excel cannot be diffed or merged easily, as it is a
binary format. Besides, you normally cannot use the search
function(s) provided by modern IDEs to search inside Excel files.
Plus you have code completion to code your test setup and the
assertions if using Java-based tests.<br>
<br>
We do have our own (internal) test harness, which is basically a set
of reusable test superclasses and helpers. I heard rumors from our
legal dept. that it would be okay to open-source it one day, but due
to lack of time nobody ever really did.<br>
<br>
If you want to follow this road, let me know. Maybe I can provide
some more insights and/or code examples.<br>
<br>
That said, I think Excel-based tests might be okay in scenarios
where the underlying fact model does not change frequently. For us,
they have proven too heavy to maintain.<br>
<br>
Best regards<br>
<br>
Ansgar<br>
<br>
<blockquote
cite="mid:ECB1508FB86BEF47A7A8256EF9FFD8D401A787@WPSDGQFS.OPR.STATEFARM.ORG"
type="cite"><font face="Calibri" size="2"><span style="font-size:
11pt;">
<div> </div>
<div>Thanks!</div>
<div><font face="Times New Roman"> </font></div>
</span></font>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>