Typography

活版印字


  • Home
  • Archive
  • Categories
  • Tags
  •  

© 2020 alincode

Theme Typography by Makito

Proudly published with Hexo

WebdriverIO 快速建構設定檔

Posted at 2016-04-28 前端測試  WebdriverIO 

建立測試專案

1
2
3
mkdir webdriverio-sandbox && cd webdriverio-sandbox
npm init
npm i webdriverio -S

安裝其他相關的 modules

由於 selenium-server 幾乎是所有前端自動化測試框架的底層,WebdriverIO 也是如此。

1
2
npm install selenium-standalone -g
selenium-standalone install

啟動 webdriverio 內建的快速建構設定檔工具

./node_modules/.bin/wdio config

基本一直 enter,就可以完成了,但別忘了把最後一步換成真正你要測試的 domain url

因為放置測試 code 的資料夾,它不會自動建立,所以這部分還是要手動建立。

mkdir -p ./test/specs

這樣全部測試架構都設定完了,實在非常快吧。

執行測試專案

./node_modules/.bin/wdio wdio.conf.js

小提醒:selenium-standalone 也要啟動 selenium-standalone start

原始碼下載

Share 

 Previous post: 被討厭的勇氣 (重點 5) - 認真活在當下 Next post: 被討厭的勇氣 (重點 4) 

© 2020 alincode

Theme Typography by Makito

Proudly published with Hexo