A framework for testing yunce offline plan
Project description
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
- http请求(区分上层yaml)
- 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()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icecream_cmri-1.2.2-py2.py3-none-any.whl.
File metadata
- Download URL: icecream_cmri-1.2.2-py2.py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa005e35daffb4a0fc93ad3eedae6ddce19fedeb4f180f76a4ab2e791c48089a
|
|
| MD5 |
0de05e3446eed34b152a498083f98079
|
|
| BLAKE2b-256 |
2535b172010c3631d44b7b7db6995646e1dba741b7bd396586cfe8732e6f77ee
|