Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I am writing automation test scripts using Protractor and now I need to set up the CI for this using Jenkins.

Tasks it needs to perform are:

  1. Starting the selenium standalone server.
  2. Starting the test using the conf.js file.
  3. Stopping the selenium standalone server.

Can anyone help in this regard?

1 Answer

0 votes
by (62.9k points)

I created a script, as follows:

# start selenium

./node_modules/protractor/bin/webdriver-manager start > /dev/null 2>&1 &

# wait until selenium is up

while ! curl http://localhost:4444/wd/hub/status &>/dev/null; do :; done

# run the build

grunt cibuild --force

# stop selenium

curl -s -L http://localhost:4444/selenium-server/driver?cmd=shutDownSeleniumServer > /dev/null 2>&1

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...