Get help with testing, discuss unit testing strategies etc.


Post by Damo »

I cannot get screenshot comparison to work at all. When running on my mac I get two possible issues depending on whether you run --screenshot-compare-with-base or --screenshot-compare-with-previous.

With base I see
Taking screenshot has failed with error: TypeError: Path must be a string. Received [Boolean: true]
and with previous I see an issue about libpng15 not being available, I'm running on High Sierra but I cannot see the latest osx making a difference, If I install libpng via homebrew it only installs the latest which is version 16, I have tried grabbing the repo and install the appropriate version of libpng but even that doesn't seem to fix the issue. I have also tried this on our Jenkins instances which are running linux and I have the same problem.

Lastly I am not sure how --screenshot-compare-with-base is meant to work, does it expect there to be a file called image with -base appended to it much like the --screenshot-compare-with-previous renames the current file to be -prev.png? There isn't much documentation for this.

Thanks for the help.
Damo
UX Developer ~ @damianpoole ~ [url=mailto://dpoole@financialforce.com]dpoole@financialforce.com[/url]

FinancialForce.com

Post by nickolay »

Hi,

--screenshot-compare-with-base will create a "base" image if there's none. I'll investigate this issue shortly.

Post by nickolay »

It seems to work fine for me, but I'm on Ubuntu 14, and that might be the different from your setup. It seems the "standalone" imagemagick build, that is bundled with Siesta, is not so "standalone", since it still uses some external libraries.

We'll try to figure out a long-term solution for this in one of the nearest releases. In the meantime, right now, we can try to use the system imagemagick installation.

For that, please install ImageMagick with your package manager, so that its commands are available in the PATH. Then, modify this line in the "bin/siesta-launcher-all.js":
launcher.binDir + '/binary/imagemagick/' + launcher.getPlatformId() + '/' + command + (launcher.isWindows ? '.exe' : ''),
to just
command,
Please let me know if that helps.

Post by Damo »

Hi Nickolay,

Thanks for the assistance.

I'll try this out today and get back to you.
UX Developer ~ @damianpoole ~ [url=mailto://dpoole@financialforce.com]dpoole@financialforce.com[/url]

FinancialForce.com

Post by Damo »

With your suggested changes it does work when using puppeteer and --screenshot-compare-with-previous. Not to get it working in our CI.

Thanks for your help again Nickolay.
UX Developer ~ @damianpoole ~ [url=mailto://dpoole@financialforce.com]dpoole@financialforce.com[/url]

FinancialForce.com

Post Reply