Package junit.extensions

Examples of junit.extensions.RepeatedTest


        Method[] methods = XPathMarkBenchmarkTest.class.getMethods();
        for(Method m : methods) {
            String fname = m.getName();
            if(fname.startsWith("test")) {
                Test testCase = new XPathMarkBenchmarkTest(fname);
                Test repeatedTest = new RepeatedTest(testCase, ITERATIONS);
                Test timedTest = new TimedTest(repeatedTest, TIMEOUT, true);
                suite.addTest(timedTest);
            }
        }
        return suite;
View Full Code Here



    public static Test suite() {
        TestSuite suite = new TestSuite();
        for (int i = 0; i < 10; i++) {
            suite.addTest(new RepeatedTest(new ScriptMediatorTest("testThreadSafety"), 10));
        }
        return suite;
    }
View Full Code Here

        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }

    public void testActiveRepeatedTest() {
        Test test = new RepeatedTest(createActiveTestSuite(), 5);
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(500, result.runCount());
        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }
View Full Code Here

        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }

    public void testActiveRepeatedTest0() {
        Test test = new RepeatedTest(createActiveTestSuite(), 0);
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(0, result.runCount());
        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }
View Full Code Here

        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }

    public void testActiveRepeatedTest1() {
        Test test = new RepeatedTest(createActiveTestSuite(), 1);
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(100, result.runCount());
        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }
View Full Code Here

        fSuite.addTest(new SuccessTest());
        fSuite.addTest(new SuccessTest());
    }

    public void testRepeatedOnce() {
        Test test = new RepeatedTest(fSuite, 1);
        assertEquals(2, test.countTestCases());
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(2, result.runCount());
    }
View Full Code Here

        test.run(result);
        assertEquals(2, result.runCount());
    }

    public void testRepeatedMoreThanOnce() {
        Test test = new RepeatedTest(fSuite, 3);
        assertEquals(6, test.countTestCases());
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(6, result.runCount());
    }
View Full Code Here

        test.run(result);
        assertEquals(6, result.runCount());
    }

    public void testRepeatedZero() {
        Test test = new RepeatedTest(fSuite, 0);
        assertEquals(0, test.countTestCases());
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(0, result.runCount());
    }
View Full Code Here

        assertEquals(0, result.runCount());
    }

    public void testRepeatedNegative() {
        try {
            new RepeatedTest(fSuite, -1);
        } catch (IllegalArgumentException e) {
            assertTrue(e.getMessage().contains(">="));
            return;
        }
        fail("Should throw an IllegalArgumentException");
View Full Code Here

    assertEquals(0, result.failureCount());
    assertEquals(0, result.errorCount());
  }
 
  public void testActiveRepeatedTest() {   
    Test test= new RepeatedTest(createActiveTestSuite(), 5);
    TestResult result= new TestResult();
    test.run(result);
    assertEquals(500, result.runCount());
    assertEquals(0, result.failureCount());
    assertEquals(0, result.errorCount());
  }
View Full Code Here

TOP

Related Classes of junit.extensions.RepeatedTest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.