Protractor and Selenium in Gulp and Jenkins
You need to do this in multiple steps/tasks with the help of gulp
:
- start a selenium server (if you are using a local selenium server)
- start a web server, see
gulp-webserver
(you were missing this step) - run protractor tests
- shutdown a web server
- shutdown a selenium server
A fully working example of such configuration can be found on angular-seed project.https://github.com/angular/angular-seed
I have managed to successfully use this example to use protractor
tests in my GitHub project: https://github.com/atais/angular-eonasdan-datetimepicker
So you may use either to help you out.
Basically the easiest way is to:
- run
http-server
as daemon - run gulp tests
- manage everything from npm (
package.json
)
Full code is avaialable here: https://stackoverflow.com/a/41983565/1549135