garris / garris/BackstopJS

How to consolidate report between multiple runs

Open
#1,146 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

Hi team,

In my case, I have about 700 html scenarios which are running fine with backtopjs as below config
```
const config = {
...
scenarios: [...],
paths: {
bitmaps_reference: 'stories/__screenshots__',
bitmaps_test: 'test-storybook/tests',
html_report: 'test-storybook/html-report',
ci_report: 'test-storybook/ci-report'
},
engine: 'puppeteer',
engineOptions: {
args: [..., '--disable-gpu']
},
report: ['CI'],
asyncCaptureLimit: 2,
resembleOutputOptions: { ignoreAntialiasing: true },
asyncCompareLimit: 30
};

backstopjs('test', { config });
```

Now, I expand to have 10 new canvas scenarios which require to remove flag `--disable-gpu`

So my questions are
1. Do we have a way to set some specific puppeteer flags to my new scenarios to overwrite big config? Or

2. Do we have a way to put all scenarios to same folder after 2 times run as below?
```
backstopjs('test', { htmlConfig })
.then(backstopjs('test', { canvasConfig }));
```
I tried this but backstopJs saves result to two diff [date-time] folders. Or

3. Do we have a way to consolidate 2 [date-time] folder info to one `html_report/config.js`?
As I know so far, `config.js` will always be refeshed to latest run.

Why I'm asking is
- Enabling GPU for hundreds of exisiting html scenarios would reduce performance much, just for some new canvas cases.
- The current html reference images is changed a bit (without `disable-gpu` flag) as image content is moved to right about 5px. It's strange. So I don't want to update all of them for non-scense.

My backup plan is clone backstopJs job to new one and tweak a bit to adapt canvas cases and it would create two separate html reports.

Note:
backstopJs version: ^3.5.10

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.