前言
之前使用 Python + flask 开发的 selenium 自动化测试用例管理、执行平台,终于克服懒癌把业务相关的信息剥离掉,代码放到了GitHub 上面:
github地址: https://github.com/jerrylizilong/autotest_platform \ https://jerrylizilong.github.io/autotest_platform/ (越整理越发现自己代码写得烂,如有不足请轻拍)
效果介绍原帖地址: https://testerhome.com/topics/11183
执行效果: 执行单条用例:
执行用例集:
autotest_platform(懒得想名字,先这么叫着)
基于python+selenium的自动化测试管理、执行平台。
版本要求:
python 3.4 以上 selenium : 建议使用 3.0 以上版本 mysql : 建议 5.5 以上
1. 管理平台:
基于flask进行开发,进行用例、用例集、步骤等的增删改查等功能。 启动 flask:
python run.py
2. 启动core服务:
python core.py
- 基于selenium进行封装,从数据库中读取需要执行的测试用例,并转化、执行、记录测试结果及截图。
- 需结合selenium grid 或 selenium docker 作为节点进行具体执行载体。
3. 启动atx core服务:
python atx_core.py
- 基于atx 进行封装,从数据库中读取需要执行的测试用例,并转化、执行、记录测试结果及截图。
- 需安装atxserver(https://github.com/openatx/atx-server),并修改 app/config.py 文件的以下内容:
# atx 配置
isUseATX=True # True 代表使用 atx
ATXHost = 'http://172.16.100.168:8002' # 对应的 atxserver 地址
安装步骤:
1. clone 或下载代码包到本地解压:
git clone https://github.com/jerrylizilong/autotest_platform.git