生成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.2.tar.gz
(11.2 kB
view details)
Built Distribution
xlrp-0.0.2-py3-none-any.whl
(11.3 kB
view details)
File details
Details for the file xlrp-0.0.2.tar.gz
.
File metadata
- Download URL: xlrp-0.0.2.tar.gz
- Upload date:
- Size: 11.2 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 | 9454f1cbff1e9399865123ececa6106763d1426f253536ecdb20273cc97d4db2 |
|
MD5 | eaca7c36df6e2dfe392ede705661ef04 |
|
BLAKE2b-256 | 0c9b9fd64a2221ec1779e11f5eeafe6aa62302dba9fb21e2d28e31a4c434e122 |
File details
Details for the file xlrp-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: xlrp-0.0.2-py3-none-any.whl
- Upload date:
- Size: 11.3 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 | 66452b7b0f55f18e2f34f96a884a5ac28040d81451e69b2ffaf5295d457bb89e |
|
MD5 | b940d2fca7d150d185764ca5961f9fa1 |
|
BLAKE2b-256 | 1d889e423a543b0c3fe120a42ef7a7a54221956ec6b3bc3c4a45fa16fcbd856a |