简体   繁体   English

使用PhantomJS和Angular CLI进行E2E测试

[英]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. 我需要使用PhantomJS运行我的E2E测试,因为我们使用的是一个没有安装任何浏览器的持续集成服务器。 I use Protractor with Angular CLI but I haven't found any examples of configuration for PhantomJS. 我使用Protractor和Angular CLI,但我没有找到PhantomJS的任何配置示例。 Any ideas? 有任何想法吗?

I'm running protractor tests against chrome inside a docker container using xvbf. 我正在使用xvbf在docker容器内运行针对chrome的量角器测试。 It's arguably closer to a production like environment than PhantomJS and you can still run it "headless". 它可以说比PhantomJS更接近生产环境,你仍然可以“无头”地运行它。

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/ 这是我正在使用的dockps图片https://hub.docker.com/r/shusson/chrome-tester/ ,它基于https://hub.docker.com/r/webnicer/protractor-headless/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM