use of uk.co.automatictester.lightning.readers.PerfMonDataReader 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;
}
}
use of uk.co.automatictester.lightning.readers.PerfMonDataReader 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;
}
}
use of uk.co.automatictester.lightning.readers.PerfMonDataReader in project lightning by automatictester.
the class CliTestRunner method runTests.
private static void runTests() {
long testSetExecStart = System.currentTimeMillis();
File xmlFile = params.verify.getXmlFile();
File jmeterCsvFile = params.verify.getJmeterCsvFile();
File perfmonCsvFile = params.verify.getPerfmonCsvFile();
LightningXMLFileReader xmlFileReader = new LightningXMLFileReader();
xmlFileReader.readTests(xmlFile);
List<ClientSideTest> clientSideTests = xmlFileReader.getClientSideTests();
List<ServerSideTest> serverSideTests = xmlFileReader.getServerSideTests();
testSet = new TestSet(clientSideTests, serverSideTests);
jmeterTransactions = new JMeterCSVFileReader().getTransactions(jmeterCsvFile);
if (params.verify.isPerfmonCsvFileProvided()) {
perfMonDataEntries = new PerfMonDataReader().getDataEntires(perfmonCsvFile);
testSet.executeServerSideTests(perfMonDataEntries);
}
testSet.executeClientSideTests(jmeterTransactions);
testSet.printTestExecutionReport();
new TestSetReporter(testSet).printTestSetExecutionSummaryReport();
long testSetExecEnd = System.currentTimeMillis();
long testExecTime = testSetExecEnd - testSetExecStart;
logger.info("Total execution time: {}ms", testExecTime);
if (testSet.getFailCount() + testSet.getErrorCount() != 0) {
exitCode = 1;
}
}
Aggregations