Selenium/Ruby/Automation discussion

Topics to discuss about browser test automation

- a few Jenkins slave machines - set up Selenium grid[7] - use a hosted Selenium grid, for example Sauce Labs[8] or TestingBot[9].
 * 1) I would suggest that we try to run one simple test that drives a browser from Jenkins. Since you have already created some code[1], we could reuse it. For example, we could run upload wizard tests[2].
 * 2) I would make sure the tests run fine on my machine. It would involve adding a few files to the repository, so the test can use them for uploading.
 * 3) We also need to set up a dummy user at test site, since file upload works only for logged in users. You maybe already have created it
 * 4) We should ask operations guys how they store usernames and passwords. If we make the test code public, we have to make sure our real credentials are not in the repository.
 * 5) Maybe we could publish credentials for dummy user. In that case we have to make sure the user has almost no privileges on the site. We should also maybe automatically (every day?) delete all contributions made by the user.
 * 6) The simplest way to run the tests on Jenkins machine would be to run them using a headless browser[3]. I have recently set it up for another client. We have to make sure Xvfb[4] is installed on the server. We also need a browser, for example Firefox.
 * 7) The last thing we need on the Jenkins server is Ruby and a few Ruby gems. We can either use Ruby that is already there, or we could install Ruby via RVM[5].
 * 8) I would highly recommend using RVM. It makes managing Ruby and Ruby gems really easy. It installs Ruby and Ruby gems just for one user (jenkins). I think it requires build tools to be installed on the machine. (I do not have a Linux machine handy at the moment, so I can not check.)
 * 9) If we decide to use RVM, there is Jenkins RVM plugin[6] that makes is easy to install RVM, Ruby and configure gemsets. I have also recently used it on a project for another client and I was really pleasantly surprised how good it works and how simple it is to use.
 * 10) If RVM is a security risk, we could install it on a Jenkins slave machine that Jenkins master machine would send tests to. I was able to set up master-slave Jenkins machines for a client recently.
 * 11) When the number of tests grows, to speed up test runs we can use:

I think that sums up the conversation. Please let me know if I forgot to mention something.


 * would we always need shell access to the jenkins host? or just to install some basic Ruby/Xvfb/etc. one time?

Željko --
 * [1] https://github.com/chrismcmahon/Page-Object-WMF-spike
 * [2] https://github.com/chrismcmahon/Page-Object-WMF-spike/blob/master/spec/upload_wizard/upload_wizard_spec.rb
 * [3] http://watirwebdriver.com/headless/
 * [4] http://en.wikipedia.org/wiki/Xvfb
 * [5] https://rvm.io/
 * [6] https://wiki.jenkins-ci.org/display/JENKINS/RVM+Plugin
 * [7] http://selenium-grid.seleniumhq.org/
 * [8] https://saucelabs.com/
 * [9] http://testingbot.com/

- Under what circumstances should we target the following test environments and features?

Beta labs

nitial test targets:


 * Article Feedback
 * AFTv5 is scheduled to get backend changes soon, we want to make sure the front end remains stable


 * New Pages Feed/Page Curation toolbar
 * NPF/Curation is under active development right now in production. Toolbar could be challenging.


 * UploadWizard (commons)
 * UW has had recent improvements for Wiki Loves Monuments and Mobile

Production


 * post-deploy sanity check is harder than it would seem
 * other areas?

Commons


 * both beta labs and production?

Wikisource


 * ProofreadPage extension is subject to breakage

Architecture questions

Should we use Cucumber? or just RSpec only?

Create a client/server/grid environment
 * id server with Antoine
 * find clients. Sauce Labs? our own VMs?
 * Windows issues

Repositories

Right now I have in mind two separate repositories, possibly interlinked


 * A repo that members of the community can run locally
 * The community should be able to contribute new tests and enhancements to this repo


 * A repo that runs via WMF Jenkins on WMF hardware

Github and/or gerrit
 * Discuss integration, Mobile (and others) are using Github, but we should have gerrit integration

Mobile http://en.m.wikipedia.org/
 * Michelle and Tomasz