# projectqimo3 **Repository Path**: welldonexing/projectqimo3 ## Basic Information - **Project Name**: projectqimo3 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-07 - **Last Updated**: 2026-01-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 人力资源综合服务系统自动化测试项目 ## 项目简介 本项目是基于Python+Selenium+pytest框架的人力资源综合服务系统自动化测试项目,包含四个主要功能模块的自动化测试用例。 ## 小组信息 潘星有 以及url 所指定的成员 ## 项目结构 ``` hr_test_project/ ├── pages/ # 页面对象模型 │ ├── page_login.py # 登录页面对象 │ ├── page_political.py # 政治面貌页面对象 │ ├── page_position.py # 岗位管理页面对象 │ └── page_link.py # 友情链接页面对象 ├── test_cases/ # 测试用例 │ ├── test_login.py # 登录测试用例 │ ├── test_political.py # 政治面貌测试用例 │ ├── test_position.py # 岗位管理测试用例 │ └── test_link.py # 友情链接测试用例 ├── test_data/ # 测试数据 │ ├── test_data.json # JSON测试数据 │ └── position_desc.txt # 岗位说明书示例文件 ├── utils/ # 工具类 │ ├── utils_driver.py # 浏览器驱动工具 │ ├── base_page.py # 基础页面类 │ └── email_sender.py # 邮件发送工具 ├── reports/ # 测试报告目录 ├── conftest.py # pytest配置文件 ├── pytest.ini # pytest配置 ├── requirements.txt # 依赖包 └── Jenkinsfile # Jenkins配置文件 ``` ## 环境要求 - Python 3.8+ - Chrome浏览器 - ChromeDriver(与Chrome版本匹配) ## 安装依赖 ```bash pip install -r requirements.txt ``` ## 运行测试 ### 运行所有测试 ```bash pytest ``` ### 运行指定测试文件 ```bash pytest test_cases/test_login.py ``` ### 运行指定测试用例 ```bash pytest test_cases/test_login.py::TestLogin::test_login ``` ### 生成测试报告 ```bash pytest --html=reports/report.html --self-contained-html ``` ## 测试模块说明 ### 1. 登录模块测试 - 验证正确登录 - 验证密码输入错误 - 验证密码为空 ### 2. 政治面貌类别测试 - 验证类别名称为空 - 验证类别名称重复 - 验证类别名称长度超过限制 ### 3. 岗位管理测试 - 验证正确添加岗位 - 验证岗位名称重复 - 验证岗位名称长度超过限制 ### 4. 友情链接管理测试 - 验证正确添加链接 - 验证链接名称为空 - 验证链接地址为空 - 验证链接名称重复 ## Jenkins集成 项目包含Jenkinsfile,支持在Jenkins上实现: - 每2分钟自动运行测试 - 自动生成测试报告 - 自动发送测试结果到指定邮箱 ### Jenkins配置步骤 1. 在Jenkins中创建新的Pipeline项目 2. 配置源码管理(Gitee) 3. 配置构建触发器(Poll SCM,设置为H/2 * * * *) 4. 配置邮件通知 5. Pipeline脚本选择"Pipeline script from SCM" ## 注意事项 1. 测试使用Chrome浏览器,请确保ChromeDriver版本与Chrome版本匹配 2. 测试系统地址:http://172.16.130.103:38962/suthr 3. 备用地址:http://172.16.130.103:13056/suthr 4. 登录账号:hrteacher/123456 5. 系统管理员账号:admin/123456 6. 邮件发送功能需要配置正确的邮箱信息