When I run the e2e tests for my angularjs application, I need to run following commands in different shell session:
// start the selenium server
webdriver-manager start
// start a http server to serve current files
node_modules/http-server/bin/http-server .
// run the e2e tests
protractor test/protractor-conf.js
The first 2 commands will keep running when I start them.
I tried to add a npm script to define a task to run them together:
"scripts" : {
"e2e-test": "webdriver-manager start && node_modules/http-server/bin/http-server . && protractor test/protractor-conf.js"
}
The problem is, when I run it by:
npm run-script e2e-test
It just run the first one and blocking there, the other ones have no chance to run.
What's the best solution to do it?