Package net.thucydides.core.webdriver

Examples of net.thucydides.core.webdriver.SystemPropertiesConfiguration


    @Before
    public void initMocks() {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        configuration = new SystemPropertiesConfiguration(environmentVariables);

        when(driver.navigate()).thenReturn(navigation);

        StepEventBus.getEventBus().clear();
        StepEventBus.getEventBus().testSuiteStarted(ATestClass.class);
View Full Code Here


    @Before
    public void initMocks() {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("max.retries", "1");
        configuration = new SystemPropertiesConfiguration(environmentVariables);
    }
View Full Code Here

            return filename.endsWith(".xml");
        }
    }

    protected ThucydidesRunner getNormalTestRunnerUsing(Class<?> testClass) throws Throwable {
        Configuration configuration = new SystemPropertiesConfiguration(environmentVariables);
        WebDriverFactory factory = new WebDriverFactory(environmentVariables);
        return new ThucydidesRunner(testClass, factory, configuration);
    }
View Full Code Here

        WebDriverFactory factory = new WebDriverFactory(environmentVariables);
        return new ThucydidesRunner(testClass, factory, configuration);
    }
   
    protected ThucydidesParameterizedRunner getTestRunnerUsing(Class<?> testClass) throws Throwable {
        Configuration configuration = new SystemPropertiesConfiguration(environmentVariables);
        WebDriverFactory factory = new WebDriverFactory(environmentVariables);
        BatchManager batchManager = new BatchManagerProvider(configuration).get();
        return new ThucydidesParameterizedRunner(testClass, configuration, factory, batchManager);
    }
View Full Code Here

        BatchManager batchManager = new BatchManagerProvider(configuration).get();
        return new ThucydidesParameterizedRunner(testClass, configuration, factory, batchManager);
    }

    protected ThucydidesParameterizedRunner getStubbedTestRunnerUsing(Class<?> testClass) throws Throwable {
        Configuration configuration = new SystemPropertiesConfiguration(environmentVariables);
        WebDriverFactory factory = new WebDriverFactory(environmentVariables);
        BatchManager batchManager = new BatchManagerProvider(configuration).get();
        return new ThucydidesParameterizedRunner(testClass, configuration, factory, batchManager) {
            @Override
            public void generateReports() {
View Full Code Here

        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");
        when(driver.getScreenshotAs(any(OutputType.class))).thenReturn(screenshot1).thenReturn(screenshot2);
View Full Code Here

    }


    private void configureEventBus(String property, String value) {
        environmentVariables.setProperty(property, value);
        SystemPropertiesConfiguration configuration = new SystemPropertiesConfiguration(environmentVariables);

        BaseStepListener stepListener = new BaseStepListener(FirefoxDriver.class, outputDirectory, configuration);
        stepListener.setDriver(driver);
        StepEventBus.getEventBus().clear();
        StepEventBus.getEventBus().dropAllListeners();
View Full Code Here

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

        final String systemDefinedBaseUrl = "http://www.google.com.au";

        environmentVariables.setProperty("webdriver.base.url", systemDefinedBaseUrl);

        Configuration Configuration = new SystemPropertiesConfiguration(environmentVariables);
        final Pages pages = new Pages(driver, Configuration);
        pages.get(SimplePage.class).open();

        verify(driver).get(driverUrl.capture());
        assertThat(driverUrl.getValue(), containsString(systemDefinedBaseUrl));
View Full Code Here

        this(Injectors.getInjector().getProvider(EnvironmentVariables.class).get() );
    }

    public PackageAnnotationBasedTagProvider(EnvironmentVariables vars) {
        super(vars);
        configuration = new SystemPropertiesConfiguration(environmentVariables);
        rootPackage = THUCYDIDES_TEST_ROOT.from(environmentVariables, rootDirectory);
        persister = new RequirementPersister(configuration.getOutputDirectory(), rootPackage);
        leafRequirements = Lists.newArrayList();
    }
View Full Code Here

TOP

Related Classes of net.thucydides.core.webdriver.SystemPropertiesConfiguration

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.