Search in sources :

Example 26 with JMeterTransactions

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

the class RespTimeStdDevTestTest method verifyExecuteFail.

@Test
public void verifyExecuteFail() {
    RespTimeStdDevTest test = new RespTimeStdDevTest("Test #1", "respTimeStdDevTest", "Verify standard deviance", "Search", 24);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    jmeterTransactions.add(SEARCH_198_SUCCESS);
    jmeterTransactions.add(SEARCH_221_SUCCESS);
    jmeterTransactions.add(SEARCH_249_SUCCESS);
    test.execute(jmeterTransactions);
    assertThat(test.getResult(), is(equalTo(TestResult.FAIL)));
}
Also used : JMeterTransactions(uk.co.automatictester.lightning.data.JMeterTransactions) Test(org.testng.annotations.Test)

Example 27 with JMeterTransactions

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

the class RespTimeStdDevTestTest method verifyExecutePass.

@Test
public void verifyExecutePass() {
    RespTimeStdDevTest test = new RespTimeStdDevTest("Test #1", "respTimeStdDevTest", "Verify standard deviance", "Search", 25);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    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 28 with JMeterTransactions

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

the class RespTimeStdDevTestTest method verifyExecutePassOnNonDefaultLocale.

@Test
public void verifyExecutePassOnNonDefaultLocale() {
    Locale.setDefault(Locale.FRANCE);
    RespTimeStdDevTest test = new RespTimeStdDevTest("Test #1", "respTimeStdDevTest", "Verify standard deviance", "Search", 25);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    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 29 with JMeterTransactions

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

the class RespTimeMaxTestTest method verifyExecutePass.

@Test
public void verifyExecutePass() {
    RespTimeMaxTest test = new RespTimeMaxTest("Test #1", "avgRespTimeTest", "Verify response times", "Search", 800);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    jmeterTransactions.add(TestData.SEARCH_800_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 30 with JMeterTransactions

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

the class RespTimeMaxTestTest method verifyExecuteAllTransactionsPass.

@Test
public void verifyExecuteAllTransactionsPass() {
    RespTimeMaxTest test = new RespTimeMaxTest("Test #1", "avgRespTimeTest", "Verify response times", null, 1000);
    JMeterTransactions jmeterTransactions = new JMeterTransactions();
    jmeterTransactions.add(TestData.SEARCH_800_SUCCESS);
    jmeterTransactions.add(TestData.LOGIN_1000_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)

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