jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kazuhito SUGURI <suguri.kazuh...@lab.ntt.co.jp>
Subject Re: In html report how can I display Class names.
Date Mon, 06 Feb 2006 08:08:29 GMT
Hi Senthil,

In article <20060204001239.1303.qmail@web51802.mail.yahoo.com>,
Fri, 3 Feb 2006 16:12:39 -0800 (PST),
senthil kumar <senthil_cbe@yahoo.com> 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();
            return suite;
By doing so, I believe that Test.getClass().getName()
in XMLFormatter#endTest(Test) will return the name of the test class.

Kazuhito SUGURI

View raw message