Package net.thucydides.junit.runners

Examples of net.thucydides.junit.runners.ThucydidesRunner.run()


    @Test
    public void the_driver_should_be_initialized_before_the_tests() throws InitializationError  {

        ThucydidesRunner runner = new ThucydidesRunner(SamplePassingScenario.class, webDriverFactory);

        runner.run(new RunNotifier());

        assertThat(firefoxDriver, is(notNullValue()));
    }

    @Mock
View Full Code Here


    @Test
    public void the_driver_should_be_reset_after_each_test() throws InitializationError {

        ThucydidesRunner runner = new ThucydidesRunner(MultipleTestScenario.class, webDriverFactory);

        runner.run(new RunNotifier());

        verify(firefoxDriver,times(3)).quit();
    }

    @Test
View Full Code Here

    @Test
    public void the_driver_should_only_be_reset_once_at_the_start_for_unique_session_tests() throws InitializationError {

        ThucydidesRunner runner = new ThucydidesRunner(MultipleTestScenarioWithUniqueSession.class, webDriverFactory);

        runner.run(new RunNotifier());

        verify(firefoxDriver,times(1)).quit();
    }

View Full Code Here

    @Test
    public void the_driver_should_be_quit_after_the_tests() throws InitializationError {

        ThucydidesRunner runner = new ThucydidesRunner(SingleTestScenario.class, webDriverFactory);
       
        runner.run(new RunNotifier());
        verify(firefoxDriver).quit();
    }

    @Test
    public void when_an_unsupported_driver_is_used_an_error_is_raised() throws InitializationError {
View Full Code Here

    public void when_an_unsupported_driver_is_used_an_error_is_raised() throws InitializationError {

        environmentVariables.setProperty("webdriver.driver", "netscape");
        try {
            ThucydidesRunner runner = getTestRunnerUsing(SingleTestScenario.class);
            runner.run(new RunNotifier());
            fail();
        } catch (UnsupportedDriverException e) {
            assertThat(e.getMessage(), containsString("Unsupported browser type: netscape"));
        }
    }
View Full Code Here

    public void a_system_provided_url_should_override_the_default_url() throws InitializationError {

        environmentVariables.setProperty("webdriver.base.url", "http://www.wikipedia.com");
        ThucydidesRunner runner = getTestRunnerUsing(SingleWikipediaTestScenario.class);

        runner.run(new RunNotifier());

        verify(firefoxDriver).get("http://www.wikipedia.com");
    }

    @Override
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.