HuddleEng / PhantomCSS

Visual/CSS regression testing with PhantomJS
MIT License
4.72k stars 259 forks source link

use a docker container to run tests in #172

Closed thedavidmeister closed 7 years ago

thedavidmeister commented 8 years ago

Hey, I've had some success running tests from inside a docker container, which removes the differences in rendering based on the environment.

Thought it might be worth considering/testing here.

jamescryer commented 8 years ago

Thanks, certainly makes sense to mitigate against OS rendering differences. We'd love to hear how you did it, advantages of using Docker containers, and setup steps for newbies.

thedavidmeister commented 7 years ago

@jamescryer i'm no longer working at the company that i set this up for, so probably shouldn't drop their code in wholesale.

regardless, it wasn't that hard, it just involves making a minimal dockerfile with the screenshotting scripts in it with a way for them to "see" the site on the host, and then a way to get the generated screenshots back out to the host.

you could probably make such a dockerfile and distribute it with this repo.

thedavidmeister commented 7 years ago

@jamescryer certainly at least an order of magnitude easier to setup the dockerfile than try to juggle inconsistencies between OS with heuristics as you're talking about a single, upfront cost vs. an ongoing struggle with fragile empirical results

jamescryer commented 7 years ago

There's definitely a need for this for some people, but not one I'm willing to invest in or support right now given the mostly homogeneous environment setup at Huddle.

Thanks