apidoc2runner
Convert apidoc data to JSON testcases for HttpRunner.
apidoc规范
usage
To see apidoc2runner version:
$ python main.py -V
To see available options, run
$ python main.py -h
usage: main.py [-h] [-V] [--log-level LOG_LEVEL]
[apidoc_testset_file] [-- output_dir] [-- output_file_type]
Convert apidoc testcases to JSON testcases for HttpRunner.
positional arguments:
apidoc_testset_file Specify apidoc testset file.
-- output_dir Optional. Specify converted JSON testset folder.
-- output_file_type Optional. Generate file format , default json.
optional arguments:
-h, --help show this help message and exit
-V, --version show version
--log-level LOG_LEVEL Specify logging level, default is INFO.
examples
In most cases, you can run apidoc2runner like this:
$ python3 main.py tests/data/test.json --output_dir tests/apidoc2runner --output_file_type yaml
INFO:root:Generate JSON testset successfully: output.json
As you see, the first parameter is apidoc source file path, and the second is converted JSON file path.
The output testset file type is detemined by the suffix of your specified file.
If you only specify apidoc source file path, the output testset is in JSON format by default and located in the same folder with source file.
$ python3 main.py tests/data/test.json
INFO:root:Generate JSON testset successfully: test/test.output.json
generated testset
generated JSON testset output.json shows like this:
[
{
"test": {
"name": "/api/v1/Account/Login",
"request": {
"method": "POST",
"url": "https://httprunner.top/api/v1/Account/Login",
"headers": {
"Content-Type": "application/json"
},
"json": {
"UserName": "test001",
"Pwd": "123",
"VerCode": ""
}
},
"validate": []
}
}
]
参考来源
Metadata
Release files for apidoc2runner 0.0.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 |
|---|---|---|---|---|
| apidoc2runner-0.0.1.tar.gz | 7.9 kB | Without provenance | Details for apidoc2runner-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apidoc2runner-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for apidoc2runner-0.0.1-py3-none-any.whl |
Total release size: 18.9 kB
Release files / apidoc2runner-0.0.1.tar.gz
| Download URL | apidoc2runner-0.0.1.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40f87818b181d28e2e88a305e607a883065d134af2e31d90e2ffc212f4d54306
|
|
BLAKE2b-256 checksum How to use checksums |
4c78761292a7d8d84205b5078ee40ffe1e4e0d6c0f6eaae4f889b5c1617fe498
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / apidoc2runner-0.0.1-py3-none-any.whl
| Download URL | apidoc2runner-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3063cb2a1543d6daac7d0ef9b21a0257b471c454eef2fe41aeb98bf36514679
|
|
BLAKE2b-256 checksum How to use checksums |
795955bd7c0ee7866078628dad08073833fc01f1821798d8d73cd18c24f70f0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for apidoc2runner 0.0.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.