
Security News
Meet the Socket Team at RSAC and BSidesSF 2025
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
gtc(generate test case) 是一个把http请求转换为测试代码的cli工具
pip3 install gentccode
gtc version
执行下面命令,会在当前目录生成api文件(api.yaml
)和测试代码的脚本文件(test_case.py
)
gtc curl curl.txt -a res.code=0
gtc postman postman.json
gtc swagger2 swagger.json
根据笛卡尔积算法生成用例脚本
# 对请求中的body进行操作
gtc cp -n . -p body curl.txt
gtc cp -n filter. -p body curl.txt
# 对请求中的query param进行操作
gtc cp -n . -p query curl.txt
执行下面命令,会生成对应的压测脚本
# jsonassert 是对response的断言, rate 是tps, time 是 5min
gtc jmeter curl.txt --jsonassert code=0 --rate 10 --time 5
# locust脚本
gtc locust curl.txt
FAQs
generate test case code
We found that gentccode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
Security News
Biome's v2.0 beta introduces custom plugins, domain-specific linting, and type-aware rules while laying groundwork for HTML support and embedded language features in 2025.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.