WebUI自动化测试框架搭建(python+pytest+selenium+allure)

  1. 环境准备

本次使用的自动化测试框架使用的开发语言为python-3.10、单元测试框架为pytest-7.10、web应用程序自动化测试工具selenium-4.15、测试报告生成工具allure-2.13

  • python安装

python官网下载地址:Download Python | Python.org

直接下载最新版本:

WebUI自动化测试框架搭建(python+pytest+selenium+allure)_第1张图片

也可以选择其他版本:

WebUI自动化测试框架搭建(python+pytest+selenium+allure)_第2张图片
WebUI自动化测试框架搭建(python+pytest+selenium+allure)_第3张图片

安装教程:python 3.10.0 的安装(环境安装和配置教程)_python3.10_普通网友的博客-CSDN博客

  • selenium安装

打开命令提示符窗口,输入命令pip install selenium

WebUI自动化测试框架搭建(python+pytest+selenium+allure)_第4张图片

下载浏览器驱动(以Chrome为例):

首先查看自己浏览器的版本号

WebUI自动化测试框架搭建(python+pytest+selenium+allure)_第5张图片

打开浏览器驱动下载地址chromedriver.storage.googleapis.com

你可能感兴趣的:(python,pytest,selenium)