框架使用python自带的unittest。ddt数据驱动;Excel管理测试用例、yaml管理测试页面元素,并对selenium API进行了封装,简化代码量同时记录log
- case.xlsx 测试数据
- page_data.yaml 页面对象数据
- send_email.py 邮件发送模块
- testsuite.py 测试用例集
- gettestdata.py 获取测试数据模块
- HTMLTestRunner_cn.py 美化后的报告模块(替代HTMLTestRunner)
- log.py 日志模块
- selse_feng.py 封装selenium方法
注意:如果ide导入模块失败,可以在命令行pip安装,命令如下
- 升级pip: python -m pip install --upgrade pip(提示Could not find a version that satisfies the requirement yaml (from versions: ) No matching distribution found for yaml 时候使用)
- 安装yaml: pip install pyyaml
- 安装xlrd: pip install xlrd
- 安装ddt: pip install ddt