Search in sources :

Example 1 with ReportExtactor

use of com.axway.ats.log.report.model.ReportExtactor in project ats-framework by Axway.

the class LogReportMailer method send.

/**
     * Email the report
     */
@PublicAtsApi
public void send() {
    // get runs from log database
    ReportExtactor reportExtactor = new ReportExtactor(dbHost, dbName, dbUser, dbPassword);
    List<RunWrapper> runs = reportExtactor.extract(runIds);
    // format the report
    ReportFormatter reportFormatter = new ReportFormatter(runs, mailSubject, dbHost, dbName, testExplorerWebPort, testExplorerInstanceName);
    // send report by mail
    MailReportSender mailReportSender = new MailReportSender(reportFormatter.getDescription(), reportFormatter.toHtml());
    mailReportSender.send();
}
Also used : ReportExtactor(com.axway.ats.log.report.model.ReportExtactor) RunWrapper(com.axway.ats.log.report.model.RunWrapper) ReportFormatter(com.axway.ats.log.report.model.ReportFormatter) MailReportSender(com.axway.ats.log.report.model.MailReportSender) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

PublicAtsApi (com.axway.ats.common.PublicAtsApi)1 MailReportSender (com.axway.ats.log.report.model.MailReportSender)1 ReportExtactor (com.axway.ats.log.report.model.ReportExtactor)1 ReportFormatter (com.axway.ats.log.report.model.ReportFormatter)1 RunWrapper (com.axway.ats.log.report.model.RunWrapper)1