Examples of TestCountBasedBatchManager


Examples of net.thucydides.core.batches.TestCountBasedBatchManager

    testCountInTestCase = Arrays.asList(3, 8, 1, 9, 1, 2, 1);
  }

  @Test
  public void should_keep_a_counter_of_tests_being_executed() {
    TestCountBasedBatchManager batchManager = new TestCountBasedBatchManager(environmentVariables);

    assertThat(batchManager.getCurrentTestCaseNumber(), is(0));

    batchManager.registerTestCase(WhenUseTestCountBasedBatchStrategy.class);

    assertThat(batchManager.getCurrentTestCaseNumber(), is(1));
  }
View Full Code Here

Examples of net.thucydides.core.batches.TestCountBasedBatchManager

    assertThat(batchManager.getCurrentTestCaseNumber(), is(1));
  }

  @Test
  public void by_default_all_tests_should_run() {
    TestCountBasedBatchManager batchManager = new TestCountBasedBatchManager(environmentVariables);

    int executedTests = 0;
    for (int i = 0; i < 50; i++) {
      if (batchManager.shouldExecuteThisTest(i)) {
        executedTests++;
      }
    }

    assertThat(executedTests, is(50));
View Full Code Here

Examples of net.thucydides.core.batches.TestCountBasedBatchManager

    List<List<Integer>> executedTestResults = new ArrayList<List<Integer>>();
    for (int i = 1; i <= 3; i++) {
      MockEnvironmentVariables threadVariables = new MockEnvironmentVariables();
      threadVariables.setProperty("thucydides.batch.count", "3");
      threadVariables.setProperty("thucydides.batch.number", Integer.toString(i));
      TestCountBasedBatchManager batchManager = new TestCountBasedBatchManager(threadVariables);
      List<Integer> executedTests = new ArrayList<Integer>();
      executedTestResults.add(executedTests);
      runPreparedTestCases(batchManager, executedTests);
    }
View Full Code Here

Examples of net.thucydides.core.batches.TestCountBasedBatchManager

   
    for (int i = 1; i <= 3; i++) {
      MockEnvironmentVariables threadVariables = new MockEnvironmentVariables();
      threadVariables.setProperty("thucydides.batch.count", "3");
      threadVariables.setProperty("thucydides.batch.number", Integer.toString(i));
      TestCountBasedBatchManager batchManager = new TestCountBasedBatchManager(threadVariables);
      threads.add(new TestRunnerThread(batchManager));
    }
   
    for(TestRunnerThread thread : threads) {
            thread.start();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.