use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.
the class RespTimeMedianTestTest method testExecutePassOnNonDefaultLocale.
@Test
public void testExecutePassOnNonDefaultLocale() {
Locale.setDefault(Locale.FRENCH);
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)));
}
use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.
the class RespTimeMedianTestTest method testExecuteAllTransactionsPass.
@Test
public void testExecuteAllTransactionsPass() {
RespTimeMedianTest test = new RespTimeMedianTest("Test #1", "medianRespTimeTest", "Verify median", null, 145);
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)));
}
use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.
the class RespTimeMedianTestTest method testExecuteAllTransactionsFail.
@Test
public void testExecuteAllTransactionsFail() {
RespTimeMedianTest test = new RespTimeMedianTest("Test #1", "medianRespTimeTest", "Verify median", null, 144);
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.FAIL)));
}
use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.
the class PassedTransactionsTestTest method verifyExecuteMethodRegexpPass.
@Test
public void verifyExecuteMethodRegexpPass() {
PassedTransactionsTest test = new PassedTransactionsTest("Test #1", "passedTransactionsTest", "Verify number of passed tests", "Log[a-z]{2,3}", 0);
test.setRegexp(true);
JMeterTransactions jmeterTransactions = new JMeterTransactions();
jmeterTransactions.add(TestData.LOGIN_1000_SUCCESS);
jmeterTransactions.add(TestData.LOGOUT_1000_SUCCESS);
test.execute(jmeterTransactions);
assertThat(test.getResult(), is(equalTo(TestResult.PASS)));
assertThat(test.getActualResultDescription(), containsString("Number of failed transactions = 0"));
}
use of uk.co.automatictester.lightning.data.JMeterTransactions in project lightning by automatictester.
the class RespTimeStdDevTestTest method verifyExecuteAllTransactionsFail.
@Test
public void verifyExecuteAllTransactionsFail() {
RespTimeStdDevTest test = new RespTimeStdDevTest("Test #1", "respTimeStdDevTest", "Verify standard deviance", null, 24);
JMeterTransactions jmeterTransactions = new JMeterTransactions();
jmeterTransactions.add(LOGIN_198_SUCCESS);
jmeterTransactions.add(LOGIN_221_SUCCESS);
jmeterTransactions.add(SEARCH_249_SUCCESS);
test.execute(jmeterTransactions);
assertThat(test.getResult(), is(equalTo(TestResult.FAIL)));
}
Aggregations