Package org.arquillian.extension.recorder

Examples of org.arquillian.extension.recorder.DefaultFileNameBuilder


        if (context.getMethod().getName().equals("get") && !alreadyDone) {
            When when = When.BEFORE;
            takeScreenshotEvent.getMetaData().setOptionalDescription("get");

            DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
            String screenshotName = nameBuilder
                    .withMetaData(takeScreenshotEvent.getMetaData())
                    .withStage(when)
                    .withResourceIdentifier(ResourceIdentifierFactory.getResoruceIdentifier(takeScreenshotEvent.getMetaData(), when))
                    .build();
            takeScreenshotEvent.setFileName(screenshotName);
View Full Code Here


        if (isInterceptedMethodAllowed(interceptedMethod)) {
            When when = When.ON_EVERY_ACTION;
            takeScreenshotEvent.getMetaData()
                    .setOptionalDescription(interceptedMethod.getName() + Integer.toString(counter++));

            DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
            String screenshotName = nameBuilder.withMetaData(takeScreenshotEvent.getMetaData()).withStage(when)
                    .withResourceIdentifier(
                            ResourceIdentifierFactory.getResoruceIdentifier(takeScreenshotEvent.getMetaData(), when)).build();
            takeScreenshotEvent.setFileName(screenshotName);

            takeScreenshotAndReport();
View Full Code Here

                TakeScreenshotOnEveryActionInterceptor onEveryActionInterceptor =
                        new TakeScreenshotOnEveryActionInterceptor(event, getTakeAndReportService(), interceptorRegistry.get());
                interceptorRegistry.get().register(onEveryActionInterceptor);
            }
        } else {
            DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
            String screenshotName = nameBuilder
                    .withMetaData(event.getMetaData())
                    .withStage(event.getWhen())
                    .withResourceIdentifier(ResourceIdentifierFactory.getResoruceIdentifier(event.getMetaData(), event.getWhen()))
                    .build();
            event.setFileName(screenshotName);
View Full Code Here

        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)
                .build();

            beforeScreenshotTaken.fire(new BeforeScreenshotTaken(metaData));
View Full Code Here

            metaData.setTestResult(result);
            metaData.setResourceType(getScreenshotType());

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

            DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
            String screenshotName = nameBuilder
                .withMetaData(metaData)
                .withStage(when)
                .build();

            beforeScreenshotTaken.fire(new BeforeScreenshotTaken(metaData));
View Full Code Here

    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)
                .build();

            beforeScreenshotTaken.fire(new BeforeScreenshotTaken(metaData));
View Full Code Here

            beforeScreenshotTaken.fire(new BeforeScreenshotTaken(metaData));

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

            DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
            String screenshotName = nameBuilder
                .withMetaData(metaData)
                .withStage(when)
                .build();

            takeScreenshot.fire(new TakeScreenshot(screenshotName, metaData, when));
View Full Code Here

TOP

Related Classes of org.arquillian.extension.recorder.DefaultFileNameBuilder

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.