Git Product home page Git Product logo

website's Introduction

Codecov CircleCI LintCheck Examples Downloads Per Month PyPI version Discord

A library for your API that provides:

  • Automated Integration Testing
  • Automated Live Documentation

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

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

Contents

Requirements

How to install

$ pip install scanapi

Basic Usage

You will need to write the API's specification and save it as a YAML or JSON file. For example:

endpoints:
  - name: scanapi-demo # The API's name of your API
    path: http://demo.scanapi.dev/api/v1 # The API's base url
    requests:
      - name: list_all_users # The name of the first request
        path: users/ # The path of the first request
        method: get # The HTTP method of the first request
        tests:
          - name: status_code_is_200 # The name of the first test for this request
            assert: ${{ 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 a scanapi-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 at scanapi.dev

Examples

You can find complete examples at scanapi/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 the Newcomers Guide to help you in the first steps. Every little bit of help counts! Feel free to create new GitHub issues and interact here.

Let's build it together ๐Ÿš€๐Ÿš€

website's People

Contributors

5pence avatar alancasagrande avatar astenstrasser avatar barbosa avatar camilamaia avatar dependabot[bot] avatar djalmaaraujo avatar marcorichetta avatar pedroavl avatar pradhvan avatar shubhamsood1406 avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

Add `delay` key to the documentation

Add Previous and Next Page to Tutorial Layout

Add Previous and Next Page to Tutorial Layout

To make it possible to navigate between the tutorials pages. Something like this:

image

Django's Doc (see the bottom of the page, right on top of the footer)

Here is the template where we should add the navigation:
https://github.com/scanapi/website/blob/master/_layouts/tutorial.html

We are current not showing any tutorial in the website because we don't have the content yet. But we already have the template, which is the link above. Also, we have some fake pages if testing is needed:

https://github.com/scanapi/website/tree/master/_tutorials

The idea is to have arrows to navigate to the next and the previous page. For example:

Page 1:

  • > Arrow with page 2's title and link to page 2

Page 2:

  • < Arrow with page 1's title and link to page 1
  • > Arrow with page 3's title and link to page 3

Page 3:

  • < Arrow with page 1's title and link to page 2
  • > Arrow with page 3's title and link to page 4

...

Last Page:

  • < Arrow with previous page's title and link to the previous page

Templates Marketplace

Description

Page to aggregate all custom report templates (.jinja) created by community. There, people would be able to download and use templates created by other users.

Something like danger's plugins section: https://danger.systems/ruby/

image

We could have a new repo to store all templates and only link them in the website.

Maybe we should define a structure that requires at least 3 things to consider it as valid template (thus a valid PR):

  1. The Jinja template itself
  2. A metadata file (yml/json containing name, description, author, tags, etc for the outstanding template)
  3. A thumbnail in a specific format and size that could be displayed as showcase

We could also use Danger to validate these things BTW.

If all templates in this repo have these minimum requirements, in the future we could also have a tool to display and search for them in the website.

scanapi/scanapi#184
scanapi/scanapi#176 (comment)

Hide Tutorial Links

Hide Tutorial Links

While we don't have a tutorial, it would be nice to hide the Tutorial links to avoid confusion.

image

image

Dynamic year footer

Dynamic year footer

Get the year dynamically, instead of having it hardcoded

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.