Skip to main content

icecream 说明

icecream 用于http相关接口测试,通过类似postman的描述文件进行接口测试,并进行测试结果收集,目前支持yaml描述

支持功能

  • 支持yaml文件用例描述
  • 支持全局变量,环境变量,局部变量
  • 支持如postman的prerequest, test
  • 支持python自定义函数
  • 支持python全系统语法及所有第三方包
  • 支持常用assert断言格式

使用方法

  • code方案
    • http请求(区分上层yaml)
      • ice.request 主请求,可以使用ice.response进行响应
      • ice.send_request, 用于直接返回的请求,不可以使用ice.response进行响应
    • 变量应用
      • ice.environment.set() get
      • ice.variables.set() get
      • ice.globals.set() get
    • 断言使用
      • ice.test.less
      • ice.test.eq
  • yaml组织方案
    • 查看samples样例

离线报告

计划目录结构
│─tesp_plan
│   ├─测试111
│   └─测试222
└─start_test.py
  • 安装云测执行包:pip install icecream_cmri
  • 命令行执行
    • 指定计划执行 icecream_hrunner --plan_dir=plan --plan_name=testname
    • 所有计划执行 icecream_hrunner --plan_dir=plan
  • 代码执行
import os
from datetime import datetime
from icecream.core.html_runner import Html_Runner


def main():
    plan_dir = 'tesp_plan'
    report_dir = os.path.join(os.getcwd(), 'report', datetime.now().strftime('%Y%m%d%H%M%S'))
    plan_names = os.listdir(plan_dir)
    for plan_name in plan_names:
        html_runner = Html_Runner(plan_path=os.path.join(plan_dir, plan_name), report_dir=report_dir)
        html_runner.run()
        html_runner.generat_report()


if __name__ == '__main__':
    main()

Metadata

Release files for icecream-cmri 1.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for icecream-cmri 1.2.9
File Interpreter ABI Platform Actions
icecream_cmri-1.2.9-py2.py3-none-any.whl Python 2, Python 3 none any Details for icecream_cmri-1.2.9-py2.py3-none-any.whl

Release files / icecream_cmri-1.2.9-py2.py3-none-any.whl

Download URL icecream_cmri-1.2.9-py2.py3-none-any.whl
Size 2.1 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e300055618ba292649e6ad5587cd178ca04a0738314cb15c0306c0aaa75966b9
BLAKE2b-256 checksum
How to use checksums
d6c00f21528e0e9faaca9d1c06973d91cf71637bdfb22903068b81dd5698dd81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Security for icecream-cmri 1.2.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page