Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

E2E testing with PhantomJS and Angular CLI

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?

like image 711
user3518668 Avatar asked Aug 29 '26 18:08

user3518668


1 Answers

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/

like image 140
shusson Avatar answered Aug 31 '26 07:08

shusson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!