Re: How to the output report genereted by Cactus

Kazuhito SUGURI <[email protected]>
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <[email protected]>
Hi Rakesh,

In article <[email protected]>,
Mon, 19 Jun 2006 20:38:06 +0530,
"rakesh kumar thawait" <[email protected]> wrote: 
rakesh>       I am using jakarta-cactus-13-1.7.2 to test EJB which shows the test
rakesh> result in following form :
rakesh> 
rakesh> 
rakesh>         [image: XML output of ServletTestRunner]
rakesh> 
rakesh>   I need to show the result in following form :
rakesh> 
rakesh>       <?xml version="1.0" encoding="UTF-8" ?>
rakesh>  - <#>      <testsuites>
rakesh>  - <#>            <testsuite name="*TestSampleServlet*" tests="*1*" failures
rakesh> ="*O*" errors="*0*" time="*0.016*">
rakesh>  - <#>            <testcase name="*testSaveToSessionOK*" time="*0.016*"
rakesh> expected="expected value passed in assert method" actual   =   "actual
rakesh> value passed in assert method"/>
rakesh>   </testsuite>
rakesh> </testsuites>
rakesh> 
rakesh> 
rakesh> So that I can translate the output XML into required HTML .XML should
rakesh> contain expected value  and actual value that comes  from  test  method .

It's interesting, but, it's difficult.

AFAIK, TestResult of JUnit framework can collect test information
in test method basis, not in assertion baseis.
Even if information could be collected in assertion basis
by using AOP or other approaches, I think,
"expected" and "actual" tags are not suitable for the testcase element
because a test method could have multiple assertions.

Examinations of necessary information and it's representation format
might be the first step.

Cheer,
----
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.