I could argue this left and right with my managers ... but in reality when we mention code coverage we mean looking at a report in CI showing lines of code in green or red ... anything short of that is something else<div><br>
</div><div>Thank you very much for the response </div><div>Cheers</div><div>Mike<br><br><div class="gmail_quote">On Mon, Jan 23, 2012 at 10:47 AM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It is highly recommended as &quot;best practice&quot; to have RHS code that<br>
doesn&#39;t contain any branching instructions. Then, executing means full<br>
coverage.<br>
<br>
In case it is necessary to have more complex code I&#39;d not put it into<br>
a RHS anyway (where it isn&#39;t really OO any more) but I&#39;d code it in<br>
Java files and just call from the RHS.<br>
<br>
For the LHS you can also argue that firing proves coverage; although<br>
it won&#39;t be full *expression* logic coverage, due to potentially<br>
skipped subexpressions in disjunctions.<br>
<br>
-W<br>
<div class="im"><br>
<br>
On 23/01/2012, mike &lt;<a href="mailto:mikemps@gmail.com">mikemps@gmail.com</a>&gt; wrote:<br>
&gt; Thank you very much Thomas ... yes, what i need is standard code coverage<br>
&gt; ... my company is all over that metric<br>
&gt;<br>
&gt; cheers<br>
&gt; Mike<br>
&gt;<br>
&gt; 2012/1/23 Swindells, Thomas &lt;<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>&gt;<br>
&gt;<br>
</div>&gt;&gt;  It depends what you are asking for,****<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; If you just want to know what proportion of rules you have written have<br>
&gt;&gt; actually activated then that can be simply achieved by having a<br>
&gt;&gt; AgendaEventListener and using it to ‘tick’ rules off when they have been<br>
</div>&gt;&gt; triggered – the blog entry should have you achieve this.****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; If you actually want to integrate it with standard java code coverage<br>
&gt;&gt; reports then this is a different question and is likely to be much harder,<br>
</div>&gt;&gt; if not impossible, ****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; Thomas****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<br>
&gt;&gt; <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] *On Behalf Of *mike<br>
&gt;&gt; *Sent:* 23 January 2012 14:34<br>
&gt;&gt; *To:* Rules Users List<br>
&gt;&gt;<br>
&gt;&gt; *Subject:* Re: [rules-users] Code Coverage****<br>
&gt;&gt;<br>
&gt;&gt;  ** **<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; Thank you very much ... as far as i know in order to do code coverage i<br>
&gt;&gt; need to instrument the packages i&#39;m interested in covering ... this<br>
</div>&gt;&gt; recommendation doesn&#39;t take me in that direction****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; It is very useful however in showing a way to test rules individually.****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; Thank you****<br>
&gt;&gt;<br>
&gt;&gt; Mike ****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; 2012/1/17 Toni Rikkola &lt;<a href="mailto:toni.rikkola@gmail.com">toni.rikkola@gmail.com</a>&gt;****<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; You need to write the coverage tests for JUnit yourself. Test Scenarios in<br>
</div>&gt;&gt; Guvnor do this, but you can&#39;t use them outside Guvnor. ****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; Test Scenarios get all the rule names for the rules in one package and<br>
</div>&gt;&gt; then compares that list to the rules that fired.****<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; Edson&#39;s blog entry might help you<br>
&gt;&gt; <a href="http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html" target="_blank">http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html</a><br>
</div>&gt;&gt; .****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; Toni****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; On Jan 16, 2012, at 5:49 PM, mike wrote:****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt;  Hi there,****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; I was wondering if its possible to measure code coverage on test running<br>
</div>&gt;&gt; against a set of rules.****<br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; Thank you****<br>
&gt;&gt;<br>
&gt;&gt; Mike****<br>
&gt;&gt;<br>
&gt;&gt;  ****<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
</div>&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users****" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users****</a><br>
&gt;&gt;<br>
&gt;&gt;  ** **<br>
<div class="im">&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
</div>&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users****" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users****</a><br>
&gt;&gt;<br>
&gt;&gt; ** **<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------<br>
<div class="im HOEnZb">&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; **************************************************************************************<br>
&gt;&gt; This message is confidential and intended only for the addressee. If you<br>
&gt;&gt; have received this message in error, please immediately notify the<br>
&gt;&gt; <a href="mailto:postmaster@nds.com">postmaster@nds.com</a> and delete it from your system as well as any copies.<br>
&gt;&gt; The content of e-mails as well as traffic data may be monitored by NDS for<br>
&gt;&gt; employment and security purposes. To protect the environment please do not<br>
&gt;&gt; print this e-mail unless necessary.<br>
&gt;&gt;<br>
&gt;&gt; NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18<br>
&gt;&gt; 4EX, United Kingdom. A company registered in England and Wales. Registered<br>
&gt;&gt; no. 3080780. VAT no. GB 603 8808 40-00<br>
&gt;&gt;<br>
&gt;&gt; **************************************************************************************<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div>