Rubrique précédente: Custom ReportsRubrique suivante: Deploy a New Report Generator


Create a New Report Generator

The report generators that LISA provide include most of the output required. However, you can create your own report to handle a specific situation. LISA provides built-in support for custom report generators.

To create a report generator:

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

    This class tells LISA 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 LISA 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. LISA 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, LISA invokes the pushEvent method for every event you have not filtered.
  6. Implement the finished method.

    When LISA has finished the test, it invokes this method on your report generator. This invocation is your opportunity to complete your processing, like saving the document that you have been writing.