Search in sources :

Example 1 with JMeterCSVFileReader

use of uk.co.automatictester.lightning.readers.JMeterCSVFileReader in project lightning by automatictester.

the class LightningTask method runTests.

void runTests() {
    long testSetExecStart = System.currentTimeMillis();
    LightningXMLFileReader xmlFileReader = new LightningXMLFileReader();
    xmlFileReader.readTests(extension.getTestSetXml());
    List<ClientSideTest> clientSideTests = xmlFileReader.getClientSideTests();
    List<ServerSideTest> serverSideTests = xmlFileReader.getServerSideTests();
    testSet = new TestSet(clientSideTests, serverSideTests);
    jmeterTransactions = new JMeterCSVFileReader().getTransactions(extension.getJmeterCsv());
    if (extension.getPerfmonCsv() != null) {
        PerfMonDataEntries perfMonDataEntries = new PerfMonDataReader().getDataEntires(extension.getPerfmonCsv());
        testSet.executeServerSideTests(perfMonDataEntries);
    }
    testSet.executeClientSideTests(jmeterTransactions);
    log(testSet.getTestExecutionReport());
    log(new TestSetReporter(testSet).getTestSetExecutionSummaryReport());
    long testSetExecEnd = System.currentTimeMillis();
    long testExecTime = testSetExecEnd - testSetExecStart;
    log(String.format("Execution time:    %dms", testExecTime));
    if (testSet.getFailCount() + testSet.getErrorCount() != 0) {
        exitCode = 1;
    }
}
Also used : ClientSideTest(uk.co.automatictester.lightning.tests.ClientSideTest) ServerSideTest(uk.co.automatictester.lightning.tests.ServerSideTest) TestSetReporter(uk.co.automatictester.lightning.reporters.TestSetReporter) JMeterCSVFileReader(uk.co.automatictester.lightning.readers.JMeterCSVFileReader) PerfMonDataReader(uk.co.automatictester.lightning.readers.PerfMonDataReader) PerfMonDataEntries(uk.co.automatictester.lightning.data.PerfMonDataEntries) LightningXMLFileReader(uk.co.automatictester.lightning.readers.LightningXMLFileReader) TestSet(uk.co.automatictester.lightning.TestSet)

Example 2 with JMeterCSVFileReader

use of uk.co.automatictester.lightning.readers.JMeterCSVFileReader in project lightning by automatictester.

the class LightningMojo method runTests.

private void runTests() {
    long testSetExecStart = System.currentTimeMillis();
    LightningXMLFileReader xmlFileReader = new LightningXMLFileReader();
    xmlFileReader.readTests(testSetXml);
    List<ClientSideTest> clientSideTests = xmlFileReader.getClientSideTests();
    List<ServerSideTest> serverSideTests = xmlFileReader.getServerSideTests();
    testSet = new TestSet(clientSideTests, serverSideTests);
    jmeterTransactions = new JMeterCSVFileReader().getTransactions(jmeterCsv);
    if (perfmonCsv != null) {
        PerfMonDataEntries perfMonDataEntries = new PerfMonDataReader().getDataEntires(perfmonCsv);
        testSet.executeServerSideTests(perfMonDataEntries);
    }
    testSet.executeClientSideTests(jmeterTransactions);
    log(testSet.getTestExecutionReport());
    log(new TestSetReporter(testSet).getTestSetExecutionSummaryReport());
    long testSetExecEnd = System.currentTimeMillis();
    long testExecTime = testSetExecEnd - testSetExecStart;
    log(String.format("Execution time:    %dms", testExecTime));
    if (testSet.getFailCount() + testSet.getErrorCount() != 0) {
        exitCode = 1;
    }
}
Also used : ClientSideTest(uk.co.automatictester.lightning.tests.ClientSideTest) ServerSideTest(uk.co.automatictester.lightning.tests.ServerSideTest) TestSetReporter(uk.co.automatictester.lightning.reporters.TestSetReporter) JMeterCSVFileReader(uk.co.automatictester.lightning.readers.JMeterCSVFileReader) PerfMonDataReader(uk.co.automatictester.lightning.readers.PerfMonDataReader) PerfMonDataEntries(uk.co.automatictester.lightning.data.PerfMonDataEntries) LightningXMLFileReader(uk.co.automatictester.lightning.readers.LightningXMLFileReader) TestSet(uk.co.automatictester.lightning.TestSet)

Example 3 with JMeterCSVFileReader

use of uk.co.automatictester.lightning.readers.JMeterCSVFileReader in project lightning by automatictester.

the class LightningMojo method runReport.

private void runReport() {
    jmeterTransactions = new JMeterCSVFileReader().getTransactions(jmeterCsv);
    JMeterReporter reporter = new JMeterReporter(jmeterTransactions);
    log(reporter.getJMeterReport());
    if (jmeterTransactions.getFailCount() != 0) {
        exitCode = 1;
    }
}
Also used : JMeterReporter(uk.co.automatictester.lightning.reporters.JMeterReporter) JMeterCSVFileReader(uk.co.automatictester.lightning.readers.JMeterCSVFileReader)

Example 4 with JMeterCSVFileReader

use of uk.co.automatictester.lightning.readers.JMeterCSVFileReader in project lightning by automatictester.

the class LightningTask method runReport.

void runReport() {
    jmeterTransactions = new JMeterCSVFileReader().getTransactions(extension.getJmeterCsv());
    JMeterReporter reporter = new JMeterReporter(jmeterTransactions);
    log(reporter.getJMeterReport());
    if (jmeterTransactions.getFailCount() != 0) {
        exitCode = 1;
    }
}
Also used : JMeterReporter(uk.co.automatictester.lightning.reporters.JMeterReporter) JMeterCSVFileReader(uk.co.automatictester.lightning.readers.JMeterCSVFileReader)

Example 5 with JMeterCSVFileReader

use of uk.co.automatictester.lightning.readers.JMeterCSVFileReader in project lightning by automatictester.

the class CliTestRunner method runReport.

private static void runReport() {
    jmeterTransactions = new JMeterCSVFileReader().getTransactions(params.report.getJmeterCsvFile());
    JMeterReporter reporter = new JMeterReporter(jmeterTransactions);
    reporter.printJMeterReport();
    if (jmeterTransactions.getFailCount() != 0) {
        exitCode = 1;
    }
}
Also used : JMeterReporter(uk.co.automatictester.lightning.reporters.JMeterReporter) JMeterCSVFileReader(uk.co.automatictester.lightning.readers.JMeterCSVFileReader)

Aggregations

JMeterCSVFileReader (uk.co.automatictester.lightning.readers.JMeterCSVFileReader)5 JMeterReporter (uk.co.automatictester.lightning.reporters.JMeterReporter)3 TestSet (uk.co.automatictester.lightning.TestSet)2 PerfMonDataEntries (uk.co.automatictester.lightning.data.PerfMonDataEntries)2 LightningXMLFileReader (uk.co.automatictester.lightning.readers.LightningXMLFileReader)2 PerfMonDataReader (uk.co.automatictester.lightning.readers.PerfMonDataReader)2 TestSetReporter (uk.co.automatictester.lightning.reporters.TestSetReporter)2 ClientSideTest (uk.co.automatictester.lightning.tests.ClientSideTest)2 ServerSideTest (uk.co.automatictester.lightning.tests.ServerSideTest)2