Package ru.yandex.qatools.allure.events

Examples of ru.yandex.qatools.allure.events.TestSuiteStartedEvent


    private void fireClearStepStorage() {
        Allure.LIFECYCLE.fire(new ClearStepStorageEvent());
    }

    public TestSuiteResult fireTestSuiteStart() {
        Allure.LIFECYCLE.fire(new TestSuiteStartedEvent("some.uid", "some.suite.name"));
        TestSuiteResult testSuite = Allure.LIFECYCLE.getTestSuiteStorage().get("some.uid");
        assertNotNull(testSuite);
        assertThat(testSuite.getName(), is("some.suite.name"));
        assertThat(testSuite.getTestCases(), hasSize(0));
        return testSuite;
View Full Code Here


        //nothing
    }

    @Override
    public void onStart(ITestContext iTestContext) {
        getLifecycle().fire(new TestSuiteStartedEvent(
                getSuiteUid(iTestContext), iTestContext.getSuite().getName()
        ).withTitle(
                getCurrentSuiteTitle(iTestContext)
        ).withLabels(
                AllureModelUtils.createTestFrameworkLabel("TestNG")
View Full Code Here

    }

    public void testSuiteStarted(Description description) {
        String uid = generateSuiteUid(description.getClassName());

        TestSuiteStartedEvent event = new TestSuiteStartedEvent(uid, description.getClassName());
        AnnotationManager am = new AnnotationManager(description.getAnnotations());

        am.update(event);

        event.withLabels(AllureModelUtils.createTestFrameworkLabel("JUnit"));

        getLifecycle().fire(event);
    }
View Full Code Here

        assertEquals(labels.get(0), createLabel(LabelName.FEATURE, "some.feature"));
    }

    @Test
    public void testUpdateTestSuiteStartedEvent() throws Exception {
        TestSuiteStartedEvent event = new TestSuiteStartedEvent("some.uid", "some.name");
        annotationManager.update(event);

        assertThat(event.getTitle(), equalTo("some.title"));

        Description description = annotationManager.getDescription();
        assertThat(description.getValue(), is("some.description"));
        assertThat(description.getType(), is(DescriptionType.TEXT));

        assertThat(event.getLabels(), not(hasItems(
                createSeverityLabel(SeverityLevel.BLOCKER)
        )));
        assertThat(event.getLabels(), hasItems(
                createStoryLabel("some.story"),
                createFeatureLabel("some.feature"),
                createIssueLabel("some.simple.issue"),
                createIssueLabel("some.nested.issue.1"),
                createIssueLabel("some.nested.issue.2")
View Full Code Here

TOP

Related Classes of ru.yandex.qatools.allure.events.TestSuiteStartedEvent

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.