New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduction of CI tests #447

Closed
wants to merge 14 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@kylejohnson
Member

kylejohnson commented Jun 27, 2014

First shot at adding some tests to travis. This involved rearranging the travis.yml file and then adding a script (run_tests.sh) that gets run at the end of the build. Let's see what happens!

@SteveGilvarry

This comment has been minimized.

Show comment
Hide comment
@SteveGilvarry

SteveGilvarry Jun 27, 2014

Member

I was playing around with Selenium last week, I think this is something like where you are heading? I setup my fork in Travis, makes it easier to kick off test builds. https://travis-ci.org/SteveGilvarry/ZoneMinder
I just put my changes in .travis.yml, but was thinking we needed to separate the processes into scripts. I did some stuff to bring Apache up as I assumed the current CI scripts were not doing it.
I started this off based on your prompt for screenshots on each build, and found a couple ways to do it. First I tried Saucelabs, here is a sample test, hopefully it is publicly viewable, https://saucelabs.com/tests/fc7c1daef22f4309b3d08d1e3faa297d
The other one I want to try is visual regression.
Everything I did is in my repo branch Selenium, needed the Sauce Connect Addon to create the tunnel for Sauce to communicate on, needed to run the travis ruby package to encrypt SauceLabs user name and password, and then I used SE Builder and SE-Interpreter to run the json tests directly. I am just learning CI stuff so happy to help around the edges.
rexd666 on irc if questions

Member

SteveGilvarry commented Jun 27, 2014

I was playing around with Selenium last week, I think this is something like where you are heading? I setup my fork in Travis, makes it easier to kick off test builds. https://travis-ci.org/SteveGilvarry/ZoneMinder
I just put my changes in .travis.yml, but was thinking we needed to separate the processes into scripts. I did some stuff to bring Apache up as I assumed the current CI scripts were not doing it.
I started this off based on your prompt for screenshots on each build, and found a couple ways to do it. First I tried Saucelabs, here is a sample test, hopefully it is publicly viewable, https://saucelabs.com/tests/fc7c1daef22f4309b3d08d1e3faa297d
The other one I want to try is visual regression.
Everything I did is in my repo branch Selenium, needed the Sauce Connect Addon to create the tunnel for Sauce to communicate on, needed to run the travis ruby package to encrypt SauceLabs user name and password, and then I used SE Builder and SE-Interpreter to run the json tests directly. I am just learning CI stuff so happy to help around the edges.
rexd666 on irc if questions

@kylejohnson

This comment has been minimized.

Show comment
Hide comment
@kylejohnson

kylejohnson Nov 29, 2014

Member

Hey @SteveGilvarry - finally circling back to this with all of the new skin progress.

Yes, it looks like selenium and sauce labs would be perfect. I went and added our sauce labs credentials to .travis.cs in master, but haven't had time to do anything else.

Member

kylejohnson commented Nov 29, 2014

Hey @SteveGilvarry - finally circling back to this with all of the new skin progress.

Yes, it looks like selenium and sauce labs would be perfect. I went and added our sauce labs credentials to .travis.cs in master, but haven't had time to do anything else.

@SteveGilvarry

This comment has been minimized.

Show comment
Hide comment
@SteveGilvarry

SteveGilvarry Nov 29, 2014

Member

@kylejohnson Great, I have a fix in a branch somewhere for this pull request as there was one line preventing this from building in Travis. I test against my own Travis, which you may see in the dev channel. Can't stop that update as it is in travis.yml. I think your PR has some extras like a readme update and rhost, so maybe split them out to their own. I will grab your changes from here, the Sauce details and also my first test case to see if we can get it up and running,

Member

SteveGilvarry commented Nov 29, 2014

@kylejohnson Great, I have a fix in a branch somewhere for this pull request as there was one line preventing this from building in Travis. I test against my own Travis, which you may see in the dev channel. Can't stop that update as it is in travis.yml. I think your PR has some extras like a readme update and rhost, so maybe split them out to their own. I will grab your changes from here, the Sauce details and also my first test case to see if we can get it up and running,

@SteveGilvarry

This comment has been minimized.

Show comment
Hide comment
@SteveGilvarry

SteveGilvarry Nov 29, 2014

Member

@kylejohnson Put in a new PR with just the Travis Restructure and Saucelabs stuff. Don't lose your readme,md and kylejohnson@229cfca changes in this one.

Member

SteveGilvarry commented Nov 29, 2014

@kylejohnson Put in a new PR with just the Travis Restructure and Saucelabs stuff. Don't lose your readme,md and kylejohnson@229cfca changes in this one.

@SteveGilvarry

This comment has been minimized.

Show comment
Hide comment
@SteveGilvarry

SteveGilvarry Nov 30, 2014

Member

@kylejohnson Spent some time on it today and got the test updating saucelabs build status, which it doesn't do except via a rest interface, and even got a badge on the readme.md. https://github.com/SteveGilvarry/ZoneMinder/tree/Travis-CI-Restructure
For those interested you can see the tests here including a screenshots. https://saucelabs.com/u/SteveGilvarry

Now I just need Kyle to run the form here https://docs.saucelabs.com/ci-integrations/travis-ci/ with ZoneMinder/ZoneMinder and post the secure forms of the username and key in here and I will update my end and submit the PR. Lots of commits as it's the only way to test Travis - Saucelabs connection.

Not sure if you can erase the insecure ones might be worth trying.

Member

SteveGilvarry commented Nov 30, 2014

@kylejohnson Spent some time on it today and got the test updating saucelabs build status, which it doesn't do except via a rest interface, and even got a badge on the readme.md. https://github.com/SteveGilvarry/ZoneMinder/tree/Travis-CI-Restructure
For those interested you can see the tests here including a screenshots. https://saucelabs.com/u/SteveGilvarry

Now I just need Kyle to run the form here https://docs.saucelabs.com/ci-integrations/travis-ci/ with ZoneMinder/ZoneMinder and post the secure forms of the username and key in here and I will update my end and submit the PR. Lots of commits as it's the only way to test Travis - Saucelabs connection.

Not sure if you can erase the insecure ones might be worth trying.

@kylejohnson

This comment has been minimized.

Show comment
Hide comment
@kylejohnson

kylejohnson Nov 30, 2014

Member

@SteveGilvarry Thank you very much for all of this work. Can we sync up tomorrow some time? Between this PR being from back in June, and then #610, I am a little bit lost.

You're right - I will need to cherry pick this merge to grab only the rhost stuff, for example.

Member

kylejohnson commented Nov 30, 2014

@SteveGilvarry Thank you very much for all of this work. Can we sync up tomorrow some time? Between this PR being from back in June, and then #610, I am a little bit lost.

You're right - I will need to cherry pick this merge to grab only the rhost stuff, for example.

@SteveGilvarry

This comment has been minimized.

Show comment
Hide comment
@SteveGilvarry

SteveGilvarry Nov 30, 2014

Member

@kylejohnson I killed off #610 as I was having issues and kicking off builds in two Travis accounts. Went back to just my fork and got it working, then made a new branch and squashed some commits that were me just playing around to get things working. I will try and catch you on #zoneminder on Monday. I will do the final PR which still has my Saucelab account in Travis secure variables, then we just need to swap to zoneminder values.

Member

SteveGilvarry commented Nov 30, 2014

@kylejohnson I killed off #610 as I was having issues and kicking off builds in two Travis accounts. Went back to just my fork and got it working, then made a new branch and squashed some commits that were me just playing around to get things working. I will try and catch you on #zoneminder on Monday. I will do the final PR which still has my Saucelab account in Travis secure variables, then we just need to swap to zoneminder values.

@kylejohnson

This comment has been minimized.

Show comment
Hide comment
@kylejohnson

kylejohnson Nov 30, 2014

Member

@SteveGilvarry Another thing which I wasn't clear on - I thought you only needed the username and acccess key for the sauce connect addon in .travis.yml, but you've mentioned that we need to add (encrypted) credentials?

Member

kylejohnson commented Nov 30, 2014

@SteveGilvarry Another thing which I wasn't clear on - I thought you only needed the username and acccess key for the sauce connect addon in .travis.yml, but you've mentioned that we need to add (encrypted) credentials?

@SteveGilvarry

This comment has been minimized.

Show comment
Hide comment
@SteveGilvarry

SteveGilvarry Nov 30, 2014

Member

@kylejohnson Yes you shouldn't put the username and key in public view. Sauce labs have a function on the referenced travis-ci help page to convert the logged in username and key into secure variables for Travis to use. What it does is like it mentions further down that page,
travis encrypt SAUCE_USERNAME=SteveGilvarry --add
and gives me a secure string that contains the variable name and value. Then when we need to use it, like for Sauce Connect, we call $SAUCE_USERNAME and it inserts SteveGilvarry, and no one in public sees username. Same for the key in a separate value.

Member

SteveGilvarry commented Nov 30, 2014

@kylejohnson Yes you shouldn't put the username and key in public view. Sauce labs have a function on the referenced travis-ci help page to convert the logged in username and key into secure variables for Travis to use. What it does is like it mentions further down that page,
travis encrypt SAUCE_USERNAME=SteveGilvarry --add
and gives me a secure string that contains the variable name and value. Then when we need to use it, like for Sauce Connect, we call $SAUCE_USERNAME and it inserts SteveGilvarry, and no one in public sees username. Same for the key in a separate value.

@SteveGilvarry

This comment has been minimized.

Show comment
Hide comment
@SteveGilvarry

SteveGilvarry Jul 3, 2015

Member

#611 has all these changes included I will add some basic tests for the web server and cameras. Then we should be able to implement. Closing this in preference to #611

Member

SteveGilvarry commented Jul 3, 2015

#611 has all these changes included I will add some basic tests for the web server and cameras. Then we should be able to implement. Closing this in preference to #611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment