Skip to main content

One-stop solution for HTTP(S) testing.

Project description

ApiMeter

ApiMeter is a simple & elegant, yet powerful HTTP(S) testing framework. Enjoy! ✨ 🚀 ✨

Design Philosophy

  • Embrace open source, stand on giants' shoulders, like Requests, unittest and Locust.
  • Convention over configuration.
  • Pursuit of high rewards, write once and achieve a variety of testing needs

Key Features

  • Inherit all powerful features of Requests, just have fun to handle HTTP(S) in human way.
  • Define testcases in YAML or JSON format in concise and elegant manner.
  • Record and generate testcases with HAR support. see har2case.
  • Supports variables/extract/validate mechanisms to create full test scenarios.
  • Supports perfect hook mechanism.
  • With debugtalk.py plugin, very easy to implement complex logic in testcase.
  • Testcases can be run in diverse ways, with single testcase, multiple testcases, or entire project folder.
  • Test report is concise and clear, with detailed log records.
  • With reuse of Locust, you can run performance test without extra work.
  • CLI command supported, perfect combination with CI/CD.

Documentation

ApiMeter is rich documented.

Usage

pip install apimeter  # 安装
apimeter /path/to/api  # 完整生成报告
apimeter /path/to/api --skip-success  # 报告忽略成功用例数

注意事项

  • 1、安装后可用命令apimeter、hrun、apilocust;
  • 2、安装时不需要卸载HttpRunner,如果存在httprunner,会覆盖其hrun命令,另外的httprunner、ate命令依然可用;
  • 3、之所以不写字HttpRunner,因为部分项目在debugtalk.py中导入了HttpRunner包并使用其已封装好的函数;

Development

poetry install  # 拉取代码后安装依赖
poetry run python -m apimeter /path/to/api  # 完整生成报告
poetry run python -m apimeter /path/to/api --skip-success  # 报告忽略成功用例数据
poetry build  # 打包
poetry publish  # 发布,根据提示输入pypi账号密码
pip install -i https://pypi.Python.org/simple/ apimeter  # 指定安装源,因为刚发布其他平台未及时同步

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

apimeter-2.6.2.tar.gz (66.9 kB view details)

Uploaded Source

Built Distribution

apimeter-2.6.2-py2.py3-none-any.whl (79.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file apimeter-2.6.2.tar.gz.

File metadata

  • Download URL: apimeter-2.6.2.tar.gz
  • Upload date:
  • Size: 66.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.6.5 Darwin/20.6.0

File hashes

Hashes for apimeter-2.6.2.tar.gz
Algorithm Hash digest
SHA256 79d6f58f52769a43db624d83751c241820d407a65c259afeb32db7e2c2384f9f
MD5 d86fcf1678065f254ab41ff90c035835
BLAKE2b-256 b75a035e04a9270d7207094860902dc3bfea0b36c9b2aaa576138ec8b24fd083

See more details on using hashes here.

File details

Details for the file apimeter-2.6.2-py2.py3-none-any.whl.

File metadata

  • Download URL: apimeter-2.6.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 79.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.6.5 Darwin/20.6.0

File hashes

Hashes for apimeter-2.6.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 58c9a1f68b6d04be8a7d3207fea2a0737f7f32efcae155bf96bc2192273234f1
MD5 48e6a86f54792b12b7d95aa7faf65461
BLAKE2b-256 cf4438f5653765d8007b3af5a776796b70b556841404e610257d64a025919a27

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page