Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chinanf-boy/exercism-rust-zh-webdriver
test: <webdriverIO usage> part of exercism-rust-zh ❤️ ✅
https://github.com/chinanf-boy/exercism-rust-zh-webdriver
exercism-rust selenium-webdriver test web-test
Last synced: 19 days ago
JSON representation
test: <webdriverIO usage> part of exercism-rust-zh ❤️ ✅
- Host: GitHub
- URL: https://github.com/chinanf-boy/exercism-rust-zh-webdriver
- Owner: chinanf-boy
- Created: 2018-11-25T05:11:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-25T05:15:52.000Z (about 6 years ago)
- Last Synced: 2024-10-28T05:19:45.544Z (2 months ago)
- Topics: exercism-rust, selenium-webdriver, test, web-test
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# llever.com/exercisms-rust-zh 自动化测试 Cargo test
exercisms-rust-zh 项目的测试,不一定完全成功,存在
- 游乐场超时
- 网络不好
- 杂七杂八> [无钱搞云测试](http://webdriver.io/guide/usage/cloudservices.html#With-Travis-CI),就这样
## 开发
- 1. [已用过 node 库`webdriverio`](#简单命令完成以上安装步骤)
- 2. 从头开始- [按安装步骤来](#%E6%8C%89%E5%AE%89%E8%A3%85%E6%AD%A5%E9%AA%A4%E6%9D%A5)
- [开启,`selenium`+`geckodriver`](#%E5%BC%80%E5%90%AFseleniumgeckodriver)
- [集成`selenium`](#%E9%9B%86%E6%88%90selenium)
- [简单命令(完成以上安装步骤)](#%E7%AE%80%E5%8D%95%E5%91%BD%E4%BB%A4%E5%AE%8C%E6%88%90%E4%BB%A5%E4%B8%8A%E5%AE%89%E8%A3%85%E6%AD%A5%E9%AA%A4)
- [话题](#%E8%AF%9D%E9%A2%98)### 按安装步骤来
webdriverio 的自动化测试,需要两样东西
- `selenium` java 库
```bash
curl -O http://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar
```> 如没有用过 java,像我一样是 Mac 的话,`brew cask install java`,
> 若出现 quarantine 权限问题加上`--no-quarantine`- `geckodriver` 联系浏览器的驱动(二进制)
```bash
curl -L https://github.com/mozilla/geckodriver/releases/download/v0.21.0/geckodriver-v0.21.0-macos.tar.gz | tar xz
```#### 开启,`selenium`+`geckodriver`
```bash
java -jar -Dwebdriver.gecko.driver=./geckodriver selenium-server-standalone-3.5.3.jar
```> (注意,存放路径,与命令运行路径的关系)
[官方参考](http://webdriver.io/guide.html)
### 集成`selenium`
- [./wdio.conf.js](./wdio.conf.js) 的 `services: ['selenium-standalone'],`注释去掉
你就不需要,操作以上内容,**但是**,这只不过是将安装过程隐藏在代码命令行之后(没有太强网速,这种办法并不可取)### 简单命令(完成以上安装步骤)
- `npm install`后
- `npm test`
## 话题
使用自动化框架[webdriverio](https://github.com/webdriverio/webdriverio)
> 此库非,良好的webdriverio测试编码方式,如有需要,请查看[入门套件](https://github.com/klamping/wdio-starter-kit)
> 主要区别在于,此库缺少`test/**.page.js`的编写,但不可否认是一种很好的测试分隔,主要是我懒而已