/ma-ji-me/
noun
- an earnest, reliable person who can get things done
- dead simple API Unit Testing
What does it do?
- majime runs test cases on API endpoints
- test cases are defined in YAML files
- majime can generate test cases from Swagger specs
Install
pip install majime in a Python3 environment
Or get the binaries for MacOS | Linux | Windows
Usage
Usage:
-f Load and run tests from YAML file
Example: majime -f test.yaml
-g Generate test suite (YAML) from Swagger document
Example: majime -g http://api.example.com/swagger.json
Switches:
-j JSON output
-d Dry-Run, do not execute tests - good for testing your YAML file
Example
Generate Test Cases from Swagger
majime -g http://backend.yoisho.dob.jp/fx/swagger
Title: Yoisho Currency Exchange
Host: backend.yoisho.dob.jp
Base Path: /fx
Scheme: http
Path: /currency
Method: GET
Description: Get the FX rate for desired currency
Query Parameters: ['currency']
Expected Response: 200
Generated Output File
Base: "http://backend.yoisho.dob.jp/fx"
Tests:
# GET - Get the FX rate for desired currency
- path: "/currency?currency=USD"
method: "GET"
headers: ""
expect-response: "200"
expect-body: "json"
Run Test Cases
Modify the parameters so they make sense, in this case XXX-> USD.
majime -f Yoisho_Currency_Exchange-*.yaml
GET http://backend.yoisho.dob.jp/fx/currency?currency=USD
HTTP 200
Check out the examples.
Metadata
Release files for majime 0.0.10
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 | |
|---|---|---|---|---|
| majime-0.0.10.tar.gz | 4.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| majime-0.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / majime-0.0.10.tar.gz
| Download URL | majime-0.0.10.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edc6307e2f9893dd0250d4dd462916543ddd9128618f853bd34cb3bf446bfb80
|
|
BLAKE2b-256 checksum How to use checksums |
413068da2333da8712d62d09da0df33e362b81bb66d2a96610caa33ee3903c39
|
| 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.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Release files / majime-0.0.10-py3-none-any.whl
| Download URL | majime-0.0.10-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f51602111f3aba0aac11c7000e6f19c0fad67f04634c65cfb42871baa8fb11a0
|
|
BLAKE2b-256 checksum How to use checksums |
bec0b7502127f2c9c692bc74f8e502bea67130de4bcb7ff25169f3b301f8f340
|
| 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.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Security for majime 0.0.10
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.