生成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.1.tar.gz
(11.2 kB
view details)
Built Distribution
xlrp-0.0.1-py3-none-any.whl
(11.3 kB
view details)
File details
Details for the file xlrp-0.0.1.tar.gz
.
File metadata
- Download URL: xlrp-0.0.1.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 | 522cec6bcccb1405dcce5e78a5c81946b73c2679104492f3f79cee16f442a77b |
|
MD5 | 1a1c6d2e32979a7a0087163cf5f822d1 |
|
BLAKE2b-256 | c1a487fba773b4918a1db601590e352ec94b3c08f0d9d6c87f1cd6d66b581497 |
File details
Details for the file xlrp-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: xlrp-0.0.1-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 | 885d5f9cfb997a11db881b0f19265fff840869f54c8acfe2939e936fc14d449e |
|
MD5 | 4b3618ae84147154e9f95b744b753be4 |
|
BLAKE2b-256 | c08f6a73cfbfa3b862768613ec50cc786b0dda08b0426239a6436ddc562fcf1f |