back to index     prev     next  

0.3 Results

This section describes, how to format the Results of the tests.

What is a Result ?

In this API, the result concept is two things :

What we don't use a real logger API ?

The problem with a real logger (like log4J) is we don't have the notion of results.

In the TestSuite APi we decide to split logs of the program and results.

Structure of Results classes in TestSuite

There is a super-class abstract : AbstractResult where there is the bare essentials to specify a Result :

There are two classes who implements this abstract class :

Results Structure

AbstractResult is only abstract to make generic formating, so TestResult can print itself like a Java String and a XML node. BenchmarkResult add a time result to print.

How to export results

In TestSuite API, the results are stocked in ResultsCollection, there are two classes who contains a ResultCollection :

These classes implements the ResultsExporter interface. After the execution of your Manager you can choose where and how to print results :

yourManager.toXXX();

Where toXXX() is :

About the Manager Verbatim option

In Manager you can modify this by :

yourManager.setVerbatim(true/false)

If Verbatim value is :

By default Verbatim is at false

This option has no effect on XML and HTML exports.

To see the value of Verbatim :

yourManager.isVerbatim()

By the file configurator

See the configuration file part for more details to configure results output by the file descriptor.

Format Results like you want

If you export your results in a XML DOM tree, with toXML() method, you can use XSLT to create new formats.