Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Automated Integration Testing and Live Documentation for your API

License

NotificationsYou must be signed in to change notification settings

scanapi/scanapi

CodecovLintCheckExamplesDownloads Per MonthPyPI versionDiscord

A library foryour API that provides:

  • Automated Integration Testing
  • Automated Live Documentation

Given an API specification, written in YAML/JSON format, ScanAPI hits the specifiedendpoints, runs the test cases, and generates a detailed report of this execution - which can alsobe used as the API documentation itself.

With almost no Python knowledge, the user can define endpoints to be hit, the expected behaviorfor each response and will receive a full real-time diagnostic report of the API!

Contents

Quick Start

Requirements

How to install

$ pip install scanapi

Basic Usage

You will need to write the API's specification and save it as aYAML orJSON file.For example:

endpoints:  -name:scanapi-demo# The API's name of your APIpath:http://demo.scanapi.dev/api/v1# The API's base urlrequests:      -name:list_all_users# The name of the first requestpath:users/# The path of the first requestmethod:get# The HTTP method of the first requesttests:          -name:status_code_is_200# The name of the first test for this requestassert:${{ response.status_code == 200 }}# The assertion

And run the scanapi command

$ scanapi run<file_path>

Then, the lib will hit the specified endpoints and generate ascanapi-report.html file with the report results.

An overview screenshot of the report.A screenshot of the report showing the request details.

Documentation

The full documentation is available atscanapi.dev

Tutorial

Get started with ScanAPI by following ourstep-by-step tutorial.

Examples

You can find complete examples atscanapi/examples!

This tutorial helps you to create integration tests for your REST API using ScanAPI

Watch the video

Contributing

Collaboration is super welcome! We prepared theNewcomers Guide to help you in the first steps. Every little bit of help counts! Feel free to create newGitHub issues and interact here.

Let's build it together 🚀🚀

❤️ Contributors

contributors

Made withcontrib.rocks.

Supporters Through Time

Red Hat Logo

About

Automated Integration Testing and Live Documentation for your API

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
  •  

Contributors55

Languages


[8]ページ先頭

©2009-2025 Movatter.jp