Selenium自动化测试项目介绍
测试代码知识点
- 运行类继承unittest.TestCase类
- setUP()测试准备方法,用于环境初始化
- teardown()测试结束方法,用于环境清理
- 所有测试执行方法需要以test_开头
- 两个测试动作执行方法test_webui_1(),test_webui_2()
- get_config()方法读取配置文件
- 运行程序之前需要将配置文件iselenium.ini复制/粘贴到自己测试执行环境的user.home目录下,并按照自己机器的实际路径配置chrome_driver的路径
jenkins配置步骤
- jenkins创建任务
- 配置git地址链接(ssh格式)
- 添加运行参数,控制是否为有界面运行
- 添加python库更新代码 pip install -r requirements.txt
- 添加运行代码 pytest -sv test/web_ut.py
- 添加Allure Report到post-build Actions中用于展示测试结果
Appium自动化测试项目介绍
- 移动端ui自动化测试-安卓
- 测试app:ContactManager
- app自动化驱动框架 Appium
- 自动化测试架构 pytest
- 引入依赖 Pytest-testconfig 安装方法:pip install pytest-testconfig