Hi David,

Do you mean to replace:

<testcase name="testXXX" [...]

by (for ex):

<testcase name="org.apache.cactus.sample.TestSampleServlet.testXXX"
[...]

?

This is an easy change to make which shouldn't impact anything as the
XML format stays the same. However, I'm still unsure whether it is
really required or not. 

Usually, the best strategy is to use the <cactus> or <junit> tasks with
the nested <batchtest> element. Thus there is normally no need for extra
test suites. Why is the best strategy? Because it using a manual suite
leads to errors: more specifically, very often we forget to add new
tests to the suite and thus these new tests are not run as part of the
build until, much later, we realize mistake...

That said, you pay the price for using <batchtest>. As you should be
forking the test, currently each test is forked leading to more lengthy
tests. This is fixed in Ant CVS HEAD (there is now a new attribute,
forkstyle="once" - see http://stefanbodewig.blogger.de/stories/91862/).

Thus in most cases, the suite that is run is the automatic suite created
by JUnit and it more readable not to display the test names with full
package.

However, I'm happy to be convinced! :-)

Thanks
-Vincent

> -----Original Message-----
> From: David Plass [mailto:[EMAIL PROTECTED]
> Sent: 02 April 2004 16:16
> To: Cactus Users List
> Subject: RE: No class name in result?
> 
> I know what Kim was saying; if you have more than one suite in your
suite,
> knowing the name of the 'top-level' suite doesn't help.  I had the
same
> problem with the <junit> task in ant so I modded it to show
> classname.testname.  I tried the same with Cactus but couldn't get the
> source to compile (and I was too lazy to track down the aspectj tools
and
> get them working with ant so I just gave up).
> 
> Thanks
> --DP
> 
> 
> -----Original Message-----
> From: Vincent Massol [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 02, 2004 7:06 AM
> To: 'Cactus Users List'
> Subject: RE: No class name in result?
> 
> 
> Hi Kim,
> 
> > -----Original Message-----
> > From: Kim N. Jensen [mailto:[EMAIL PROTECTED]
> > Sent: 02 April 2004 13:28
> > To: [EMAIL PROTECTED]
> > Subject: No class name in result?
> >
> >
> >
> >
> >
> > Hi
> > If you are having more Tests that each have similar names, like
> > - ClassA.testMethod123
> > - ClassB.testMethod123
> >
> > Then you cannot tell from the result in which class the
testMethod123
> was
> > run.
> >
> > The result looks like this:
> > <testsuites>
> > <testsuite name="MyServiceTestWrapperServlet" tests="2" failures="0"
> > errors="0" time="2.000">
> >    <testcase name="testMethod123" time="1.000"/>
> >    <testcase name="testMethod123" time="1.000"/>
> >
> >
> > But what you would like to know is the class name.
> > Perhaps something like:
> >
> > <testsuites>
> >    <testsuite name="MyServiceTestWrapperServlet" tests="2"
> failures="0"
> > errors="0" time="2.000">
> >       <testsuite name="ClassA" tests="1" failures="0" errors="0"
> > time="1.000">
> >          <testcase name="testMethod123" time="1.000"/>
> >       <testsuite name="ClassB" tests="1" failures="0" errors="0"
> > time="1.000">
> >          <testcase name="testMethod123" time="1.000"/>
> >
> >
> > Am I missing something here or is this an error in cactus?
> 
> Yes, you're missing something... ;-)
> 
> See the image in
> http://jakarta.apache.org/cactus/integration/integration_browser.html
> 
> The name attribute in <testsuite> is the name of the test class and
the
> name attribute in testcase is the name of the test method. Note that
you
> cannot have 2 tests with the same name in a testcase.
> 
> -Vincent
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to