I've signed up to Travis CI for private repositories. All my current tests are PHP based but I wish to test my Angular/2 CLI frontend solution using protractor. I've been googling around and keep seeing "Saucelabs" as an additional tool.
Do I need to sign up to saucelabs or a.n.other 3rd party provider in order to run protractor with a github/travis? Any idiot-friendly articles for a novice?
Many thanks.
You don't need to sign up for Saucelabs. You can set up your Travis CI build with a Virtual Framebuffer to imitate a display.
You will need to add the following to your .travis.yml:
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
Firefox is installed in all Travis CI containers, so you will only need to start a web server after this in the before_script section that will start your application and then you can run your Protractor tests.
For more details, you can check this: https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With