Re: In html report how can I display Class names.

Kazuhito SUGURI <[email protected]>
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.