Fanis Prodromou
  • Blog
  • About
  • Blog
  • About
Search by typing & pressing enter

YOUR CART

11/2/2018 Comments

Separate protractor config for CI server

The protractor.conf.js file is meant to offer a configuration for our e2e tests. The default which come with each new angular-cli app is very good and works really well. We shouldn't extend it unless we expect more.

Although it works well on localhost, what about the CI server?

On this post I wont explain what kind of configuration you might need for your CI, but how to separate the configuration and how to use it
You will need 3 steps:
  1. Have the protractor.conf.js for the CI.
  2. Create a new file, on the same level as the previous one, with name protractor.dev.conf.js which will be the configuration for your development
  3. Create the needed scripts on the package.json file
On the CI server, you should use the e2e script from your package.json file (yarn e2e or npm run e2e).
During development, you can use the local-e2e.
Spot the --protractorConfig option in the package.json which tells which configuration file to use.
Comments
comments powered by Disqus

    Author

    I am an Angular GDE, content creator who loves sharing knowledge

    Follow @prodromouf
    View my profile on LinkedIn

    Tags

    All Angular Angularjs General Graphql Ionic Javascript .net Nodejs Typescript

Proudly powered by Weebly