生成excel测试报告
Project description
xlrp - Excel测试报告生成
xlrp可以方便的在代码中添加标记,生成excel报告,包含运行的所有用例,以及用例运行的报告图表
用例标记
标记可以使用装饰器或者with的形式,标明代码块的所属
SysName
类、函数、方法上面使用装饰器形式,可以添加一个name参数,代表当前测试的系统名称 代码内部,使用with的形式,with SysName(xxx):
ModelName
函数、方法上面使用装饰器形式,可以添加一个name参数,标明后续用例所属模块 代码内部,使用with的形式,with ModelName(xxx):
StepName
函数、方法上面使用装饰器形式,可以添加一个name参数,标明当前测试的用例 代码内部,使用with的形式,with StepName(xxx):
运行单个函数、方法
在运行单个函数或者方法的时候,可以使用run方法 run方法接受两个参数 obj代表当前需要运行的方法或者函数名称 param_iter代表实际参数,运行会循环列表中的数据,放入函数中运行
from XLRP import xlrp
runner = xlrp.Runner()
runner.run(testcase, [a, b, c])
运行整个class用例
from XLRP import xlrp
runner = xlrp.Runner()
runner.run_class(testclass)
保存报告图像到excel
from XLRP import xlrp
runner = xlrp.Runner()
runner.run_class(testclass).plot_save_excel('test.xlsx')
保存所有数据,默认形式
会在当前文件目录下生成一个XlrpReport文件夹,存放excel报告文件
from XLRP import xlrp
runner = xlrp.Runner()
runner.run_class(testclass).save_default()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xlrp-0.0.3.tar.gz
(11.5 kB
view details)
Built Distribution
xlrp-0.0.3-py3-none-any.whl
(11.6 kB
view details)
File details
Details for the file xlrp-0.0.3.tar.gz
.
File metadata
- Download URL: xlrp-0.0.3.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f79d8a051d7d41f919f6e34af1b29e4925000d72f9c0fb1a3a8386429212916 |
|
MD5 | 703e27b4a493fa6fea5d16d6fd75ac7b |
|
BLAKE2b-256 | 92144210a9801823811d54c25350ed497f57e169b8f037da547e040d4ce731a7 |
File details
Details for the file xlrp-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: xlrp-0.0.3-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb7352670d544443d46df2f6bb1e5631b91fc78144ff6663294303fc4bae5142 |
|
MD5 | 461661e1eb817dd069ee966935811149 |
|
BLAKE2b-256 | e13daed8e3d4b18a8d587f28c37eea73dbe9d65b93002d416cadca174fcf24de |