Coder Social home page Coder Social logo

vntw / backstopjs-failsonly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digitaldonkey/backstopjs-failsonly

0.0 0.0 0.0 492 KB

Script to reduce download size for backstopjs screenshots if you happy with a failure only report

JavaScript 100.00%

backstopjs-failsonly's Introduction

backstopjs-failsonly

Script to reduce download size for backstopjs screenshots if you happy with a failure only report

This script asumes that it is located in backstop_data/pipeline_scripts/error-report-only.sh within your backstop test result.

By default this script creates a copy of backstop_data names backstop_data_failonly, which contains only the failed test, reference and diff pngs and an updated html_report with only failed tests.

error-report-only.sh

If the directory backtop_data/../backstop_data_failonly/ exists you can delete and create a new copy with

error-report-only.sh --replace-existing

To keep things tiny the copy option uses a whitelist.

'bitmaps_reference/**/*',
'bitmaps_test/**/*',
'html_report/**/*',
'!bitmaps_reference/test-sucess.png'
'!bitmaps_test/20210305-131059/test-sucess.png'
 ...

The inplace option might be faster.

It deletes the successful test and reference images and also updates html_report with only failed tests.

error-report-only.sh --inplace

Pipeline usage example

Intended use is to create two download assets backstop_data and backstop_data_failonly so you can download less if you want references for a few failed tests.

mkdir -p backstopjs/backstop_data/pipeline_scripts/ \
&& wget https://raw.githubusercontent.com/digitaldonkey/backstopjs-failsonly/0.0.1-alpha/dist/error-report-only.sh -O backstopjs/backstop_data/pipeline_scripts/error-report-only.sh \
&& chmod a+x backstopjs/backstop_data/pipeline_scripts/error-report-only.sh \
&& backstopjs/backstop_data/pipeline_scripts/error-report-only.sh
# open backstopjs/backstop_data_failonly/html_report/index.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.