Check difference between two responses of API.
Project description
Check difference between two responses of API.
Outline
Features
todo
Requirement
Python3.6 and uppper
Installation
$ pip install jumeaux
$ jumeaux --version
0.11.0
Run
For example
$ jumeaux --config sample/config.yaml sample/requests.csv
It is case if you don’t want to specify input logs. This is same as above because config.yaml can specify input files.
$ jumeaux --config sample/config.yaml
Then you can see
API responses in response/d986a822e0dfab08bfdf833094817b40995653734f2086e304a9af6723fcb124
INFO logs and report(json) as following
INFO
--------------------------------------------------------------------------------
| >>> Start processing !!
|
| [Key]
| cf87ecc6d0925914d0deede431f44d0d3f11b390edde53e9147cb52ff6964e38
|
| [Title]
| DEMO
|
| [Description]
| None
--------------------------------------------------------------------------------
INFO Challenge: 1 / 3 -- README
INFO Request one: https://api.github.com/repos/tadashi-aikawa/jumeaux/readme?
INFO Request other: https://api.github.com/repos/tadashi-aikawa/owlmixin/readme?
INFO Response one: 200 / 0.89s / 13143b / application/json; charset=utf-8
INFO Response other: 200 / 0.85s / 7632b / application/json; charset=utf-8
INFO Status: different
INFO Challenge: 2 / 3 -- commit
INFO Request one: https://api.github.com/repos/tadashi-aikawa/jumeaux/commits?path=README.md
INFO Request other: https://api.github.com/repos/tadashi-aikawa/owlmixin/commits?path=README.md
INFO Response one: 200 / 0.84s / 4083b / application/json; charset=utf-8
INFO Response other: 200 / 0.86s / 43634b / application/json; charset=utf-8
INFO Status: different
INFO Challenge: 3 / 3 -- wrong path
INFO Request one: https://api.github.com/repos/tadashi-aikawa/jumeaux/hogehoge?
INFO Request other: https://api.github.com/repos/tadashi-aikawa/owlmixin/hogehoge?
INFO Response one: 404 / 0.8s / 77b / application/json; charset=utf-8
INFO Response other: 404 / 0.83s / 77b / application/json; charset=utf-8
INFO Status: same
{
"addons": {
"did_challenge": [],
"dump": [
{
"cls_name": "Executor",
"name": "jumeaux.addons.dump.json"
}
],
"final": [],
"judgement": [],
"log2reqs": {
"cls_name": "Executor",
"config": {
"encoding": "utf8"
},
"name": "jumeaux.addons.log2reqs.csv"
},
"reqs2reqs": [],
"res2dict": [],
"store_criterion": [
{
"cls_name": "Executor",
"config": {
"statuses": [
"different"
]
},
"name": "jumeaux.addons.store_criterion.general"
}
]
},
"key": "cf87ecc6d0925914d0deede431f44d0d3f11b390edde53e9147cb52ff6964e38",
"summary": {
"one": {
"host": "https://api.github.com/repos/tadashi-aikawa/jumeaux",
"name": "jumeaux"
},
"other": {
"host": "https://api.github.com/repos/tadashi-aikawa/owlmixin",
"name": "owlmixin"
},
"output": {
"encoding": "utf8",
"logger": {
"disable_existing_loggers": false,
"formatters": {
"simple": {
"format": "%(levelname)s %(message)s"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"formatter": "simple",
"level": "INFO",
"stream": "ext://sys.stderr"
}
},
"root": {
"handlers": [
"console"
],
"level": "INFO"
},
"version": 1
},
"response_dir": "response"
},
"paths": {
"/commits": 1,
"/hogehoge": 1,
"/readme": 1
},
"status": {
"different": 2,
"failure": 0,
"same": 1
},
"time": {
"elapsed_sec": 2,
"end": "2017/06/19 12:46:38",
"start": "2017/06/19 12:46:35"
}
},
"title": "DEMO",
"trials": [
{
"headers": {},
"name": "README",
"one": {
"byte": 13143,
"content_type": "application/json; charset=utf-8",
"encoding": "utf-8",
"file": "one/(1)README",
"response_sec": 0.89,
"status_code": 200,
"url": "https://api.github.com/repos/tadashi-aikawa/jumeaux/readme"
},
"other": {
"byte": 7632,
"content_type": "application/json; charset=utf-8",
"encoding": "utf-8",
"file": "other/(1)README",
"response_sec": 0.85,
"status_code": 200,
"url": "https://api.github.com/repos/tadashi-aikawa/owlmixin/readme"
},
"path": "/readme",
"queries": {},
"request_time": "2017/06/19 12:46:35.996800",
"seq": 1,
"status": "different"
},
{
"headers": {},
"name": "commit",
"one": {
"byte": 4083,
"content_type": "application/json; charset=utf-8",
"encoding": "utf-8",
"file": "one/(2)commit",
"response_sec": 0.84,
"status_code": 200,
"url": "https://api.github.com/repos/tadashi-aikawa/jumeaux/commits?path=README.md"
},
"other": {
"byte": 43634,
"content_type": "application/json; charset=utf-8",
"encoding": "utf-8",
"file": "other/(2)commit",
"response_sec": 0.86,
"status_code": 200,
"url": "https://api.github.com/repos/tadashi-aikawa/owlmixin/commits?path=README.md"
},
"path": "/commits",
"queries": {
"path": [
"README.md"
]
},
"request_time": "2017/06/19 12:46:36.923595",
"seq": 2,
"status": "different"
},
{
"headers": {},
"name": "wrong path",
"one": {
"byte": 77,
"content_type": "application/json; charset=utf-8",
"encoding": "utf-8",
"response_sec": 0.8,
"status_code": 404,
"url": "https://api.github.com/repos/tadashi-aikawa/jumeaux/hogehoge"
},
"other": {
"byte": 77,
"content_type": "application/json; charset=utf-8",
"encoding": "utf-8",
"response_sec": 0.83,
"status_code": 404,
"url": "https://api.github.com/repos/tadashi-aikawa/owlmixin/hogehoge"
},
"path": "/hogehoge",
"queries": {},
"request_time": "2017/06/19 12:46:37.807953",
"seq": 3,
"status": "same"
}
]
}
Test Result
Master
Current
Licence
MIT
This software is released under the MIT License, see LICENSE.txt.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
jumeaux-0.11.0-py3-none-any.whl
(30.4 kB
view hashes)