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

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


        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


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

        ScreenshotEntry propertyEntry = new ScreenshotEntry();
        propertyEntry.setPath(screenshot.getResource().getAbsolutePath());
        propertyEntry.setPhase(event.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

            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

                    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.