Search in sources :

Example 6 with TestSuite

use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.

the class TestSuiteTest method testMaxCaseIdLength.

@Test
public void testMaxCaseIdLength() {
    TestSuite testSuite = new TestSuite();
    testSuite.addTest(new TestCase("abc"));
    testSuite.addTest(new TestCase("88888888"));
    testSuite.addTest(new TestCase("abcDEF"));
    testSuite.addTest(new TestCase(""));
    testSuite.addTest(new TestCase("four"));
    assertEquals(8, testSuite.getMaxTestCaseIdLength());
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Test(org.junit.Test)

Example 7 with TestSuite

use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.

the class RegistryTest method testAddTests_testIdFixing.

@Test
public void testAddTests_testIdFixing() {
    TestCase test1 = new TestCase("foo");
    TestCase test2 = new TestCase("foo");
    TestCase test3 = new TestCase("foo");
    registry.addTests(new TestSuite().addTest(test1));
    registry.addTests(new TestSuite().addTest(test2));
    registry.addTests(new TestSuite().addTest(test3));
    assertEquals("foo", test1.getId());
    assertEquals("foo__1", test2.getId());
    assertEquals("foo__2", test3.getId());
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) TestCase(com.hazelcast.simulator.common.TestCase) Test(org.junit.Test)

Example 8 with TestSuite

use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.

the class RegistryTest method testAddTests.

@Test
public void testAddTests() {
    TestSuite testSuite = new TestSuite();
    testSuite.addTest(new TestCase("Test1"));
    testSuite.addTest(new TestCase("Test2"));
    testSuite.addTest(new TestCase("Test3"));
    List<TestData> tests = registry.addTests(testSuite);
    assertEquals(3, tests.size());
    assertEquals(3, registry.testCount());
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) TestCase(com.hazelcast.simulator.common.TestCase) Test(org.junit.Test)

Example 9 with TestSuite

use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.

the class TestSuiteTest method testConstructor.

@Test
public void testConstructor() {
    TestSuite testSuite = new TestSuite();
    assertTrue(testSuite.getTestCaseList().isEmpty());
    assertEquals(0, testSuite.getMaxTestCaseIdLength());
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Test(org.junit.Test)

Example 10 with TestSuite

use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.

the class Runner method run.

public void run() throws Exception {
    prepareClassPathForUploading();
    Coordinator coordinator = newCoordinator();
    try {
        startMembers(coordinator);
        startClients(coordinator);
        TestSuite suite = newTestSuite();
        coordinator.testRun(new RcTestRunOperation(suite));
    } finally {
        coordinator.close();
    }
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Coordinator(com.hazelcast.simulator.coordinator.Coordinator) RcTestRunOperation(com.hazelcast.simulator.coordinator.operations.RcTestRunOperation)

Aggregations

TestSuite (com.hazelcast.simulator.coordinator.TestSuite)12 Test (org.junit.Test)11 TestCase (com.hazelcast.simulator.common.TestCase)4 Coordinator (com.hazelcast.simulator.coordinator.Coordinator)1 RcTestRunOperation (com.hazelcast.simulator.coordinator.operations.RcTestRunOperation)1