Skip to main content

Convert POSTMAN data to JSON testcases for HttpRunner.

Project description


LICENSE Build Status coveralls

Convert postman data to yaml testcases for HttpRunner.


To see postman2case version:

$ python -V

To see available options, run

$ python -h
usage: [-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.


In most cases, you can run postman2case like this:

$ python3 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.

$ python3 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": "",
                "headers": {
                    "Content-Type": "application/json"
                "json": {
                    "UserName": "test001",
                    "Pwd": "123",
                    "VerCode": ""
            "validate": []

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pm2case-0.0.7.tar.gz (7.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page