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 #客户端配置文件的位置 - ...
随机推荐
- HDFS Java Client对hdfs文件增删查改
step1:增加依赖 pom.xml ... <!-- https://mvnrepository.com/artifact/org.apache.hadoop ...
- [转]使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【八】——Web Api的安全性
本文转自:http://www.cnblogs.com/fzrain/p/3552423.html 系列导航地址http://www.cnblogs.com/fzrain/p/3490137.html ...
- H5+MUI上传文件
应用场景:MUI+H5+WEBAPI 今天在给我外甥女调手机端上传图片的时候,发现他是直接调用的MUI下的api,直接调取相册或者相机,到最后只看见了一个文件的路径,所以以前写的上传文件就不太好套上去 ...
- 向tekkaman学习
勤奋程度要向tekkaman学习,把这几年落下的补回来.
- 可变参数的lambda表达式
delegate int mydelegate(params int[] a); class Program { static void Main(string[] args) { //接收可变参数的 ...
- 方法执行一次js
var isFirst = true; $(function () { //一级 $("#City").change(function () { var url = "/ ...
- winform程序限制只能打开一个进程
有很多方案,先来最傻瓜式的 : static class Program { /// <summary> /// 应用程序的主入口点. ...
- 怎么实现Linux下的逆波兰计算器dc?
#返回上一级 @Author: 张海拔 @Update: 2014-01-12 @Link: http://www.cnblogs.com/zhanghaiba/p/3516660.html /* * ...
- 一:Jquery-selector
一:jQuery概述 1.基本功能 a.访问和操作DOM元素:获取元素,修改其样式和内容,删除元素,复制元素... b.对页面事件的处理:不需要指定事件中的函数名,直接在事件中绑定响应函数(匿名函数) ...
- Bean的自动装配及作用域
1.XML配置里的Bean自动装配 Spring IOC 容器可以自动装配 Bean,需要做的仅仅是在 <bean> 的 autowire 属性里指定自动装配的模式.自动装配方式有: by ...