Live data from Hacker News

Wraith – A screenshot comparison tool from the BBC

github.com

11–20 of 38 posts

Re: Wraith – A screenshot comparison tool from the BBC

#11
post #4
post #2

I don't see the value of this. What sort of use case does this have?

Pixel perfect on all browsers?

Bear in mind that this uses a webkit based browser for all shots, so it doesn't give cross-browser comparisons.

It is for regression testing of css modifications, whether from developer or simply when using some kind of compression tool on source code you know is correct.

Re: Wraith – A screenshot comparison tool from the BBC

#12
post #11
post #4

Earlier quoted context omitted.

Pixel perfect on all browsers?

Bear in mind that this uses a webkit based browser for all shots, so it doesn't give cross-browser comparisons. It is for regression testing of css modifications, whether from developer or simply when using some kind of compression tool on source code you know is correct.

According to the page, it supports both PhantomJs (Webkit) and SlimerJs (Firefox/Gecko)

Re: Wraith – A screenshot comparison tool from the BBC

#15
post #14

Is there any reason why you couldn't do this non-visually? That is, using PhantomJS to determine that a DOM element is within certain bounds for a position using if statements?

That probably would be a better approach, you're right. They could even still render the DOM-based diffs.

They even mention anti-aliasing rendering issues, and applying of a 20% fuzz factor to work around it...

Re: Wraith – A screenshot comparison tool from the BBC

#17
post #14

Is there any reason why you couldn't do this non-visually? That is, using PhantomJS to determine that a DOM element is within certain bounds for a position using if statements?

There's a few reasons:

Simplicity. This automatically tests the whole page "for free".

Robustness of feedback for time spent. A small visual change could cascade into lots of tests cases that must be updated (rendering is hard, look how long it took IE to get it right). You don't need to update any tests with this tool, you just give the OK to a visual diff with expected changes.

Dynamic content. The BBC homepage is going to be different every day. Writing tests to test this could be arduous and error prone. Testing production content on build 779 vs 780 is a simple way to test regressions.

Re: Wraith – A screenshot comparison tool from the BBC

#18
post #2

I don't see the value of this. What sort of use case does this have?

Disclosure: I'm a developer of this tool & work for BBC News.

We use this for catching things that we'd never spot, a good example of how it has helped us is after a giant Sass refactor, we ran this tool against the old CSS site and the new CSS site, this showed us where things were off by a pixel or two (as well as big formatting changes).

We've found this tool rather valuable, we're not saying everyone will, or that others should use it. We open sourced it because it might help someone.

Re: Wraith – A screenshot comparison tool from the BBC

#19
post #12
post #11

Earlier quoted context omitted.

Bear in mind that this uses a webkit based browser for all shots, so it doesn't give cross-browser comparisons. It is for regression testing of css modifications, whether from developer or simply when using some kind of compression tool on source code you know is correct.

According to the page, it supports both PhantomJs (Webkit) and SlimerJs (Firefox/Gecko)

It does, kind of crudely though. You have to comment out a method and then comment out another.

There's a ruby refactor that allows you to just specify an environment var.

Post reply on HN