Giter Club home page Giter Club logo

wdio-demo's Introduction

wdio-demo

以 WebDriverIO 前端測試框架實際運行的範例

目錄

技術架構

前端測試框架

WebDriverIO

Styles

  • BDD Styles

斷言函式庫

測試碼設計樣式

Within your web app’s UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.

簡單來說就是降低重複程式碼,當 UI 變動時,只需要修改一個地方

專案結構

.
├── ...
└── test
    ├── pageobjects
    └── specs

系統需求

  • node 8
  • npm 5 (or yarn 1)
  • docker 17
  • docker-compose 1.18.0
  • Chrome Browser (dev environment)
  • Firefox Browser (dev environment)
  • webdriver-manager (dev environment)

安裝

$ npm i

or

$ yarn

開發環境安裝

selenium server in local:

$ npm install webdriver-manager chimp -g
$ webdriver-manager update

測試

selenium server in local

$ webdriver-manager start
$ npm run dev-test

即時監聽 (需要加入 @watch 才會被監聽):

$ npm run watch-test

selenium server in drone

How to install the Drone CLI

$ npm run test-with-drone

報表 (需搭配 drone cli)

$ npm run test-with-drone
$ npm run gen-report
$ npm run open-report

參考資料

wdio-demo's People

Contributors

eden90267 avatar

Stargazers

Dognose avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.