# selenium_pytest_allure_ruoyi **Repository Path**: wttcode/selenium_pytest_allure_ruoyi ## Basic Information - **Project Name**: selenium_pytest_allure_ruoyi - **Description**: 基于Python语言,使用框架selenium+pytest+allure,对若依系统进行UI自动化测试 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 0 - **Created**: 2023-11-18 - **Last Updated**: 2024-03-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # selenium_pytest_allure_ruoyi #### 介绍 基于Python语言,使用框架Selenium+Pytest+Allure对[若依系统](https://gitee.com/y_project/RuoYi-Vue)进行UI自动化测试,使用关键字驱动的模式对测试步骤中的某些操作封装成函数进行调用。 #### 软件架构 - Selenium:Web应用程序测试的工具 - Pytest:单元测试框架 - Allure:可以生成精美的自动化测试报告 #### 技术描述 1. 使用@pytest.fixture夹具进行统一创建driver和关闭driver,并可以传递给测试函数使用; 2. 使用@pytest.mark 可以给用例打标记,可以针对性测试用例; 3. 使用@pytest.mark.run,可以控制测试用例运行的顺序; 4. 使用allure.attach()可以将测试的过程或截图展示在allure测试步骤上; 5. 使用assert可以进行对测试用例进行断言判断; #### 运行截图 ![输入图片说明](img/01.png) ![输入图片说明](img/02.png)