Search in sources :

Example 21 with JMeterTransactions

use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.

the class RespTimeNthPercentileTestTest method testExecuteAllTransactionsPass.

@Test
public void testExecuteAllTransactionsPass() {
    RespTimeNthPercentileTest test = new RespTimeNthPercentileTest("Test #1", "nthPercRespTimeTest", "Verify 90th percentile", null, 90, 246);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    jmeterTransactions.add(LOGIN_121_SUCCESS);
    jmeterTransactions.add(LOGIN_125_SUCCESS);
    jmeterTransactions.add(SEARCH_129_SUCCESS);
    jmeterTransactions.add(SEARCH_135_SUCCESS);
    jmeterTransactions.add(SEARCH_143_SUCCESS);
    jmeterTransactions.add(SEARCH_148_SUCCESS);
    jmeterTransactions.add(SEARCH_178_SUCCESS);
    jmeterTransactions.add(SEARCH_198_SUCCESS);
    jmeterTransactions.add(SEARCH_221_SUCCESS);
    jmeterTransactions.add(SEARCH_249_SUCCESS);
    test.execute(jmeterTransactions);
    assertThat(test.getResult(), is(equalTo(TestResult.PASS)));
}
Also used : JMeterTransactions(uk.co.automatictester.lightning.data.JMeterTransactions) Test(org.testng.annotations.Test)

Example 22 with JMeterTransactions

use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.

the class RespTimeNthPercentileTestTest method testExecutePassOnNonDefaultLocale.

@Test
public void testExecutePassOnNonDefaultLocale() {
    Locale.setDefault(Locale.FRENCH);
    RespTimeNthPercentileTest test = new RespTimeNthPercentileTest("Test #1", "nthPercRespTimeTest", "Verify 90th percentile", "Search", 90, 246);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    jmeterTransactions.add(SEARCH_121_SUCCESS);
    jmeterTransactions.add(SEARCH_125_SUCCESS);
    jmeterTransactions.add(SEARCH_129_SUCCESS);
    jmeterTransactions.add(SEARCH_135_SUCCESS);
    jmeterTransactions.add(SEARCH_143_SUCCESS);
    jmeterTransactions.add(SEARCH_148_SUCCESS);
    jmeterTransactions.add(SEARCH_178_SUCCESS);
    jmeterTransactions.add(SEARCH_198_SUCCESS);
    jmeterTransactions.add(SEARCH_221_SUCCESS);
    jmeterTransactions.add(SEARCH_249_SUCCESS);
    test.execute(jmeterTransactions);
    assertThat(test.getResult(), is(equalTo(TestResult.PASS)));
}
Also used : JMeterTransactions(uk.co.automatictester.lightning.data.JMeterTransactions) Test(org.testng.annotations.Test)

Example 23 with JMeterTransactions

use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.

the class RespTimeMedianTestTest method testExecutePass.

@Test
public void testExecutePass() {
    RespTimeMedianTest test = new RespTimeMedianTest("Test #1", "medianRespTimeTest", "Verify median", "Search", 145);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    jmeterTransactions.add(SEARCH_121_SUCCESS);
    jmeterTransactions.add(SEARCH_125_SUCCESS);
    jmeterTransactions.add(SEARCH_129_SUCCESS);
    jmeterTransactions.add(SEARCH_135_SUCCESS);
    jmeterTransactions.add(SEARCH_143_SUCCESS);
    jmeterTransactions.add(SEARCH_148_SUCCESS);
    jmeterTransactions.add(SEARCH_178_SUCCESS);
    jmeterTransactions.add(SEARCH_198_SUCCESS);
    jmeterTransactions.add(SEARCH_221_SUCCESS);
    jmeterTransactions.add(SEARCH_249_SUCCESS);
    test.execute(jmeterTransactions);
    assertThat(test.getResult(), is(equalTo(TestResult.PASS)));
}
Also used : JMeterTransactions(uk.co.automatictester.lightning.data.JMeterTransactions) Test(org.testng.annotations.Test)

Example 24 with JMeterTransactions

use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.

the class RespTimeNthPercentileTestTest method testExecuteError.

@Test
public void testExecuteError() {
    RespTimeNthPercentileTest test = new RespTimeNthPercentileTest("Test #1", "nthPercRespTimeTest", "Verify 90th percentile", "Search", -90, 9);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    jmeterTransactions.add(SEARCH_143_SUCCESS);
    test.execute(jmeterTransactions);
    assertThat(test.getResult(), is(equalTo(TestResult.ERROR)));
}
Also used : JMeterTransactions(uk.co.automatictester.lightning.data.JMeterTransactions) Test(org.testng.annotations.Test)

Example 25 with JMeterTransactions

use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.

the class RespTimeStdDevTestTest method verifyExecuteError.

@Test
public void verifyExecuteError() {
    RespTimeStdDevTest test = new RespTimeStdDevTest("Test #1", "respTimeStdDevTest", "Verify standard deviance", "nonexistent", 8);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    jmeterTransactions.add(LOGIN_198_SUCCESS);
    test.execute(jmeterTransactions);
    assertThat(test.getResult(), is(equalTo(TestResult.ERROR)));
}
Also used : JMeterTransactions(uk.co.automatictester.lightning.data.JMeterTransactions) Test(org.testng.annotations.Test)

Aggregations

JMeterTransactions (uk.co.automatictester.lightning.data.JMeterTransactions)67 Test (org.testng.annotations.Test)58 DescriptiveStatistics (org.apache.commons.math3.stat.descriptive.DescriptiveStatistics)5 ClientSideTest (uk.co.automatictester.lightning.tests.ClientSideTest)5 PassedTransactionsTest (uk.co.automatictester.lightning.tests.PassedTransactionsTest)5 ServerSideTest (uk.co.automatictester.lightning.tests.ServerSideTest)5 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)3 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 CSVFileIOException (uk.co.automatictester.lightning.exceptions.CSVFileIOException)2 CSVFileNoTransactionsException (uk.co.automatictester.lightning.exceptions.CSVFileNoTransactionsException)2 RespTimeAvgTest (uk.co.automatictester.lightning.tests.RespTimeAvgTest)2 Percent (uk.co.automatictester.lightning.utils.Percent)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 FileReader (java.io.FileReader)1 InputStreamReader (java.io.InputStreamReader)1 Percentile (org.apache.commons.math3.stat.descriptive.rank.Percentile)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1 IntToOrdConverter (uk.co.automatictester.lightning.utils.IntToOrdConverter)1