Package org.arquillian.recorder.reporter.model.entry

Examples of org.arquillian.recorder.reporter.model.entry.ScreenshotEntry


            takeScreenshotEvent.getMetaData().setHeight(screenshot.getHeight());
            takeScreenshotEvent.getMetaData().setWidth(screenshot.getWidth());
            screenshot.setResourceMetaData(takeScreenshotEvent.getMetaData());

            ScreenshotEntry propertyEntry = new ScreenshotEntry();
            propertyEntry.setPath(screenshot.getResource().getAbsolutePath());
            propertyEntry.setPhase(takeScreenshotEvent.getWhen());
            propertyEntry.setType(screenshot.getResourceType().toString());
            propertyEntry.setSize(Long.toString(screenshot.getResource().length()));
            propertyEntry.setWidth(screenshot.getWidth());
            propertyEntry.setHeight(screenshot.getHeight());

            takenScreenshotsRegister.get().addReported(screenshot);
            propertyReportEvent.fire(new PropertyReportEvent(propertyEntry));
    }
View Full Code Here


        testMethodReport2.setException("some exception");

        reporter.getLastTestClassReport().getTestMethodReports().add(testMethodReport2);
        reporter.setTestMethodReport(testMethodReport2);

        ScreenshotEntry sce = new ScreenshotEntry();
        sce.setPath(configuration.getRootDir().getAbsolutePath() + "/niceScreenshot.jpg");
        sce.setSize("56kB");
        sce.setPhase(When.BEFORE);
        sce.setWidth(300);
        sce.setHeight(500);

        ScreenshotEntry sce2 = new ScreenshotEntry();
        sce2.setPath(configuration.getRootDir().getAbsolutePath() + "/niceScreenshotBefore.jpg");
        sce2.setPhase(When.BEFORE);
        sce2.setWidth(300);
        sce2.setHeight(500);

        reporter.getLastTestMethodReport().getPropertyEntries().add(sce);
        reporter.getLastTestMethodReport().getPropertyEntries().add(sce2);

        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
View Full Code Here

        testMethodReport2.setException("some exception");

        reporter.getLastTestClassReport().getTestMethodReports().add(testMethodReport2);
        reporter.setTestMethodReport(testMethodReport2);

        ScreenshotEntry sce = new ScreenshotEntry();
        sce.setPath(configuration.getRootDir().getAbsolutePath() + "/niceScreenshot.jpg");
        sce.setSize("56kB");
        sce.setPhase(When.BEFORE);
        sce.setWidth(300);
        sce.setHeight(500);

        ScreenshotEntry sce2 = new ScreenshotEntry();
        sce2.setPath(configuration.getRootDir().getAbsolutePath() + "/niceScreenshotBefore.jpg");
        sce2.setPhase(When.BEFORE);
        sce2.setWidth(300);
        sce2.setHeight(500);

        reporter.getLastTestMethodReport().getPropertyEntries().add(sce);
        reporter.getLastTestMethodReport().getPropertyEntries().add(sce2);

        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
View Full Code Here

        testMethodReport2.setException("some exception");

        reporter.getLastTestClassReport().getTestMethodReports().add(testMethodReport2);
        reporter.setTestMethodReport(testMethodReport2);

        ScreenshotEntry sce = new ScreenshotEntry();
        sce.setPath("niceScreenshot.jpg");
        sce.setSize("56kB");
        sce.setPhase(When.BEFORE);

        ScreenshotEntry sce2 = new ScreenshotEntry();
        sce2.setPath("niceScreenshotBefore.jpg");
        sce2.setPhase(When.BEFORE);

        reporter.getReporterCursor().getCursor().getPropertyEntries().add(sce);
        reporter.getReporterCursor().getCursor().getPropertyEntries().add(sce2);

        Exporter exporter = new XMLExporter(JAXBContextFactory.initContext(Report.class));
View Full Code Here

    }

    public ScreenshotEntry build() {
        screenshot.setResourceMetaData(metadata);

        ScreenshotEntry propertyEntry = new ScreenshotEntry();
        propertyEntry.setPath(screenshot.getResource().getAbsolutePath());
        propertyEntry.setPhase(when);
        propertyEntry.setType(screenshot.getResourceType().toString());
        propertyEntry.setSize(Long.toString(screenshot.getResource().length()));
        propertyEntry.setWidth(screenshot.getWidth());
        propertyEntry.setHeight(screenshot.getHeight());

        return propertyEntry;
    }
View Full Code Here

        TakenResourceRegister register = takenResourceRegister.get();

        for (Screenshot screenshot : register.getTakenScreenshots()) {
            if (!register.getReportedScreenshots().contains(screenshot)) {

                ScreenshotEntry propertyEntry = new ScreenshotEntry();
                propertyEntry.setPath(screenshot.getResource().getAbsolutePath());
                propertyEntry.setType(screenshot.getResourceType().toString());
                propertyEntry.setSize(Long.toString(screenshot.getResource().length()));
                propertyEntry.setWidth(screenshot.getWidth());
                propertyEntry.setHeight(screenshot.getHeight());
                propertyEntry.setPhase(When.IN_TEST);

                reportEvent.fire(new PropertyReportEvent(propertyEntry));
            }
        }
View Full Code Here

                    for (PropertyEntry entry : testMethodReport.getPropertyEntries()) {
                        if (entry instanceof VideoEntry) {
                            VideoEntry e = (VideoEntry) entry;
                            e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                        } else if (entry instanceof ScreenshotEntry) {
                            ScreenshotEntry e = (ScreenshotEntry) entry;
                            e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                        }
                    }
                }
            }
        }
View Full Code Here

        testMethodReport2.setException("some exception");

        reporter.getLastTestClassReport().getTestMethodReports().add(testMethodReport2);
        reporter.setTestMethodReport(testMethodReport2);

        ScreenshotEntry sce = new ScreenshotEntry();
        sce.setPath(configuration.getRootDir().getAbsolutePath() + "/niceScreenshot.jpg");
        sce.setSize("56kB");
        sce.setPhase(When.BEFORE);

        ScreenshotEntry sce2 = new ScreenshotEntry();
        sce2.setPath(configuration.getRootDir().getAbsolutePath() + "/niceScreenshotBefore.jpg");
        sce2.setPhase(When.BEFORE);

        reporter.getReporterCursor().getCursor().getPropertyEntries().add(sce);
        reporter.getReporterCursor().getCursor().getPropertyEntries().add(sce2);

        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
View Full Code Here

            if (propertyEntry instanceof VideoEntry) {
                VideoEntry videoEntry = (VideoEntry) propertyEntry;
                writeVideo(videoEntry);
            } else {
                if (propertyEntry instanceof ScreenshotEntry) {
                    ScreenshotEntry screenshotEntry = (ScreenshotEntry) propertyEntry;
                    writeScreenshot(screenshotEntry);
                }
            }
        }
View Full Code Here

                    for (PropertyEntry entry : testMethodReport.getPropertyEntries()) {
                        if (entry instanceof VideoEntry) {
                            VideoEntry e = (VideoEntry) entry;
                            e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                        } else if (entry instanceof ScreenshotEntry) {
                            ScreenshotEntry e = (ScreenshotEntry) entry;
                            e.setLink(e.getPath().substring(configuration.getRootDir().getAbsolutePath().length() + 1));
                        }
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.arquillian.recorder.reporter.model.entry.ScreenshotEntry

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.