Package org.arquillian.extension.recorder.screenshooter

Examples of org.arquillian.extension.recorder.screenshooter.ScreenshotMetaData


    }

    @Override
    public Screenshot takeScreenshot(ScreenshotType type) {
        Validate.notNull(type, "Screenshot type is a null object!");
        ScreenshotMetaData metaData = new ScreenshotMetaData();
        metaData.setResourceType(type);
        return takeScreenshot(
            new File(ResourceIdentifierFactory.getResoruceIdentifier(metaData, null).getIdentifier(type)),
            type);
    }
View Full Code Here


        }
    }

    public void afterTest(@Observes After event, TestResult result) {
        if (new TakingScreenshotDecider(recorderStrategyRegister.get()).decide(event, result)) {
            ScreenshotMetaData metaData = getMetaData(event);
            metaData.setTestResult(result);
            metaData.setResourceType(getScreenshotType());

            When when = result.getStatus() == TestResult.Status.FAILED ? When.FAILED : When.AFTER;

            DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
            String screenshotName = nameBuilder
View Full Code Here

            afterScreenshotTaken.fire(new AfterScreenshotTaken(metaData));
        }
    }

    private ScreenshotMetaData getMetaData(TestLifecycleEvent event) {
        ScreenshotMetaData metaData = new ScreenshotMetaData();

        metaData.setTestClass(event.getTestClass());
        metaData.setTestMethod(event.getTestMethod());
        metaData.setTimeStamp(System.currentTimeMillis());

        return metaData;
    }
View Full Code Here

    private Instance<Screenshooter> screenshooter;

    public void beforeTest(@Observes Before event) {

        if (new TakingScreenshotDecider(recorderStrategyRegister.get()).decide(event, null)) {
            ScreenshotMetaData metaData = getMetaData(event);
            metaData.setResourceType(getScreenshotType());

            DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
            String screenshotName = nameBuilder
                .withMetaData(metaData)
                .withStage(When.BEFORE)
View Full Code Here

    @Inject
    private Instance<Screenshooter> screenshooter;

    public void beforeTest(@Observes Before event) {
        if (strategy.get().isTakingAction(event)) {
            ScreenshotMetaData metaData = getMetaData(event);
            metaData.setResourceType(getScreenshotType());

            DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
            String screenshotName = nameBuilder
                .withMetaData(metaData)
                .withStage(When.BEFORE)
View Full Code Here

    }

    public void afterTest(@Observes After event) {
        TestResult result = testResult.get();
        if (strategy.get().isTakingAction(event, result)) {
            ScreenshotMetaData metaData = getMetaData(event);
            metaData.setTestResult(result);
            metaData.setResourceType(getScreenshotType());

            beforeScreenshotTaken.fire(new BeforeScreenshotTaken(metaData));

            When when = result.getStatus() == TestResult.Status.FAILED ? When.FAILED : When.AFTER;
View Full Code Here

            afterScreenshotTaken.fire(new AfterScreenshotTaken(metaData));
        }
    }

    private ScreenshotMetaData getMetaData(TestLifecycleEvent event) {
        ScreenshotMetaData metaData = new ScreenshotMetaData();

        metaData.setTestClass(event.getTestClass());
        metaData.setTestMethod(event.getTestMethod());
        metaData.setTimeStamp(System.currentTimeMillis());

        return metaData;
    }
View Full Code Here

TOP

Related Classes of org.arquillian.extension.recorder.screenshooter.ScreenshotMetaData

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.