swagger2case
Convert swagger data to yaml testcases for HttpRunner.
usage
To see swagger2case version:
$ sw2case -V
0.0.1
To see available options, run
$ sw2case -h
usage: sw2case [-h] [-V] [--log-level LOG_LEVEL]
[swagger_testset_file] [output_testset_file]
Convert swagger testcases to JSON testcases for HttpRunner.
positional arguments:
swagger_testset_file Specify swagger testset file.
output_testset_file Optional. Specify converted JSON testset file.
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 swagger2case like this:
$ sw2case test/test.json output.json
INFO:root:Generate JSON testset successfully: output.json
As you see, the first parameter is swagger 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 swagger source file path, the output testset is in JSON format by default and located in the same folder with source file.
$ sw2case test/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 swagger2case 0.0.2
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 |
|---|---|---|---|---|
| swagger2case-0.0.2.tar.gz | 7.7 kB | Without provenance | Details for swagger2case-0.0.2.tar.gz |
Release files / swagger2case-0.0.2.tar.gz
| Download URL | swagger2case-0.0.2.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43c72bf235bece98e06e2546693d953c3d12471114d499cefff80edcff1e2ed2
|
|
BLAKE2b-256 checksum How to use checksums |
f209c0e1f974af3b1bb9d98b46d95610660ad836536e73a9f55d1cade25cff6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5
|
Security for swagger2case 0.0.2
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.