BackstopJS icon indicating copy to clipboard operation
BackstopJS copied to clipboard

How to generate the diff report from 2 directories?

Open klodoma opened this issue 4 years ago • 2 comments

I haven't checked the code yet, is there a simple way to generate a diff report from 2 different directories?

I am having some inconsistencies in results and would like to compare several test-results to track down the cause.

klodoma avatar Aug 04 '21 08:08 klodoma

Hi @klodoma, this ability is not built-in -- although, many engineers have asked for this.

The 2 approaches to do this would be

A) create a new command for comparing backstop directories

If you wanted to add a new command to do this (maybe called compare) the entry point would be here...

image

Where you would replace createBitmaps with a script which takes a path argument that points to an already existing directory and simply passing this along without the need for generating new bitmaps. This value would be passed directly to the executeCommand.report inside the config obj on line 18.

LMK if you want some more context on how you would rewrite createBitmaps to do this.

or B) A generic way to compare an arbitrary series of consistently named bitmap files existing in any directories

see... Use BackstopJS as a comparison tool #1334

Cheers.

garris avatar Aug 04 '21 16:08 garris

Thanks for the feedback. I'll have a look and come up with something. I would really like to have such a functionality, also the possibility to generate the "result" report in different repositories. I'll create a new issue to discuss this feature.

klodoma avatar Aug 09 '21 14:08 klodoma