Skip to main content

MeterSphere2Case

Convert MeterSphere data to yaml testcases for HttpRunner.

Click here download the chrome plugin

usage

To see MeterSphere2Case version:

$ python main.py -V
0.0.1

To see available options, run

$ python main.py -h
usage: main.py [-h] [-V] [--log-level LOG_LEVEL]
               [MeterSphere_testset_file] [output_testset_file]

Convert MeterSphere testcases to JSON testcases for HttpRunner.

positional arguments:
  MeterSphere_testset_file  Specify MeterSphere 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 MeterSphere2Case like this:

$ python3 main.py test/test.json output.json
INFO:root:Generate JSON testset successfully: output.json

As you see, the first parameter is MeterSphere 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 MeterSphere source file path, the output testset is in JSON format by default and located in the same folder with source file.

$ 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:

[
    {
        "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": []
        }
    }
]

Release files for ms2case 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ms2case 0.0.8
File Size Uploaded
ms2case-0.0.8.tar.gz 6.2 kB Details

Release files / ms2case-0.0.8.tar.gz

Download URL ms2case-0.0.8.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
27f6c6390a24e397301e61356d640bea2a2e04c241c81d71ec679bfcbfac0135
BLAKE2b-256 checksum
How to use checksums
3046667c65d0b0b2c65a49327f261814e318c03f170018dac220c5738939d16a
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

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page