-
Website
http://software-is-insane.blogspot.com/ -
Original page
http://software-is-insane.blogspot.com/2009/03/how-unit-test-groovy-netbeans.html -
Subscribe
All Comments -
Community
-
Top Commenters
-
cowabunga1984
1 comment · 1 points
-
pstehlik
3 comments · 1 points
-
miti
2 comments · 1 points
-
-
Popular Threads
Also, what is the tag for code? I suck at posting :(
If you are talking about how to include code highlighting in your blog/website, check out http://alexgorbatchev.com/wiki/SyntaxHighlighter
<target name="-init-macrodef-junit">
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<sequential>
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
<batchtest todir="${build.test.results.dir}">
<fileset dir="${build.test.classes.dir}">
<include name="**/*Test.class"/>
<exclude name="**/*$*"/>
</fileset>
</batchtest>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<jvmarg line="${run.jvmargs}"/>
</junit>
</sequential>
</macrodef>
</target>
This way our java tests won't be run twice. Just my two cents
will try that one out.
You can override -init-macrodef-junit the same way you overrided -post-test-run. Your java tests won't run twice in this case.