use of uk.co.automatictester.lightning.data.PerfMonDataEntries in project lightning by automatictester.
the class ServerSideTestTest method verifyExecute_LessThan_Error.
@Test
public void verifyExecute_LessThan_Error() {
ServerSideTest test = new ServerSideTest("Test #1", "serverSideTest", ServerSideTestType.LESS_THAN, "Verify CPU utilisation", "192.168.0.13 CPU", 10001);
PerfMonDataEntries dataEntries = new PerfMonDataEntries();
dataEntries.add(TestData.CPU_ENTRY_10000);
dataEntries.add(TestData.CPU_ENTRY_10001);
test.execute(dataEntries);
assertThat(test.getResult(), is(equalTo(TestResult.ERROR)));
}
use of uk.co.automatictester.lightning.data.PerfMonDataEntries in project lightning by automatictester.
the class TestSetTest method verifyExecuteServerMethod_1_1_1.
@Test
public void verifyExecuteServerMethod_1_1_1() {
ServerSideTest testA = new ServerSideTest("Test #1", "serverSideTest", ServerSideTestType.LESS_THAN, "Verify CPU utilisation", "192.168.0.12 CPU", 10001);
ServerSideTest testB = new ServerSideTest("Test #2", "serverSideTest", ServerSideTestType.GREATER_THAN, "Verify CPU utilisation", "192.168.0.12 CPU", 10001);
ServerSideTest testC = new ServerSideTest("Test #3", "serverSideTest", ServerSideTestType.GREATER_THAN, "Verify CPU utilisation", "192.168.0.240 CPU", 10001);
PerfMonDataEntries dataEntries = new PerfMonDataEntries();
dataEntries.add(TestData.CPU_ENTRY_10000);
dataEntries.add(TestData.CPU_ENTRY_10001);
List<ServerSideTest> tests = new ArrayList<>();
tests.add(testA);
tests.add(testB);
tests.add(testC);
TestSet testSet = new TestSet(null, tests);
configureStream();
testSet.executeServerSideTests(dataEntries);
revertStream();
assertThat(testSet.getTestCount(), is(3));
assertThat(testSet.getPassCount(), is(1));
assertThat(testSet.getFailCount(), is(1));
assertThat(testSet.getErrorCount(), is(1));
}
Aggregations