Package net.mindengine.galen.reports

Examples of net.mindengine.galen.reports.TestReport


                Runnable thread = new Runnable() {
                    @Override
                    public void run() {
                       
                        GalenTestInfo info = new GalenTestInfo(test.getName(), test);
                        TestReport report = new TestReport();

                        info.setStartedAt(new Date());
                        info.setReport(report);
                       
                       
                        testInfoLock.lock();
                        try {
                            testInfos.add(info);
                            TestSession session = TestSession.register(info);
                            session.setReport(report);
                            session.setListener(listener);
                        }
                        catch (Exception ex) {
                            ex.printStackTrace();
                        }
                        finally {
                            testInfoLock.unlock();
                        }
                       
                        eventHandler.invokeBeforeTestEvents(info);
                       
                        tellTestStarted(listener, test);
                        try {
                            test.execute(report, listener);
                        }
                        catch(Throwable ex) {
                            info.setException(ex);
                            report.error(ex);
                            ex.printStackTrace();
                        }
                        info.setEndedAt(new Date());
                       
                        eventHandler.invokeAfterTestEvents(info);
View Full Code Here


        TestSession session = TestSession.current();
        if (session == null) {
            throw new UnregisteredTestSession("Cannot check layout as there was no TestSession created");
        }

        TestReport report = session.getReport();
        CompleteListener listener = session.getListener();
        action.execute(report, new SeleniumBrowser(driver), null, listener);
    }
View Full Code Here

                until(UntilType.EXIST, xpath("//div[@id='wqe']")),
                until(UntilType.GONE, css("qweqwewqee"))
                ));
        MockedBrowser browser = new MockedBrowser(null, null);
        browser.setMockedPage(mockedPage);
        wait.execute(new TestReport(), browser, null, null);
    }
View Full Code Here

        browser.setMockedPage(mockedPage);
       
       
        TimeoutException exception = null;
        try {
            wait.execute(new TestReport(), browser, null, null);
        }
        catch(TimeoutException e) {
            exception = e;
        }
       
View Full Code Here

        assertThat("Search input should not contain any text yet", element.getAttribute("value"), is(""));
       
        GalenPageActionRunJavascript action = new GalenPageActionRunJavascript(getClass().getResource("/scripts/to-run-1.js").getFile());
        action.setJsonArguments("{prefix: 'This was'}");
       
        action.execute(new TestReport(), browser, new GalenPageTest(), null);
       
        assertThat("Search input should contain text", element.getAttribute("value"), is("This was typed by a selenium from javascript text from imported script"));
        browser.quit();
    }
View Full Code Here

       
        List<GalenTestInfo> testInfos = new LinkedList<GalenTestInfo>();
       
        GalenTestInfo testInfo = new GalenTestInfo("Home page test", null);

        testInfo.setReport(new TestReport());
        testInfo.setStartedAt(new Date(1399741000000L));
        testInfo.setEndedAt(new Date(1399746930000L));
        testInfo.setException(new FakeException("Some exception here"));
        testInfos.add(testInfo);
       
        testInfo = new GalenTestInfo("Login page test", null);
        testInfo.setReport(new TestReport());
        testInfo.setStartedAt(new Date(1399741000000L));
        testInfo.setEndedAt(new Date(1399746930000L));
        testInfos.add(testInfo);
       
       
View Full Code Here

       
        List<GalenTestInfo> testInfos = new LinkedList<GalenTestInfo>();
       
        GalenTestInfo testInfo = new GalenTestInfo("Home page test", null);

        TestReport report = new TestReport();
        LayoutReport layoutReport = new LayoutReport();
        layoutReport.setScreenshotFullPath(File.createTempFile("screenshot", ".png").getAbsolutePath());
        ReportingListenerTestUtils.performSampleReporting("Home page test", null, new LayoutReportListener(layoutReport), null);



        report.addNode(new LayoutReportNode(layoutReport, "check layout"));
        report.getNodes().get(0).setTime(new Date(1404681346000L));


        testInfo.setReport(report);
        testInfos.add(testInfo);
        testInfo.setStartedAt(new Date(1404681346000L));
View Full Code Here

        GalenBasicTest suite = new GalenBasicTest();
        suite.setName(suiteName);
       
        if (testListener != null) testListener.onTestStarted(suite);
       
        GalenPageRunner pageRunner = new GalenPageRunner(new TestReport());
       
        Map<String, PageElement> pageElements = new HashMap<String, PageElement>();

        pageElements.put("objectA1", new MockedPageElement(10, 10, 100, 50));
        pageElements.put("objectA2", new MockedPageElement(200, 300, 50, 30));
View Full Code Here

       
    }

    private static void tellAfterSuite(SuiteListener suiteListener) {
        GalenTestInfo test = new GalenTestInfo("page1.test", null);
        TestReport report = new TestReport();
        for (int i=0; i< 6; i++) {
            report.info("info" + i);
        }
        for (int i=0; i< 5; i++) {
            report.error("error" + i);
        }
        test.setReport(report);
        suiteListener.afterTestSuite(asList(test));
    }
View Full Code Here

            put("button-2", new MockedPageElement(0, 100, 200, 10));
        }}));
       
        TestValidationListener validationListener = new TestValidationListener();
       
        TestReport report = new TestReport();
        check.execute(report, mockedBrowser, new GalenPageTest(), validationListener);
       
        Assert.assertEquals(
                "<o textfield>\n" +
                "<SpecHeight textfield>\n" +
View Full Code Here

TOP

Related Classes of net.mindengine.galen.reports.TestReport

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.