Examples of MockEnvironmentVariables


Examples of net.thucydides.core.util.MockEnvironmentVariables

        screenshot1 = FileUtils.readFileToByteArray(screenshot1File);
        screenshot2 = FileUtils.readFileToByteArray(screenshot2File);
        stepFactory = new StepFactory(pages);

        environmentVariables = new MockEnvironmentVariables();
        configuration = new SystemPropertiesConfiguration(environmentVariables);

        stepListener = new BaseStepListener(FirefoxDriver.class, outputDirectory, configuration);
        stepListener.setDriver(driver);
        when(driver.getCurrentUrl()).thenReturn("http://www.google.com");
View Full Code Here

Examples of net.thucydides.core.util.MockEnvironmentVariables


    @Before
    public void createATestableDriverFactory() throws Exception {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        initWebdriverManagers();
        StepEventBus.getEventBus().clearStepFailures();
    }
View Full Code Here

Examples of net.thucydides.core.util.MockEnvironmentVariables

    Configuration configuration;
   
    @Before
    public void initMocksAndClearSystemwideDefaultUrl() {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        configuration = new SystemPropertiesConfiguration(environmentVariables);
    }
View Full Code Here

Examples of net.thucydides.core.util.MockEnvironmentVariables

    SystemPropertiesConfiguration configuration;
    EnvironmentVariables environmentVariables;

    @Before
    public void setupEnvironment() {
        environmentVariables = new MockEnvironmentVariables();
        configuration = new SystemPropertiesConfiguration(environmentVariables);
    }
View Full Code Here

Examples of net.thucydides.core.util.MockEnvironmentVariables

    private WebDriver driver;
    WebDriverFactory factory;

    @Before
    public void setupFactory() {
        environmentVariables = new MockEnvironmentVariables();
        factory = new WebDriverFactory(environmentVariables);
    }
View Full Code Here

Examples of net.thucydides.core.util.MockEnvironmentVariables

        MockitoAnnotations.initMocks(this);

        when(webdriverInstanceFactory.newChromeDriver(any(Capabilities.class))).thenReturn(chromeDriver);
        when(webdriverInstanceFactory.newSafariDriver(any(Capabilities.class))).thenReturn(safariDriver);

        environmentVariables = new MockEnvironmentVariables();
        webDriverFactory = new WebDriverFactory(webdriverInstanceFactory, environmentVariables);
    }
View Full Code Here

Examples of net.thucydides.core.util.MockEnvironmentVariables

  private List<Integer> testCountInTestCase;
  private AtomicInteger counter = new AtomicInteger(1);

  @Before
  public void initMocks() {
    environmentVariables = new MockEnvironmentVariables();
    testCountInTestCase = Arrays.asList(3, 8, 1, 9, 1, 2, 1);
  }
View Full Code Here

Examples of net.thucydides.core.util.MockEnvironmentVariables

  @Test
  public void should_split_tests_between_batches_optimally() {
    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.util.MockEnvironmentVariables

  @Test
  public void should_split_tests_between_batches_optimally_when_tests_are_run_in_parallel() throws InitializationError, InterruptedException {
    List<TestRunnerThread> threads = new ArrayList<TestRunnerThread>();
   
    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) {
View Full Code Here

Examples of net.thucydides.core.util.MockEnvironmentVariables

    MockEnvironmentVariables environmentVariables;

    @Before
    public void initMocks() {
        environmentVariables = new MockEnvironmentVariables();
    }
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.