Re: In html report how can I display Class names.
senthil kumar <[email protected]>
| Newsgroups | gmane.comp.jakarta.cactus.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Kazuhito, You are right. I got the class name. Its working fine. But can you just give me a brief idea when I have to use ServletTestSuite instead of TestSuite? Thanks, Senthil. --- Kazuhito SUGURI <[email protected]> wrote: > Hi Senthil, > > In article > <[email protected]>, > Fri, 3 Feb 2006 16:12:39 -0800 (PST), > senthil kumar <[email protected]> wrote: > senthil_cbe> You are right. I modified > senthil_cbe> > org.apache.cactus.internal.server.runner.XMLFormatter#endTest(Test) > senthil_cbe> this to get a class name. But since > these test classes > senthil_cbe> were wrapped into ServletTestCase I am > getting the > senthil_cbe> class name as ServletTestCase. From the > java doc I was > senthil_cbe> not able to identify exactly from where > I can get the > senthil_cbe> original test class name. From testCase > or Test object > senthil_cbe> the suite name or class name returned > is not the > senthil_cbe> original class name. I noticed > senthil_cbe> getWrappedTestClassName() in > senthil_cbe> AbstractWebTestCaller.java will return > the right class > senthil_cbe> name. Is that right? Or could you > please advice me > senthil_cbe> where can I get this class name. > > I guess you are using > org.apache.cactus.ServletTestSuite in your > AllTestSuite#suite() method, right? > If so, could you change that to > junit.framework.TestSuite? > public static Test suite() { > TestSuite suite = new TestSuite(); > suite.addTestSuite(Atest.class); > ... > return suite; > } > By doing so, I believe that > Test.getClass().getName() > in XMLFormatter#endTest(Test) will return the name > of the test class. > > > Regards, > ---- > Kazuhito SUGURI > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [email protected] > For additional commands, e-mail: > [email protected] > >