Running Protractor Tests on Docker
配置这个Protractor环境真是折磨死人了,webdriver-manage update怎么都不成功,即使自己下载好chromederiver放到相应文件夹下,也不能使用。费时三四天终于按照https://github.com/angular/protractor-cookbook/tree/master/protractor-docker这里的方法弄好了
首先你得确保安装了docker
docker -v
如果已经成功安装了会显示如下
Docker version 17.12.-ce, build c97c6d6
Step 0 - Download the docker images for Selenium Hub and Selenium Node
docker pull selenium/hub:latest
docker pull selenium/node-chrome:latest
如果你想要使用firefox-node,可以pull 'node-firefox'。想要了解不同镜像的更多信息,可以查看Docker Selenium Images List
Step1 - Starting the Selenium Grid
docker run -d -p : --name selenium-hub selenium/hub:latest
One can change the tag from 'latest' to '2.53.0' or any other version as they see fit.
Step2 - Starting the Selenium Nodes
docker run -d --link selenium-hub:hub selenium/node-chrome:latest
The above would create a chrome node and link it to the Selenium hub/grid created earlier.
Step3 - Running the tests
更新配置文件中的SeleniumAddress如下:
seleniumAddress: 'http://localhost:4444/wd/hub'
运行测试文件
./node_modules/.bin/protractor protractor-conf.js
有时候会不支持es6的语法结构,可以先使用babel进行转码, 需要安装babel,babel-cli,babel-core,babel-preset-latest,babel-preset-stage-2等依赖,配置.babelrc文件。
babel-node ./node_modules/.bin/protractor protractor-conf.js
我的项目中package.json

.babelrc文件

Running Protractor Tests on Docker的更多相关文章
- SWTError: No more handles [gtk_init_check() failed] running platform tests (on Linux)
http://www.lemmster.de/2013-12-19-swterror-no-more-handles-gtk_init_check-failed-running-platform-te ...
- Configuring and Running Django + Celery in Docker Containers
Configuring and Running Django + Celery in Docker Containers Justyna Ilczuk Oct 25, 2016 0 Commen ...
- Running Web API using Docker and Kubernetes
Context As companies are continuously seeking ways to become more Agile and embracing DevOps culture ...
- VMWare File Format Learning && Use VHD File To Boot VMWare && CoreOS Docker Configuration And Running
目录 . Virtual Machine Introduce . Vmware Image File Format . VHD File Format . Convert VHD File Into ...
- 转:VS2010调试NUnit测试项目 (Running or debugging NUnit tests from Visual Studio without any extensions)
If you write unit tests and use NUnit test framework this may be helpful. I decided to write this si ...
- [Git] Automatically running tests before commits with ghooks
Wouldn't it be nice if everyone ran the tests before committing code? With ghooks, you can automatic ...
- Running tests on PyCharm using Robot Framework
问题: I started using PyCharm with the robot framework, but i'm facing an issue. how can i run my test ...
- Scala + Play + Sbt + Protractor
Scala + Play + Sbt + Protractor = One Build 欢迎关注我的新博客地址:http://cuipengfei.me/ 我所在的项目的技术栈选用的是Play fra ...
- docker之常用命令、自定制镜像、公(私)仓库的上传和下载
一.docker命令 1.参数和命令汇总 1. 参数 Options: --config=~/.docker Location of client config files #客户端配置文件的位置 - ...
随机推荐
- 常用命令(Linux、Android、adb)
1. Linux 2. Android 1. pm (package Manager) 1). 安装APK(一般不使用,用adb我感觉更好) pm install -r /data/card/Ap ...
- Markdown 语法整理大集合2017
简明教程:https://ouweiya.gitbooks.io/markdown/ 1.标题 代码 注:# 后面保持空格 # h1 ## h2 ### h3 #### h4 ##### h5 ### ...
- [译]用R语言做挖掘数据《三》
决策树和随机森林 一.实验说明 1. 环境登录 无需密码自动登录,系统用户名shiyanlou,密码shiyanlou 2. 环境介绍 本实验环境采用带桌面的Ubuntu Linux环境,实验中会用到 ...
- Solr后台管理
Solr web管理后台 访问主页:http://localhost:8080/solr/#/ 1. Dashboard 仪表盘,显示Solr的基本信息,包含solr版本,包含系统内存和jvm内存的使 ...
- 百度搜索URL参数含义
序号 参数 含义 1 tn 搜索框所属网站.比如 tn=sitehao123,就是 http://www.hao123.com/ 左上那个搜索框(指通过什么方式到达百度首页搜索界面;) 2 s?wd ...
- final关键字的特点
1.这个关键字是一个修饰符,可以修饰类,方法,变量. 2.被final修饰的类是一个最终类,不可以被继承. 3.被final修饰的方法是一个最终方法,不可以被覆盖. 4.被final修饰的变量是一个常 ...
- jvm工具及命令大全
虚拟机栈 栈桢大小缺省为1M,可用参数 –Xss调整大小,例如-Xss256k 堆 -Xms:堆的最小值: -Xmx:堆的最大值: -Xmn:新生代的大小: -XX:NewSize:新生代最小值: ...
- MySQL安装再折腾--编码的设置
一.MySQL的安装 从官网(https://dev.mysql.com/downloads/mysql/)中下载Mac OS X 10.12 (x86, 64-bit), DMG Archive(m ...
- Linux ssh开启服务
1.登陆linux系统,打开终端命令.输入 rpm -qa |grep ssh 查找当前系统是否已经安装 2.如果没有安装SSH软件包,可以通过yum 或rpm安装包进行安装 启动SSH服务2 安装 ...
- 利用open live writer工具的Metaweblog技术API接口同步到多个博客。
测试例子内容: hello world hello metaweblog hello open live writer