Package org.junit.runner.notification

Examples of org.junit.runner.notification.RunNotifier


     * Runs the tests in the acceptance test case.
     */

    @Override
    public void run(final RunNotifier notifier) {
        RunNotifier localNotifier;
        if (!skipThisTest()) {
            try {
                setupFixtureServices();
                localNotifier = initializeRunNotifier(notifier);
                super.run(localNotifier);
View Full Code Here


            initStepFactory();
        }
    }

    private RunNotifier initializeRunNotifier(RunNotifier notifier) {
        RunNotifier notifierForSteps = new RunNotifier();
        notifierForSteps.addListener(getStepListener());
        return (shouldRetryTest() ? notifier : new RetryFilteringRunNotifier(notifier, notifierForSteps));
    }
View Full Code Here

    @Test
    public void a_data_driven_test_driver_should_run_one_test_per_row_of_data() throws Throwable  {

        ThucydidesParameterizedRunner runner = getStubbedTestRunnerUsing(SampleDataDrivenScenario.class);
        runner.run(new RunNotifier());

        List<TestOutcome> executedScenarios = ParameterizedTestsOutcomeAggregator.from(runner).getTestOutcomesForAllParameterSets();
        assertThat(executedScenarios.size(), is(24));
    }
View Full Code Here

    @Test
    public void a_data_driven_test_driver_should_aggregate_test_outcomes() throws Throwable  {

        ThucydidesParameterizedRunner runner = getStubbedTestRunnerUsing(SampleDataDrivenScenario.class);
        runner.run(new RunNotifier());

        List<TestOutcome> aggregatedScenarios = ParameterizedTestsOutcomeAggregator.from(runner).aggregateTestOutcomesByTestMethods();
        assertThat(aggregatedScenarios.size(), is(2));
        assertThat(aggregatedScenarios.get(0).getStepCount(), is(12));
        assertThat(aggregatedScenarios.get(1).getStepCount(), is(12));
View Full Code Here

    @Test
    public void a_data_driven_test_driver_should_record_a_table_of_example() throws Throwable  {

        ThucydidesParameterizedRunner runner = getStubbedTestRunnerUsing(SampleSingleDataDrivenScenario.class);
        runner.run(new RunNotifier());

        List<TestOutcome> aggregatedScenarios = ParameterizedTestsOutcomeAggregator.from(runner).aggregateTestOutcomesByTestMethods();
        assertThat(aggregatedScenarios.size(), is(1));
        assertThat(aggregatedScenarios.get(0).getStepCount(), is(15));
    }
View Full Code Here

    @Test
    public void a_data_driven_test_driver_should_aggregate_test_outcomes_without_steps() throws Throwable  {

        ThucydidesParameterizedRunner runner = getStubbedTestRunnerUsing(SimpleSuccessfulParametrizedTestSample.class);
        runner.run(new RunNotifier());

        List<TestOutcome> aggregatedScenarios = ParameterizedTestsOutcomeAggregator.from(runner).aggregateTestOutcomesByTestMethods();
        assertThat(aggregatedScenarios.size(), is(2));
        assertThat(aggregatedScenarios.get(0).getStepCount(), is(3));
        assertThat(aggregatedScenarios.get(1).getStepCount(), is(3));
View Full Code Here

        }

        @Override
        public void run( RemoteRunListener listener )
        {
            RunNotifier notifier = new RunNotifier();
            notifier.addFirstListener( new LocalRunListener( listener ) );
            runner.run( notifier );
        }
View Full Code Here

    @Test
    public void an_ignored_data_driven_test_should_have_result_status_as_ignored() throws Throwable  {

        ThucydidesParameterizedRunner runner = getStubbedTestRunnerUsing(SampleDataDrivenIgnoredScenario.class);
        runner.run(new RunNotifier());

        List<TestOutcome> aggregatedScenarios = ParameterizedTestsOutcomeAggregator.from(runner).aggregateTestOutcomesByTestMethods();
        assertThat(aggregatedScenarios.size(), is(1));
        assertThat(aggregatedScenarios.get(0).getResult(), is(TestResult.IGNORED));
    }
View Full Code Here

    @Test
    public void an_ignored_data_driven_test_should_have_a_step_for_each_row() throws Throwable  {

        ThucydidesParameterizedRunner runner = getStubbedTestRunnerUsing(SampleDataDrivenIgnoredScenario.class);
        runner.run(new RunNotifier());

        List<TestOutcome> aggregatedScenarios = ParameterizedTestsOutcomeAggregator.from(runner).aggregateTestOutcomesByTestMethods();
        assertThat(aggregatedScenarios.size(), is(1));
        assertThat(aggregatedScenarios.get(0).getTestSteps().size(), is(10));
    }
View Full Code Here

    @Test
    public void a_pending_data_driven_test_should_have_result_status_as_pending() throws Throwable  {

        ThucydidesParameterizedRunner runner = getStubbedTestRunnerUsing(SampleDataDrivenPendingScenario.class);
        runner.run(new RunNotifier());

        List<TestOutcome> aggregatedScenarios = ParameterizedTestsOutcomeAggregator.from(runner).aggregateTestOutcomesByTestMethods();
        assertThat(aggregatedScenarios.size(), is(1));
        assertThat(aggregatedScenarios.get(0).getResult(), is(TestResult.PENDING));
    }
View Full Code Here

TOP

Related Classes of org.junit.runner.notification.RunNotifier

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.