Awesome
selenium-travis
Selenium IDE, selenium-side-runner, and Travis CI.
Just one of the things I'm learning. https://github.com/hchiam/learning
This is an example repo that has Travis CI set up to run the selenium-side-runner
command, which runs a Selenium IDE .side file, which was recorded by using a visual interface tool (a Chrome Extension called Selenium IDE). When I push a new commit, it creates a new build and shows test results on Travis CI here:
If you want to test out the selenium-side-runner
command locally on your own computer, you can do this:
git clone https://github.com/hchiam/selenium-travis.git
cd selenium-travis
npm install # or: yarn
And then run this command:
npm run test # or: yarn test
Or just npm t
. (Either way, it runs selenium-side-runner
under the hood.)
Make sure to enable the specific GitHub repo in Travis CI
- https://travis-ci.org/account/repositories
- Search for the relevant GitHub repo
- Hit the sliding button so it moves to the right / turns green
Some of the resources I learned from
- Chrome extension Selenium IDE. You can see the example .side file here.
- Commands used in that Chrome Extension.
- Overview video, starting at CLI steps (I skimmed this video).
selenium-side-runner
CLI command.- Example GitHub repo that makes basic use of Travis CI.
- Example .travis.yml file by RustyNail that uses
selenium-side-runner
. - First build for this repo that worked and how the .travis.yml file looked at the time
Aside
To skip running Travis CI upon commit, the commit message should contain [skip ci]
, or [ci skip]
, or [skip travis]
, etc. (ci, travis, travis ci, travis-ci, or travisci).
You might also be interested in an alternative
Travis CI using Spectron/mocha spec.js
to simulate user input and button clicks in an Electron.js app:
https://github.com/hchiam/anonymous-input
Note these 4 files: .travis.yml
, travis-build.sh
, package.json
, and test/spec.js
.