Home

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:

Build Status

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

  1. https://travis-ci.org/account/repositories
  2. Search for the relevant GitHub repo
  3. Hit the sliding button so it moves to the right / turns green

Some of the resources I learned from

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.