Skip to main content

生成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


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.4.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

xlrp-0.0.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file xlrp-0.0.4.tar.gz.

File metadata

  • Download URL: xlrp-0.0.4.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

Hashes for xlrp-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0634379f931fa96e6f51b12c0b2898c2515804f75996fe07d2605eedda135a00
MD5 4ca74766018ca94704c181c7b5395c6f
BLAKE2b-256 293ce029e44b8c1dd4b4af0314420d229c634d435eca22ca1997981645d11448

See more details on using hashes here.

File details

Details for the file xlrp-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: xlrp-0.0.4-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

Hashes for xlrp-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e9151c11af9b789e27576c0e810e410df6b37bfe7316a599faadd0644b5a1c66
MD5 80dfdb5f41a819f429ab1ab50c2a0aaa
BLAKE2b-256 b6fef04b5d1abc940f227fd15867ad6a6057c47493f66096c711ad41931ff0e4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page