Use the com.alpha.pineapple.report.basichtml.BasicHtmlReportGeneratorImpl to create an instance of the report generator with custom settings:
// create custom root directory File rootDirectory = new File("c:\my-pineapple-reports" ); // create report generator ResultListener generator; generator = BasicHtmlReportGeneratorImpl.getInstance(rootDirectory);
The report generator will:
An alternative way to (re)define the the report root directory is to invoke the method setReportDirectory(..) on the interface ReportGeneratorInfo which is implemented by the report generator:
// create report generator with default settings ResultListener generator = BasicHtmlReportGeneratorImpl.getInstance(); // type cast report generator ReportGeneratorInfo generatorInfo = (ReportGeneratorInfo) generator; // create root directory File rootDirectory = new File("c:\my-pineapple-reports"); // set the root directory generatorInfo.setReportDirectory(generatorInfo);