# postman2case
[](https://github.com/HttpRunner/postman2case/blob/master/LICENSE) [](https://travis-ci.org/HttpRunner/postman2case) [](https://coveralls.io/github/HttpRunner/postman2case?branch=master)
Convert postman data to JSON testcases for HttpRunner.
## usage
To see ``postman2case`` version:
```shell
$ python main.py -V
0.0.1
```
To see available options, run
```shell
$ python main.py -h
usage: main.py [-h] [-V] [--log-level LOG_LEVEL]
[postman_testset_file] [output_testset_file]
Convert postman testcases to JSON testcases for HttpRunner.
positional arguments:
postman_testset_file Specify postman 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 ``postman2case`` like this:
```shell
$ python3 main.py test/test.json output.json
INFO:root:Generate JSON testset successfully: output.json
```
As you see, the first parameter is postman 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 postman source file path, the output testset is in JSON format by default and located in the same folder with source file.
```shell
$ python3 main.py test/test.json
INFO:root:Generate JSON testset successfully: test/test.output.json
```
## generated testset
generated JSON testset ``output.json`` shows like this:
```json
[
{
"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": []
}
}
]
```
[](https://github.com/HttpRunner/postman2case/blob/master/LICENSE) [](https://travis-ci.org/HttpRunner/postman2case) [](https://coveralls.io/github/HttpRunner/postman2case?branch=master)
Convert postman data to JSON testcases for HttpRunner.
## usage
To see ``postman2case`` version:
```shell
$ python main.py -V
0.0.1
```
To see available options, run
```shell
$ python main.py -h
usage: main.py [-h] [-V] [--log-level LOG_LEVEL]
[postman_testset_file] [output_testset_file]
Convert postman testcases to JSON testcases for HttpRunner.
positional arguments:
postman_testset_file Specify postman 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 ``postman2case`` like this:
```shell
$ python3 main.py test/test.json output.json
INFO:root:Generate JSON testset successfully: output.json
```
As you see, the first parameter is postman 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 postman source file path, the output testset is in JSON format by default and located in the same folder with source file.
```shell
$ python3 main.py test/test.json
INFO:root:Generate JSON testset successfully: test/test.output.json
```
## generated testset
generated JSON testset ``output.json`` shows like this:
```json
[
{
"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 postman2case 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 | |
|---|---|---|---|
| postman2case-0.0.1.tar.gz | 4.5 kB | Details |
Release files / postman2case-0.0.1.tar.gz
| Download URL | postman2case-0.0.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8609f080856e079cfc43bef2be31f3a8fec0ced3db9ed8a168bfa2ba8b31046c
|
|
BLAKE2b-256 checksum How to use checksums |
597e6cd3131e395e1659bd9823997328feb09f3563fa992e0949e88ad05419dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|