Package org.arquillian.extension.recorder.video

Examples of org.arquillian.extension.recorder.video.Video


        File videoTarget = new File(event.getVideoMetaData().getTestClassName(), fileName);
        recorder.get().startRecording(videoTarget, event.getVideoType());
    }

    public void onStopSuiteRecording(@Observes StopRecordSuiteVideo event) {
        Video video = recorder.get().stopRecording();
        takenResourceRegister.get().addTaken(video);
        video.setResourceMetaData(event.getVideoMetaData());

        takenResourceRegister.get().addReported(video);
        propertyReportEvent.fire(new PropertyReportEvent(getVideoEntry(video)));
    }
View Full Code Here


        takenResourceRegister.get().addReported(video);
        propertyReportEvent.fire(new PropertyReportEvent(getVideoEntry(video)));
    }

    public void onStopRecording(@Observes StopRecordVideo event) throws IOException {
        Video video = recorder.get().stopRecording();
        takenResourceRegister.get().addTaken(video);

        TestResult testResult = event.getVideoMetaData().getTestResult();

        if (testResult != null) {
            Status status = testResult.getStatus();
            appendStatus(video, status);
            if (!status.equals(Status.FAILED) && configuration.get().getTakeOnlyOnFail()) {
                if (!video.getResource().getAbsoluteFile().delete()) {
                    System.out.println("video was not deleted: " + video.getResource().getAbsolutePath());
                }
                File directory = video.getResource().getParentFile();
                if (directory != null && directory.listFiles().length == 0) {
                    FileUtils.deleteDirectory(directory);
                }
            }
        }
View Full Code Here

    }

    @Override
    public Video stopRecording() {
        if (recorder != null && recorder.isRecording()) {
            Video video = recorder.stopRecording();
            takenResourceRegister.addTaken(video);
            return video;
        }
        throw new IllegalStateException("It seems you have not called init() method of this video recorder yet.");
    }
View Full Code Here

        } catch (InterruptedException ignored) {
            throw new RuntimeException("Unable to stop video recording.");
        }

        timer = null;
        Video video = new DesktopVideo();
        video.setResource(recordedVideo);
        video.setResourceType(VideoType.valueOf(configuration.getVideoType()));
        video.setWidth(screenBounds.width / 2);
        video.setHeight(screenBounds.height / 2);
        return video;
    }
View Full Code Here

TOP

Related Classes of org.arquillian.extension.recorder.video.Video

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.