[Anthill-pro] Running unit testcases as part of the build

Eric Minick etm at urbancode.com
Thu Aug 31 11:11:23 CDT 2006


Hi Murali and all,

In Anthill Pro 2.x the main option for managing Junit publishing was to 
run the JUnit report Ant task or maven equivilant, publish the resulting 
reports to the intranet and provide a link to those reports in the email.

The only way to send an email with the results in them, was to utilize 
some heavy scripting 
(http://wiki.urbancode.com/home/JUnit_Report_Script).  As  part of our 
experimentation with  provide better integration with non source 
control  third party tools, essentially rolled these scripts into the 
system, made JUnit results first class objects and provided a 
'publisher' that helps with that.

This makes rolling this kind of information into report templates 
relatively easy. I have a couple other things on my plate, but if you'll 
give me a couple days, I can generate a short tutorial on how to use 
that publisher to send emails with the results of the tests executed in 
the example project.

The key is to let JUnit generate its TEST-something.xml files, and point 
the publisher at the location of those files. It will then gather those 
files and store on them on the server, and also create a short summary 
report available in the Artifacts (soon to be renamed Reports) Tab on 
the Build Life overview.

If you have that going, I should be able to dig up an example email 
template that makes use of that information.

As for when to run it, either approach should work fine. My inclination 
would be to execute the tests as an optional part of your main build. 
That would encourage the developers to run the tests prior to committing 
and that's alwas a good thing.

-- Eric

Murali Mohan wrote:

> Hi All,
>
> With Anthill 3 we can run the junit test cases in 2 ways.
>
> 1. As part of the Maven build by taking adavantage of the <unitTest> 
> tag in project.xml file. or
> 2. By calling them separately by running a commandline or something.
>
> I would like to know which one is a better option? Do you recommend 
> one option over the other?
> Our goal is to publish these results as part of the notifcation eamil. 
> May be just a summary of the results like how many were executed and 
> how many failed etc. with a link which gives all the details.
>
> Can Anithill 3 grab the results in both the cases and publish them?
> In his previous emails Eric suggested that we can use JUnit Report 
> Publisher. Any preconfigured examples would be great. I am sending the 
> question to the list so that if any of you are doing similar stuff 
> could suggest any other better options.
>
> thanks,
> Murali.
>
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro




More information about the Anthill-pro mailing list