I would like to pass a parameter from Jenkins into my baseURL:
value in my protractor conf file. Is this possible? If so, how do I do that?
Asked
Active
Viewed 691 times
2

DarthOpto
- 1,640
- 7
- 32
- 59
1 Answers
2
Do it from the command-line when starting protractor:
protractor protractor.conf.js --baseUrl="http://127.0.0.1:900"

alecxe
- 462,703
- 120
- 1,088
- 1,195
-
will this work if the command I run is `npm run
` ? – DarthOpto Jul 20 '16 at 23:37 -
@DarthOpto yeah, you can pass arguments with `npm run`, please see http://stackoverflow.com/questions/11580961/sending-command-line-arguments-to-npm-script. – alecxe Jul 21 '16 at 02:05
-
We are actually using the following command with npm. `npm run e2e-bvt -- --baseUrl=http://$URL --suite=$TESTSUITE_NAME --capabilities.browserName=$BROWSER` – DarthOpto Aug 04 '16 at 16:29