Jatin
Jatin

Reputation: 670

How to run Protractor in Bamboo CI

I am trying to run my protractor test case in Bamboo CI but it throws an installation error.

I am able to install node modules using npm task but somehow I am not able to install and run protractor in my bamboo plan. Is there a different way of doing it or I am doing something wrong.

Please find attach the snapshot from my bamboo plan :

Npm install enter image description here

Protractor Task

enter image description here

And my error log is as follow

/tmp/RDMPDEV-MAP-JOB1-91-ScriptBuildTask-6009702493071779000.sh: line 1: protractor: command not found

Please advice

Upvotes: 2

Views: 2300

Answers (2)

sapan
sapan

Reputation: 150

You can also trigger protractor tests in bamboo via angular cli command e2e. Definition of e2e in package.json

"e2e": "ng e2e --no-serve --base-href"

Please refer below screenshot showing this configuration in bamboo. Remember to add commandline parameter to e2e command in bamboo as required like --base-href

enter image description here

Upvotes: 0

Optimworks
Optimworks

Reputation: 2547

You did not mention commands for protractor and web-driver installation. Do following:

  1. Write below commands into Command* text filed under npm configurations section. Either put all commands separate by a comma or add one more configuration section if you could see any such option. or check in advanced options

Commands:

 install -g protractor

 webdriver-manager update
  1. Write 'webdriver-manger start' as first line in script body and then write 'protractor conf.js'

You should mention all test spec in conf.js file and run conf.js file from script body.

Script body looks like:

 1. webdriver-manager start
 2. protractor conf.js

Upvotes: 1

Related Questions