generate test case code
Project description
简介
gtc(generate test case) 是一个把http请求转换为测试代码的cli工具
功能
- 支持解析curl命令
- 支持解析postman文件
- 支持解析swagger2文件
- 支持生成笛卡尔积测试脚本
- 支持解析curl文件并生成Jmeter性能脚本
- 支持解析curl文件并生成Locust性能脚本
- 支持解析postman文件并生成Jmeter性能脚本
- 一键生成Jmeter性能压测方案脚本
安装
pip3 install gentccode
gtc version
使用
- 执行下面命令,会在当前目录生成api文件(
api.yaml
)和测试代码的脚本文件(test_case.py
)
gtc curl curl.txt
gtc postman postman.json
gtc swagger2 swagger.json
- 根据参数生成笛卡尔积的用例脚本
gtc cp -n a. curl.txt
- 执行下面命令,会生成对应的压测脚本
gtc jmeter curl.txt --jsonassert code=0 --rate 10 --time 5
gtc locust curl.txt
已知问题
- 若postman文件中有变量,则不会生成相对应的代码块.
- url中必须有http或https协议头
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
gentccode-0.2.8.tar.gz
(16.2 kB
view hashes)
Built Distribution
gentccode-0.2.8-py3-none-any.whl
(19.8 kB
view hashes)
Close
Hashes for gentccode-0.2.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25285d0b8f13faf2718290c4913d9697390b5243fdfaed3ee4da969b6ee586b1 |
|
MD5 | 296389685ff54a42c49169b8318e68a1 |
|
BLAKE2b-256 | 209782e0859799cebc022c79fc7160e8fcf1ac5657702e8ec61439141f29cc82 |