Chapter6: web driver IO & mocha
This section contain the following items:
1.Introduction
2.What is webdriverio?
3.Environment setting
4.Apply to project and analysis
5.Reference
1.Introduction
2.What is webdriverio?
3.Environment setting
OSX Yosemite v10.10.5
Node: v5.0.0
1)mkdir webdrivverio-test & cd webdrivverio-test
2)Download seleniu standalone server 2.53.1:
3)Download Firefox 47.0.1:
4)Modify package.json:
"dependencies": {
"assert": "^1.4.1",
5)sudo npm install
7)start to work :
7.1)launch standalone server in webdrivverio-test folder:
java -jar selenium-server-standalone-2.53.1.jar
7.2)launch http server which you want to test :
node app.js
7.3) launch webtest.js:
node webtest.js
8)Test result:
```
4.Apply to project and analysis
1) 從程式碼中可以了解Mocha屬於BDD的測試框架, 目的以User Story作為出發, 是因此程式碼看起來多半都是When
5.Reference
```
```
Last updated
Was this helpful?