I need to run my E2E tests with PhantomJS because we use a continuous integration server that doesn't have any browsers installed. I use Protractor with Angular CLI but I haven't found any examples of configuration for PhantomJS. Any ideas?
3
votes
github.com/textbook/known-for-web/blob/master/…
- jonrsharpe
This not working with angular-cli webpack
- user3518668
Works fine for me: travis-ci.org/textbook/known-for-web. If you're having problems, give a minimal reproducible example that demonstrates them.
- jonrsharpe
Well thank you for your reply. I installed the latest angular-cli version and i tried your project. The IHM is working but when i run ng e2e i got the same error like before: [13:35:41] E/launcher - Error: Server terminated early with status 1 at Error (native) at C:\Users\t662255\Downloads\known-for-web-master\known-for-web-master\node_modules\protractor\node_modules\selenium-webdriver\remote\index.js:242:20
- user3518668
1 Answers
4
votes
I'm running protractor tests against chrome inside a docker container using xvbf. It's arguably closer to a production like environment than PhantomJS and you can still run it "headless".
This is the docker image I'm using https://hub.docker.com/r/shusson/chrome-tester/ which is based on https://hub.docker.com/r/webnicer/protractor-headless/