A library of tools to quickly expand UI testing
Project description
sktest
基于selenium的关键字ui快速测试框架,旨在让测试不用再花费大量的时间去编写测试代码或维护代码,只需要设计好你的测试用例,自动化的执行交给我们。
- 使用excel编写并维护用例
- 以业实际务流程驱动测试
- 定位每一个业务步骤的执行情况
- 自动生成测试报告,并将用例执行情况及报告发送到指定邮箱
运行环境
- 操作系统:Windows
- python版本:3.5+
- 浏览器:兼容chrome(默认)、Firefox、ie
- 注:请确保你的driver在环境变量PATH,或者你应该指定executable_path
安装
pip install sktest
快速使用
- 新建一个测试项目
- 安装sktest
- 在项目下新建两个目录---testcase、report
- 将测试用例的excel文件放入testcase目录下(测试用例编写格式见下面示例)
- 新建一个.py文件,编写代码:'from sktest.run import Run'
- 实例化Run对象,调用run(),自动化程序便跑起来了
测试用例示例
- 重点:
- 编写用例的sheet 名字必须是你所指定sheet_name,如果没有配置默认是 'case'
- 存放元素的sheet 名字必须是 'elements'
- 用例表单页面和元素列的名字必须和元素表page和element保持一致
自定义配置信息
或者你可以尝试自己配置一些信息,在你创建的py文件修改这些配置信息
- 导入
- 自行配置测试用例文件的路径(excel_file_path),无需再创建testcase目录
- 配置浏览器及driver(browser_name、executable_path),默认的是Chrome,driver会从python安装路径或者PATH获取
- 配置邮件信息(email_account、email_password、email_receiver、case_object_name)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sktest-0.1.7.tar.gz
(12.0 kB
view hashes)