public ThucydidesRunner(final Class<?> klass, final WebDriverFactory webDriverFactory, final Configuration configuration) throws InitializationError { this(klass, webDriverFactory, configuration, new BatchManagerProvider(configuration).get() ); }
public boolean shouldExecuteThisTest(int testCount) { return (batchCount > 0) ? shouldExecuteThisTestInCurrentBatch(testCount) : true; }
public void registerTestCase(String testCaseName) { registerTestCaseIfNew(testCaseName); }
private synchronized boolean shouldExecuteThisTestInCurrentBatch(int testCount) { if (!testCaseNumberBatchNumber.containsKey(getCurrentTestCaseNumber())) { addTestCaseToOptimalBatch(); } incTestMethodsSizeInBatch(testCount); return (testCaseNumberBatchNumber.get(getCurrentTestCaseNumber()) == getActualBatchNumber()); }
@Inject public BatchManagerProvider(Configuration configuration){ EnvironmentVariables environmentVariables = configuration.getEnvironmentVariables(); String batchManagerProperty = ThucydidesSystemProperty.THUCYDIDES_BATCH_STRATEGY.from(environmentVariables, BatchStrategy.DIVIDE_EQUALLY.name()); try { batchManager = BatchStrategy.valueOf(batchManagerProperty).instance(environmentVariables); } catch (Exception e) { throw new UnsupportedBatchStrategyException(batchManagerProperty + " is not a supported batch strategy.", e); } }
private void addTestCaseToOptimalBatch() { testCaseNumberBatchNumber.put(getCurrentTestCaseNumber(), getOptimalBatchForNewTestCase()); }
@Override public boolean shouldExecuteThisTest(int testCount) { if (batchCount > 0) { return (testCaseCount.get() % batchCount == getActualBatchNumber()); } else { return true; } }
private synchronized boolean shouldExecuteThisTestInCurrentBatch(int testCount) { if (!testCaseNumberBatchNumber.containsKey(getCurrentTestCaseNumber())) { addTestCaseToOptimalBatch(); } incTestMethodsSizeInBatch(testCount); return (testCaseNumberBatchNumber.get(getCurrentTestCaseNumber()) == getActualBatchNumber()); }
@Inject public BatchManagerProvider(Configuration configuration){ EnvironmentVariables environmentVariables = configuration.getEnvironmentVariables(); String batchManagerProperty = ThucydidesSystemProperty.THUCYDIDES_BATCH_STRATEGY.from(environmentVariables, BatchStrategy.DIVIDE_EQUALLY.name()); try { batchManager = BatchStrategy.valueOf(batchManagerProperty).instance(environmentVariables); } catch (Exception e) { throw new UnsupportedBatchStrategyException(batchManagerProperty + " is not a supported batch strategy.", e); } }
public void registerTestCase(String testCaseName) { registerTestCaseIfNew(testCaseName); }
public boolean shouldExecuteThisTest(int testCount) { return (batchCount > 0) ? shouldExecuteThisTestInCurrentBatch(testCount) : true; }
@Override public boolean shouldExecuteThisTest(int testCount) { if (batchCount > 0) { return (testCaseCount.get() % batchCount == getActualBatchNumber()); } else { return true; } }
private synchronized boolean shouldExecuteThisTestInCurrentBatch(int testCount) { if (!testCaseNumberBatchNumber.containsKey(getCurrentTestCaseNumber())) { addTestCaseToOptimalBatch(); } incTestMethodsSizeInBatch(testCount); return (testCaseNumberBatchNumber.get(getCurrentTestCaseNumber()) == getActualBatchNumber()); }
@Inject public BatchManagerProvider(Configuration configuration){ EnvironmentVariables environmentVariables = configuration.getEnvironmentVariables(); String batchManagerProperty = ThucydidesSystemProperty.THUCYDIDES_BATCH_STRATEGY.from(environmentVariables, BatchStrategy.DIVIDE_EQUALLY.name()); try { batchManager = BatchStrategy.valueOf(batchManagerProperty).instance(environmentVariables); } catch (Exception e) { throw new UnsupportedBatchStrategyException(batchManagerProperty + " is not a supported batch strategy.", e); } }
public void registerTestCase(String testCaseName) { registerTestCaseIfNew(testCaseName); }
public boolean shouldExecuteThisTest(int testCount) { return (batchCount > 0) ? shouldExecuteThisTestInCurrentBatch(testCount) : true; }
@Override public boolean shouldExecuteThisTest(int testCount) { if (batchCount > 0) { return (testCaseCount.get() % batchCount == getActualBatchNumber()); } else { return true; } }
public void registerTestCase(Class<?> klass) { String testCaseName = klass.getName(); registerTestCaseIfNew(testCaseName); }
public void registerTestCase(Class<?> klass) { String testCaseName = klass.getName(); registerTestCaseIfNew(testCaseName); }
public void registerTestCase(Class<?> klass) { String testCaseName = klass.getName(); registerTestCaseIfNew(testCaseName); }