Screenshot comparison on osx / linux

Get help with testing, discuss unit testing strategies etc.
Post Reply
User avatar
Damo
Posts: 10
Joined: Wed May 20, 2015 11:17 am

Screenshot comparison on osx / linux

Post by Damo » Mon Dec 17, 2018 12:25 pm

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

Code: Select all

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

User avatar
nickolay
Core Developer
Core Developer
Posts: 3329
Joined: Mon May 16, 2011 10:48 am

Re: Screenshot comparison on osx / linux

Post by nickolay » Tue Dec 18, 2018 10:08 am

Hi,

--screenshot-compare-with-base will create a "base" image if there's none. I'll investigate this issue shortly.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
nickolay
Core Developer
Core Developer
Posts: 3329
Joined: Mon May 16, 2011 10:48 am

Re: Screenshot comparison on osx / linux

Post by nickolay » Tue Dec 18, 2018 10:25 am

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":

Code: Select all

launcher.binDir + '/binary/imagemagick/' + launcher.getPlatformId() + '/' + command + (launcher.isWindows ? '.exe' : ''),
to just

Code: Select all

command,
Please let me know if that helps.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
Damo
Posts: 10
Joined: Wed May 20, 2015 11:17 am

Re: Screenshot comparison on osx / linux

Post by Damo » Tue Dec 18, 2018 11:33 am

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

User avatar
Damo
Posts: 10
Joined: Wed May 20, 2015 11:17 am

Re: Screenshot comparison on osx / linux

Post by Damo » Tue Dec 18, 2018 2:43 pm

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