Search in sources :

Example 1 with RespTimeAvgTest

use of uk.co.automatictester.lightning.tests.RespTimeAvgTest in project lightning by automatictester.

the class TestSetTest method verifyExecuteClientMethod_1_1_1.

@Test
public void verifyExecuteClientMethod_1_1_1() {
    RespTimeAvgTest respTimeAvgTestA = new RespTimeAvgTest("Test #1", "avgRespTimeTest", "", "Login", 4000);
    RespTimeAvgTest respTimeAvgTestB = new RespTimeAvgTest("Test #2", "avgRespTimeTest", "", "Search", 5000);
    RespTimeAvgTest respTimeAvgTestC = new RespTimeAvgTest("Test #3", "avgRespTimeTest", "", "Sear", 1000);
    JMeterTransactions transactions = new JMeterTransactions();
    transactions.add(TestData.LOGIN_3514_SUCCESS);
    transactions.add(TestData.SEARCH_11221_SUCCESS);
    List<ClientSideTest> tests = new ArrayList<>();
    tests.add(respTimeAvgTestA);
    tests.add(respTimeAvgTestB);
    tests.add(respTimeAvgTestC);
    TestSet testSet = new TestSet(tests, null);
    configureStream();
    testSet.executeClientSideTests(transactions);
    revertStream();
    assertThat(testSet.getTestCount(), is(3));
    assertThat(testSet.getPassCount(), is(1));
    assertThat(testSet.getFailCount(), is(1));
    assertThat(testSet.getErrorCount(), is(1));
}
Also used : ClientSideTest(uk.co.automatictester.lightning.tests.ClientSideTest) RespTimeAvgTest(uk.co.automatictester.lightning.tests.RespTimeAvgTest) ArrayList(java.util.ArrayList) JMeterTransactions(uk.co.automatictester.lightning.data.JMeterTransactions) RespTimeAvgTest(uk.co.automatictester.lightning.tests.RespTimeAvgTest) Test(org.testng.annotations.Test) PassedTransactionsTest(uk.co.automatictester.lightning.tests.PassedTransactionsTest) ServerSideTest(uk.co.automatictester.lightning.tests.ServerSideTest) ClientSideTest(uk.co.automatictester.lightning.tests.ClientSideTest)

Aggregations

ArrayList (java.util.ArrayList)1 Test (org.testng.annotations.Test)1 JMeterTransactions (uk.co.automatictester.lightning.data.JMeterTransactions)1 ClientSideTest (uk.co.automatictester.lightning.tests.ClientSideTest)1 PassedTransactionsTest (uk.co.automatictester.lightning.tests.PassedTransactionsTest)1 RespTimeAvgTest (uk.co.automatictester.lightning.tests.RespTimeAvgTest)1 ServerSideTest (uk.co.automatictester.lightning.tests.ServerSideTest)1