logo
0
0
WeChat Login
qiangsheng<qiangsheng.huang@foxmail.com>
feat: 完善ReadMe

AutoTest

基于 pytest ,用于robokit和rdscore的自动化测试的脚本库

测试前需要配置的内容

pip install -U pytest
pip install -U pytest-html

运行测试用例方式

AutoTest 目录下,通过控制台运行下面的指令:

  • 测试rbk
pytest test_rbk -v --html=report.html --self-contained-html
  • 测试rdscore
pytest test_rdscore -v --html=report.html --self-contained-html

最后测试结果在report.html

APILib

APILib 中 rbklib.py 实现了机器人RBK的接口。

APILib 中 orderLib 实现了rdscore的接口。

测试文件夹名称和文件名规则

pytest是 python 的第三方测试框架,是基于 unittest 的扩展框架,比 unittest 更简洁,更高效。使用 pytest 编写用例,必须遵守以下规则:

  1. 测试文件名必须以 test_ 开头或者 _test 结尾(如: test_ab.py )

  2. 测试方法必须以 test_ 开头。

  3. 测试类命名以 Test 开头。