garris / BackstopJS

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

[Question]How to integrate BackstopJS in Jenkins ? #766

Open mdiha opened 6 years ago

mdiha commented 6 years ago

Am new to BackstopJs and i find it a very useful tool however i didn't find the correct configuration in order to integrate it in Jenkins. If anywone can help me that would be great and thx in advance :)

garris commented 6 years ago

@mirzazeyrek may be able to point you to some documentation.

Kenith commented 6 years ago

Try to use docker to run

mdiha commented 6 years ago

@garris yeah thats what i actually need, some documentation that would help me alot.

mdiha commented 6 years ago

@Kenith is there any documentation on running backstop via docker ?!

garris commented 6 years ago

This is all we have so far. Would be great if someone could create a step by step tutorial.

https://github.com/garris/BackstopJS/blob/master/docker/README.md

mdiha commented 6 years ago

Yeah thats what we need tutorials for BackstopJS :)

mdiha commented 6 years ago

Is it possible to integrate BackstopJS via a Maven project with Gulp which would be in github and runin build tests in jenkins ? Is this the appropriate integration ?

mdiha commented 6 years ago

@klausbayrhammer Hello i saw that you talked about using backstopjs in jenkins, can u please help me to do so, i mean to integrate backstopjs in jenkins ?! and thx in advance :)

ataylorme commented 6 years ago

I use BackstopJS to run a visual regression report with CircleCI on every GitHub pull request to post the results back to the PR. This is the bash script.

I can't help with Jenkins as I don't have experience with it but it shouldn't be too hard to adapt it to other CI services, like Jenkins.

rickdroce commented 6 years ago

You could take the existing docker image of backstopjs and adapt it a little bit for Jenkins. Right now that image is just used to run the tests, but with little modifications, you can turn it into a container where Jenkins can run backstopjs commands. Once you have adapted the image you just have to create a pipeline which agent is docker, with uses the backstopjs image.

After that, it's pretty much done, just run some steps where you take references and so on.

N.B. I've integrated my backstopjs tests on Jenkins and in this issue I'm pointing a little improvement to make this integration worth full

mirzazeyrek commented 6 years ago

Oh, sorry didn't saw those messages before. Very busy and rough last few weeks for me. It would be nice if github has notification feature like in linkedin or facebook.

Basically what you need to is execute your tests and publish junit test reports as a post build job. @mdiha

image

I do agree a tutorial might be useful. No deadline promises but I'm planning to work on a simple one 👍 @garris

You can search junit on readme.md for the other details:

"paths": {
  "ci_report" :  "backstop_data/ci_report"
},
"ci": {
  "format" :  "junit" ,
  "testReportFileName": "myproject-xunit", // in case if you want to override the default filename (xunit.xml)
  "testSuiteName" :  "backstopJS"
},
Kenith commented 6 years ago

@mdiha Sorry for the delay. I have made a jenkins integration here: https://github.com/Kenith/ta-visual-lib/tree/master/Jenkins

@garris I am working on pulling a request about Jenkins Integration to https://github.com/garris/BackstopJS/blob/master/docker/README.md. Any news will let you know asap.

Kenith commented 6 years ago

@garris @mirzazeyrek @mdiha Pull request for Jenkins Guide is here: https://github.com/garris/BackstopJS/pull/790

You are very welcome if you have any comments.