前置
- 安装allure并配置好环境变量
- 项目根目录新建 hooks.py 实现动态扩展函数
- 编写测试文件代码
- 执行测试
作用
graphql, restful HTTP/HTTPS 接口测试工具,需要编写代码
example
# testcase.py
from gruntest.grunner import Grunner
from gruntest.schemas import Config, TestStep, RequestSchema
class TestRunner(Grunner):
config = Config(
base_header={"Host": "49.232.203.244:1339"}
)
steps = [
TestStep(
name='百度',
request=RequestSchema(
url='http://www.httpbin.org/get',
method='get',
headers={"token": "123"},
params={"limit": 5, "page": 1}
),
extra={"code": "$.args.limit"}
),
TestStep(
name='百度',
request=RequestSchema(
url='http://www.httpbin.org/get',
method='get',
headers={"token": "123"},
params={"limit": 5, "page": "${sum2('$code')}"}
),
extra={"code": "$.args.limit"},
expect={"$.code": "code"}
)
]
Metadata
Release files for gruntest 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gruntest-0.1.1.tar.gz | 6.2 kB | Without provenance | Details for gruntest-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gruntest-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for gruntest-0.1.1-py3-none-any.whl |
Total release size: 13.9 kB
Release files / gruntest-0.1.1.tar.gz
| Download URL | gruntest-0.1.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b213053e31a68cd956650e15d7524eec85ac0ed9bbd20e572637421d6de763b
|
|
BLAKE2b-256 checksum How to use checksums |
3d8a4a783bc3829cbded3d4d4787b52457a1a73586c0bf45d1e6ab28bc12f99d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.4 Windows/10
|
Release files / gruntest-0.1.1-py3-none-any.whl
| Download URL | gruntest-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
050f483bcf936320d21ee5f5cc83be6c82ef79cb7801d6662304dd41a52aa0ee
|
|
BLAKE2b-256 checksum How to use checksums |
0ddfc155dde3fd2aad6e0b7f77707b15dc0de77ac77a72b1f160752232eb7c6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.4 Windows/10
|
Security for gruntest 0.1.1
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.