Previous Topic: Custom ReportsNext Topic: Deploy a New Report Generator


Create a New Report Generator

DevTest provides built-in support for custom report generators. The predefined report generators provide output for most situations. However, you can create your own report generator to handle site-specific situations.

Follow these steps:

  1. Create a Java class that extends com.itko.lisa.coordinator.ReportGenerator.

    This class tells DevTest that your class is a custom report.

    public class ReportEventsToFile extends ReportGenerator
    {
     
    }
    
  2. Implement the required getTypeName method.

    This method provides the name that is used to identify the custom report in the Staging Document Editor.

    public String getTypeName()
    {
        return "Report Events To a File";
    }
    
  3. Define the parameters to the report.

    For each item in the Report Attributes section of the Reports tab in the Staging Document Editor. Add a Parameter to the ParameterList for the report.

  4. Initialize the custom report generator object with the ParameterList given.

    When DevTest tries to execute a report, it first creates an instance of the custom class. It then calls the initialize method, passing the ParameterList that was read from the XML of the staging document. DevTest automatically reads and writes the XML representation of report attributes by making each of the Parameter objects in getParameters a child tag of the report XML tag. Each parameter key becomes the tag name and the child text of the tag is the value.

  5. While the test is running, DevTest invokes the pushEvent method for every event you have not filtered.
  6. Implement the finished method.

    When DevTest finishes the test, it invokes this method on your report generator. This invocation is your opportunity to complete your processing, like saving the current document.