コード例 #1
0
  @Test
  public void a_batch_runner_can_be_overridden_using_system_property() throws InitializationError {

    //
    // environmentVariables.setProperty(ThucydidesSystemProperty.THUCYDIDES_BATCH_STRATEGY.getPropertyName(), BatchStrategy.DIVIDE_BY_TEST_COUNT.name());
    environmentVariables.setProperty("thucydides.batch.strategy", "DIVIDE_BY_TEST_COUNT");

    SerenityRunner runner = getTestRunnerUsing(SuccessfulSingleTestScenario.class);

    assertThat(runner.getBatchManager(), instanceOf(TestCountBasedBatchManager.class));
  }
コード例 #2
0
  @Test
  public void a_batch_runner_is_set_by_default() throws InitializationError {
    SerenityRunner runner = getTestRunnerUsing(SuccessfulSingleTestScenario.class);

    assertThat(runner.getBatchManager(), instanceOf(SystemVariableBasedBatchManager.class));
  }