zinserjan / wdio-visual-regression-service

Visual regression service for WebdriverIO.
MIT License
102 stars 39 forks source link

Screenshots slowing down test #72

Open yebrahim opened 6 years ago

yebrahim commented 6 years ago

Is there a way of taking the screenshot, saving it to disk, and diffing it against the reference in an async mode? I can see the browser have to wait for a second or so for each checkDocument call, slowing the test suite quite a bit. It would be great if the browser can rush through the tests and queue up the image saving/diffing separately.

zinserjan commented 6 years ago

Sorry for the late response.

Since v0.9.0 the image comparison is async for each screenshot taken in a checkDocument call. But it blocks the command of course until all images are compared, otherwise we cannot provide the result report.

But I'm not sure if this is the case for LocalCompare cause it uses node-resemble-js. Feel free to test it. If it isn't async maybe we can use some kind of worker for resemblejs like worker-farm.