Can I use Transporter with Github / Travis CI without SauceLabs

I signed up for Travis CI for private repositories. All my current tests are based on PHP, but I want to test my external Angular / 2 CLI solution using protractor. I searched and searched for "Saucelabs" as an additional tool.

Do I need to subscribe to saucelabs or another third-party provider to start the protractor with github / travis? Any friendly articles for newbies?

Thank you very much.

+5
source share
1 answer

You do not need to subscribe to Saucelabs. You can customize your Travis CI build with Virtual Framebuffer to simulate the display.

You 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 only need to start the web server after that in the before_script section, which will launch your application, and then you can run Protractor tests.

For more information, you can check this: https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI

+2
source

Source: https://habr.com/ru/post/1263265/


All Articles