Package ru.yandex.qatools.allure.events

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


        doReturn("some.uid").when(runListener).getSuiteUid(description);
        runListener.testStarted(description);

        inOrder(allure).verify(allure).fire(eq(new ClearStepStorageEvent()));
        inOrder(allure).verify(allure).fire(eq(
                withExecutorInfo(new TestCaseStartedEvent("some.uid", "some.method.name"))
        ));
    }
View Full Code Here


            validator.validate(new StreamSource(each));
        }
    }

    public TestCaseResult fireTestCaseStart() {
        Allure.LIFECYCLE.fire(new TestCaseStartedEvent("some.uid", "some.case.name"));
        TestCaseResult testCase = Allure.LIFECYCLE.getTestCaseStorage().get();
        assertNotNull(testCase);
        assertThat(testCase.getName(), is("some.case.name"));
        return testCase;
    }
View Full Code Here

    //

    @Test
    public void testcaseStartedEventTest() throws Exception {
        allure.fire(new TestCaseStartedEvent("", ""));
        assertThat(listener.get(SimpleListener.EventType.TESTCASE_STARTED_EVENT), is(1));
    }
View Full Code Here

   
    private void addPendingMethods(ITestContext iTestContext) {
        for (ITestNGMethod method: iTestContext.getExcludedMethods()) {
            if (method.isTest() && !method.getEnabled()) {
                Description description = new Description().withValue(method.getDescription());
                TestCaseStartedEvent event = new TestCaseStartedEvent(getSuiteUid(iTestContext), method.getMethodName());
                if (description.getValue() != null) {
                    event.setDescription(description);
                }
                AnnotationManager am = new AnnotationManager(method.getConstructorOrMethod().getMethod().getAnnotations());
                am.setDefaults(method.getInstance().getClass().getAnnotations());
                am.update(event);
                getLifecycle().fire(event);
View Full Code Here

        String suitePrefix = getCurrentSuitePrefix(iTestResult);
        String testName = getName(iTestResult);
        startedTestNames.add(testName);
        testName = testName.replace(suitePrefix, "");
        Description description = new Description().withValue(iTestResult.getMethod().getDescription());
        TestCaseStartedEvent event = new TestCaseStartedEvent(getSuiteUid(iTestResult.getTestContext()), testName);
        if (description.getValue() != null) {
            event.setDescription(description);
        }
        AnnotationManager am = new AnnotationManager(getMethodAnnotations(iTestResult));
        am.setDefaults(getClassAnnotations(iTestResult));
        am.update(event);
View Full Code Here

        getLifecycle().fire(event);
    }

    @Override
    public void testStarted(Description description) {
        TestCaseStartedEvent event = new TestCaseStartedEvent(getSuiteUid(description), description.getMethodName());
        AnnotationManager am = new AnnotationManager(description.getAnnotations());

        am.update(event);

        fireClearStepStorage();
View Full Code Here

    public void startFakeTestCase(Description description) {
        String uid = getSuiteUid(description);

        String name = description.isTest() ? description.getMethodName() : description.getClassName();
        TestCaseStartedEvent event = new TestCaseStartedEvent(uid, name);
        AnnotationManager am = new AnnotationManager(description.getAnnotations());
        am.update(event);

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

        ));  
    }

    @Test
    public void testUpdateTestCaseStartedEvent() throws Exception {
        TestCaseStartedEvent event = new TestCaseStartedEvent("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(), hasItems(
                createStoryLabel("some.story"),
                createFeatureLabel("some.feature"),
                createSeverityLabel(SeverityLevel.BLOCKER),
                createIssueLabel("some.simple.issue"),
                createIssueLabel("some.nested.issue.1"),
View Full Code Here

   
    @Test
    public void testInitialValuesUpdateTestCaseStartedEvent() throws Exception {
        AnnotationManager annotationManager = setAnnotationManager("simpleMethod");

        TestCaseStartedEvent event = new TestCaseStartedEvent("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(), hasItems(
                createStoryLabel("some.story"),
                createFeatureLabel("some.feature"),
                createSeverityLabel(SeverityLevel.BLOCKER),
                createIssueLabel("some.simple.issue"),
                createIssueLabel("some.nested.issue.1"),
View Full Code Here

    @Test
    public void testDefaultValuesUpdateTestCaseStartedEvent() throws Exception {
        AnnotationManager annotationManager = setAnnotationManager("defaultMethod");

        TestCaseStartedEvent event = new TestCaseStartedEvent("some.uid", "some.name");
        annotationManager.update(event);

        assertThat(event.getTitle(), is(nullValue()));
        Description description = annotationManager.getDescription();
        assertThat(description, is(nullValue()));
        assertThat(event.getLabels(), hasItems(
                createStoryLabel("default.story"),
                createFeatureLabel("default.feature"),
                createIssueLabel("default.issue")
        ));
    }
View Full Code Here

TOP

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

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.