Package net.thucydides.core.statistics.model

Examples of net.thucydides.core.statistics.model.TestStatistics


        assertThat(testOutcome.lastStep().getDescription(), is("Step 3"));
    }

    @Test
    public void should_calculate_the_overall_success_rate_from_provided_statistics() {
        TestStatistics statistics = new TestStatistics(10L, 7L, 3L,
                                                       ImmutableList.of(SUCCESS,SUCCESS,SUCCESS,SUCCESS,SUCCESS,SUCCESS,SUCCESS,FAILURE,FAILURE,FAILURE),
                                                       ImmutableList.of(new TestRunTag("MYPROJECT","A story","story")));

        testOutcome.setStatistics(statistics);
        assertThat(testOutcome.getOverallStability(), is(0.7));
View Full Code Here


        assertThat(testOutcome.getOverallStability(), is(0.7));
    }

    @Test
    public void should_calculate_the_recent_success_rate_from_provided_statistics() {
        TestStatistics statistics = new TestStatistics(10L, 7L, 3L,
                ImmutableList.of(SUCCESS,SUCCESS,SUCCESS,SUCCESS,SUCCESS,SUCCESS,SUCCESS,FAILURE,FAILURE,FAILURE),
                ImmutableList.of(new TestRunTag("MYPROJECT","A story","story")));

        testOutcome.setStatistics(statistics);
        assertThat(testOutcome.getRecentStability(), is(0.7));
View Full Code Here

        assertThat(testOutcome.getRecentStability(), is(0.7));
    }

    @Test
    public void should_count_the_recent_test_runs_from_provided_statistics() {
        TestStatistics statistics = new TestStatistics(8L, 5L, 3L,
                ImmutableList.of(FAILURE,FAILURE,PENDING,SUCCESS,SUCCESS,SUCCESS,SUCCESS,SUCCESS),
                ImmutableList.of(new TestRunTag("MYPROJECT","A story","story")));

        testOutcome.setStatistics(statistics);
        assertThat(testOutcome.getRecentTestRunCount() , is(8L));
View Full Code Here

TOP

Related Classes of net.thucydides.core.statistics.model.TestStatistics

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.