E2E测试之Headless browser容器化

目的 E2E测试执行过程中不依赖UI界面 可在*nix系统中运行 为什么不用PhantomJS,Protractor官方不推荐使用PhantomJS来测试 We recommend against using PhantomJS for tests with Protractor. There are many reported issues with PhantomJS crashing and behaving differently from real browsers. Docker 安装 下载系统所需要的安装包,下载地址:https://www.docker.com/products/docker 注册https://hub.docker.com/账号 使用pull来获取docker 镜像protractor-headless,此过程会比较慢,耐心等待 docker hub地址:https://hub.docker.com/r/webnicer/protractor-headless/ git hub地址:https://github.com/jciolek/docker-protractor-headless docker pull webnicer/protractor-headless ...

August 1, 2016 · 3 min · Yuanjie

Protractor End to End Testing

Protractor Protractor is an end-to-end test framework for AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would. 是什么 基于Node.js的程序 使用Jasmine测试框架测试接口,针对AngularJS的应用程序 官网: http://angular.github.io/protractor/#/ Github: https://github.com/angular/protractor 功能 模拟真实的用户操作行为 针对AngularJS中的Element不需要做特殊的处理,普通HTML元素也同样支持 智能等待,不需要为页面中的加载和同步显示做特殊的等待时间处理 ...

April 28, 2016 · 4 min · Yuanjie