The Travis documentation contains three main ways :
- PhantomJS titleless browser
- launching Firefox with a virtual display or
- using VMware Saucelabs
Testing with PhantomJS is the fastest because it does not model the display (it still allows you to create screenshots). PhantomJS comes with a run-jasmine example .
The phantom script test can be executed directly by simply running
script: phantomjs run-jasmine.js
in your .travis.yml , without the extra overhead of a build system like Grunt.
If testing your project requires a real browser graphical interface, this leaves you with options 2 or 3.
Saucelabs browser virtual machines have the advantage of real cross-browser testing; if your project is open source, they offer a free <free rel = "noreferrer">. They also provide a detailed tutorial for your specific use case: Travis + Jasmine + Saucelabs , which, however, requires Grunt to run.
source share