garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.81k stars 607 forks source link

Failing tests in Travis CI after updating to V2 #312

Open Primajin opened 8 years ago

Primajin commented 8 years ago

After updating to V2 many tests fail in Travis CI, while working both locally and in V1.

Primajin commented 8 years ago

Running on 2.06 I finally got it to work now.

I compile my css in gulp and open a browsersync server to serve the tests. In v1 I used gulp-chug to run the gulp based v1 BackstopJS test in CLI mode.

Now in v2 and CI mode (notice the missing L) there is no gulp at all. While npm test is still hard wired to firing up the server I added a second npm script, because somehow running backstop test directly via gulp-shell did not work.

Now gulp shell runs npm run testBackstop which itself runs backstop test - which then tests correctly. BUT then hanging up the process - so I needed to pipe the shell command and then terminate it with gulp-exit.

It's working now but in a totally weird way - if anyone has a better solution, I'm happy to hear.

klausbayrhammer commented 8 years ago

A couple of days ago #336 was merged which is a new way of integrating backstopjs in your build system. It should be available with the latest version of Backstopjs. See the installing backstopjs locally section of the readme for more infos