You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Vincent Massol <vm...@pivolis.com> on 2003/08/07 10:44:31 UTC

RE: Organize the report

Hi Barbara,

Do you mean a junit report? Do you mean having several junit reports?

In any case, reporting is separate from the Cactus core, so there is no
reason you cannot achieve what you want.

The real question is which tools are you using:
1- Ant and the Cactus <cactus> task?
2- Maven and the Cactus plugin for Maven?
3- something else?

Tools 1 and 2 already provide reporting out of the box. With 3 you have
to create it yourself.

-Vincent

> -----Original Message-----
> From: Barbara Allori [mailto:ballori@akros.it]
> Sent: 31 July 2003 12:35
> To: cactus-user@jakarta.apache.org
> Subject: Organize the report
> 
> Hi,
> 
> 	I'm trying to create a report for my cactus's test and I'd like
to
> organize the report grouping it by package.
> 
> For example if I have this packages:
> 
> 1) tools with this class test: TestTools1, TestTools2
> 2) utility with this class test: TestUtility1,TestUtility2
> 3) base with this class test: TestBase1,TestBase2
> 
> I'd like the report being in this way:
> 
> Package
> tools
> 
> Test
> TestTools1
> TestTools2
> 
> Package
> utility
> 
> Test
> TestUtility1
> TestUtility2
> 
> Package
> base
> 
> Test
> TestBase1
> TestBase2
> 
> 
> Is it possible?
> 
> Regards,
> Barbara
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



RE: Organize the report

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Barbara,

I fail to see what's the link with Cactus. What you are showing is pure
JUnit AFAICS.

I cannot help you much as I haven't done what you're looking for. I'd
suggest reading the doc for the junitreport task to see if it supports
what you want. If you cannot find it, I'd suggest you send an email to
the 
junit@yahoogroups.com mailing list (it's the JUnit mailing list). They
have an excellent support for answering questions.

In any case, I'd recommend using <batchtest> instead of <test> for the
<junit> task. That will allow you to execute several <junit> tasks, one
for each package. Then calling several times <junitreport> will give you
the expected result.

Thanks
-Vincent

-----Original Message-----
From: Barbara Allori [mailto:ballori@akros.it] 
Sent: 07 August 2003 16:08
To: Cactus Users List
Subject: RE: Organize the report

Hi Vincent,

I mean a junit report and I'm using Ant and <junit> task in this way:

.....
<target name="test" depends="check.properties">
        <mkdir dir="${report}"/>
        <junit printsummary="yes" fork="yes" haltonfailure="yes">
        <classpath>
                <path refid="project.class.test.path"/>
                <pathelement location="${java.class.path}"/>
        </classpath>
        <formatter type="xml"/>
        <test name="test.SuiteStart" haltonfailure="no"
todir="${report}" outfile="JUnit-Report"/>
        </junit>
</target>

<target name="jrep" depends="test">
        <mkdir dir="${report}/html"/>
        <junitreport todir="${report}/html">
                <fileset dir="${report}">
                <include name="JUnit-*.xml"/>
        </fileset>
        <report format="noframes" todir="${report}/html"/>
        </junitreport>
</target>


and SuiteStart is like:

.....
TestSuite suite = new TestSuite("Junit Tests");
suite.addTest(tools.TestTools1.suite());
suite.addTest(tools.TestTools2.suite());
suite.addTest(utility.TestUtility1.suite());
suite.addTest(utility.TestUtility2.suite());
....
return suite;

So, I'd like to organize the report grouping it by package, but I it's
possible if in the xml report I have only the name of the test case?


At 10.44 07/08/2003 +0200, you wrote:

Hi Barbara,

Do you mean a junit report? Do you mean having several junit reports?

In any case, reporting is separate from the Cactus core, so there is no
reason you cannot achieve what you want.

The real question is which tools are you using:
1- Ant and the Cactus <cactus> task?
2- Maven and the Cactus plugin for Maven?
3- something else?

Tools 1 and 2 already provide reporting out of the box. With 3 you have
to create it yourself.

-Vincent

> -----Original Message-----
> From: Barbara Allori [mailto:ballori@akros.it]
> Sent: 31 July 2003 12:35
> To: cactus-user@jakarta.apache.org
> Subject: Organize the report
> 
> Hi,
> 
>       I'm trying to create a report for my cactus's test and I'd like
to
> organize the report grouping it by package.
> 
> For example if I have this packages:
> 
> 1) tools with this class test: TestTools1, TestTools2
> 2) utility with this class test: TestUtility1,TestUtility2
> 3) base with this class test: TestBase1,TestBase2
> 
> I'd like the report being in this way:
> 
> Package
> tools
> 
> Test
> TestTools1
> TestTools2
> 
> Package
> utility
> 
> Test
> TestUtility1
> TestUtility2
> 
> Package
> base
> 
> Test
> TestBase1
> TestBase2
> 
> 
> Is it possible?
> 
> Regards,
> Barbara
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



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


RE: Organize the report

Posted by Barbara Allori <ba...@akros.it>.
Hi Vincent,

I mean a junit report and I'm using Ant and <junit> task in this way:

.....
<target name="test" depends="check.properties">
         <mkdir dir="${report}"/>
         <junit printsummary="yes" fork="yes" haltonfailure="yes">
         <classpath>
                 <path refid="project.class.test.path"/>
                 <pathelement location="${java.class.path}"/>
         </classpath>
         <formatter type="xml"/>
         <test name="test.SuiteStart" haltonfailure="no" todir="${report}" 
outfile="JUnit-Report"/>
         </junit>
</target>

<target name="jrep" depends="test">
         <mkdir dir="${report}/html"/>
         <junitreport todir="${report}/html">
                 <fileset dir="${report}">
                 <include name="JUnit-*.xml"/>
         </fileset>
         <report format="noframes" todir="${report}/html"/>
         </junitreport>
</target>


and SuiteStart is like:

.....
TestSuite suite = new TestSuite("Junit Tests");
suite.addTest(tools.TestTools1.suite());
suite.addTest(tools.TestTools2.suite());
suite.addTest(utility.TestUtility1.suite());
suite.addTest(utility.TestUtility2.suite());
....
return suite;

So, I'd like to organize the report grouping it by package, but I it's 
possible if in the xml report I have only the name of the test case?


At 10.44 07/08/2003 +0200, you wrote:
>Hi Barbara,
>
>Do you mean a junit report? Do you mean having several junit reports?
>
>In any case, reporting is separate from the Cactus core, so there is no
>reason you cannot achieve what you want.
>
>The real question is which tools are you using:
>1- Ant and the Cactus <cactus> task?
>2- Maven and the Cactus plugin for Maven?
>3- something else?
>
>Tools 1 and 2 already provide reporting out of the box. With 3 you have
>to create it yourself.
>
>-Vincent
>
> > -----Original Message-----
> > From: Barbara Allori [mailto:ballori@akros.it]
> > Sent: 31 July 2003 12:35
> > To: cactus-user@jakarta.apache.org
> > Subject: Organize the report
> >
> > Hi,
> >
> >       I'm trying to create a report for my cactus's test and I'd like
>to
> > organize the report grouping it by package.
> >
> > For example if I have this packages:
> >
> > 1) tools with this class test: TestTools1, TestTools2
> > 2) utility with this class test: TestUtility1,TestUtility2
> > 3) base with this class test: TestBase1,TestBase2
> >
> > I'd like the report being in this way:
> >
> > Package
> > tools
> >
> > Test
> > TestTools1
> > TestTools2
> >
> > Package
> > utility
> >
> > Test
> > TestUtility1
> > TestUtility2
> >
> > Package
> > base
> >
> > Test
> > TestBase1
> > TestBase2
> >
> >
> > Is it possible?
> >
> > Regards,
> > Barbara
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: cactus-user-help@jakarta.apache.org