You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Francis Galiegue <fg...@one2team.com> on 2009/04/10 14:32:40 UTC

JUnit and summaries?

Hello,

We use ant's <junit> task, and we would like to know, at the end of the run:

* how many tests were run,
* how many have succeeded,
* how many have failed,
* how many have returned an error.

Apart from scanning the ant output itself to count "by hand" (well, using 
perl), is there another way (an extended <junit> task somewhere) that can 
output these results in, say, properties?

Have fun,
-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: JUnit and summaries?

Posted by Francis Galiegue <fg...@one2team.com>.
Le dimanche 12 avril 2009, Martin Gainty a écrit :
> 
> testsgen with junit will create the individual testcases
> javac will compile the testcases for you
> junitreport will use xslt to transform the <accumulated results of> xml 
> to put into html format..
> 

Well, I have come up with a quick solution... Generate an XML report with 
<junitreport>, then <xslt> to apply a stylesheet which sums all tests, 
failures and errors, and then <xmlproperty> on the generated file. It works!

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: JUnit and summaries?

Posted by Martin Gainty <mg...@hotmail.com>.
testsgen with junit will create the individual testcases
javac will compile the testcases for you
junitreport will use xslt to transform the <accumulated results of> xml 
to put into html format..

if you could supply a few Java classes from your package I could wire up a quick harness
for you..

Mit Freundlicher Gruben
Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






> Date: Sat, 11 Apr 2009 20:01:53 +0200
> From: reno.rkcrew@free.fr
> To: user@ant.apache.org
> Subject: Re: JUnit and summaries?
> 
> Francis,
> 
> junitreport merges the xml generated by the junit task so
> why don't you parse the xml files generated by the junitreport task
> to find the things that you want?
> 
> 
> > Le Friday 10 April 2009 21:33:05 supareno, vous avez écrit :
> >   
> >> Francis,
> >>
> >> have a look at
> >>
> >> http://ant.apache.org/manual/OptionalTasks/junitreport.html
> >>
> >> html reports are great!
> >>
> >>     
> >
> > I know about HTML reports, but this is not what I want. We use a nabaztag 
> > rabbit and want to make it tell, at the end of a JUnit run, how many tests 
> > have been run, how many have succeeded and how many have failed.
> >
> > We can already make it squeak if compile fails, if test compile fails, and if 
> > JUnit fails. But we don't have the details of the JUnit failed run. I guess 
> > I'll have to tweak the JUnit source code...
> >
> > Thanks,
> >   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009

Re: JUnit and summaries?

Posted by supareno <re...@free.fr>.
Francis,

junitreport merges the xml generated by the junit task so
why don't you parse the xml files generated by the junitreport task
to find the things that you want?


> Le Friday 10 April 2009 21:33:05 supareno, vous avez écrit :
>   
>> Francis,
>>
>> have a look at
>>
>> http://ant.apache.org/manual/OptionalTasks/junitreport.html
>>
>> html reports are great!
>>
>>     
>
> I know about HTML reports, but this is not what I want. We use a nabaztag 
> rabbit and want to make it tell, at the end of a JUnit run, how many tests 
> have been run, how many have succeeded and how many have failed.
>
> We can already make it squeak if compile fails, if test compile fails, and if 
> JUnit fails. But we don't have the details of the JUnit failed run. I guess 
> I'll have to tweak the JUnit source code...
>
> Thanks,
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: JUnit and summaries?

Posted by Francis Galiegue <fg...@one2team.com>.
Le Friday 10 April 2009 21:33:05 supareno, vous avez écrit :
> Francis,
>
> have a look at
>
> http://ant.apache.org/manual/OptionalTasks/junitreport.html
>
> html reports are great!
>

I know about HTML reports, but this is not what I want. We use a nabaztag 
rabbit and want to make it tell, at the end of a JUnit run, how many tests 
have been run, how many have succeeded and how many have failed.

We can already make it squeak if compile fails, if test compile fails, and if 
JUnit fails. But we don't have the details of the JUnit failed run. I guess 
I'll have to tweak the JUnit source code...

Thanks,
-- 
Francis Galiegue
fge@one2team.com
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
One2team
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: JUnit and summaries?

Posted by supareno <re...@free.fr>.
Francis,

have a look at

http://ant.apache.org/manual/OptionalTasks/junitreport.html

html reports are great!

regards

supareno
> Hello,
>
> We use ant's <junit> task, and we would like to know, at the end of the run:
>
> * how many tests were run,
> * how many have succeeded,
> * how many have failed,
> * how many have returned an error.
>
> Apart from scanning the ant output itself to count "by hand" (well, using 
> perl), is there another way (an extended <junit> task somewhere) that can 
> output these results in, say, properties?
>
> Have fun,
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org