All Projects → rodrigosetti → swagger-test

rodrigosetti / swagger-test

Licence: other
Property based testing tool for Swagger APIs

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to swagger-test

swagger-conformance
Python based tool for testing whether your API conforms to its Swagger schema
Stars: ✭ 51 (+59.38%)
Mutual labels:  swagger, property-based-testing
Schemathesis
A modern API testing tool for web applications built with Open API and GraphQL specifications.
Stars: ✭ 768 (+2300%)
Mutual labels:  swagger, property-based-testing
framework
The target of this framework is to help in all the needs of a full featured API REST, from top to bottom, and at the same time having the best possible performance and security.
Stars: ✭ 88 (+175%)
Mutual labels:  swagger
gin-swagger
DRY templates for go-swagger
Stars: ✭ 79 (+146.88%)
Mutual labels:  swagger
openapi-schemas
JSON Schemas for every version of the OpenAPI Specification
Stars: ✭ 22 (-31.25%)
Mutual labels:  swagger
fastify-openapi-glue
A plugin for Fastify to autogenerate a configuration based on a OpenApi(v2/v3) specification.
Stars: ✭ 94 (+193.75%)
Mutual labels:  swagger
silky
The Silky framework is designed to help developers quickly build a microservice development framework through simple code and configuration under the .net platform.
Stars: ✭ 146 (+356.25%)
Mutual labels:  swagger
httprunner swagger
The open source project uses Python 3 to parse swagger2 X version of the interface document, which can generate data files in the format of JSON, yaml, CVs and xlsx. The solution of automatically generating use cases for interface automatic testing is applicable to HTTP Runner 2 X version of interface automation test framework; It can be called …
Stars: ✭ 39 (+21.88%)
Mutual labels:  swagger
sts
Swagger to sf schema & st column in ng-alain
Stars: ✭ 20 (-37.5%)
Mutual labels:  swagger
oas2
OpenAPI 2.0 (aka Swagger) utils for Golang.
Stars: ✭ 19 (-40.62%)
Mutual labels:  swagger
io-api
The API documentation for Adafruit IO
Stars: ✭ 15 (-53.12%)
Mutual labels:  swagger
actix-swagger
Swagger code generator for actix-web framework
Stars: ✭ 58 (+81.25%)
Mutual labels:  swagger
Kodkod
https://github.com/alirizaadiyahsi/Nucleus Web API layered architecture startup template with ASP.NET Core 2.1, EF Core 2.1 and Vue Client
Stars: ✭ 45 (+40.63%)
Mutual labels:  swagger
tssg-syntax-parser
Parser to generate AST from TSSG Syntax
Stars: ✭ 17 (-46.87%)
Mutual labels:  swagger
CoreIdentity
ASP.NET Core 3.1 - Web API, Identity, JWT, TFA, Swagger, SendGrid, EF Core SQL and Azure Storage
Stars: ✭ 93 (+190.63%)
Mutual labels:  swagger
nestjs-auth-starter-kit
NestJS Auth Starter Kit (typescript / typeorm / swagger / passport / bcrypt)
Stars: ✭ 37 (+15.63%)
Mutual labels:  swagger
qingstor-api-specs
Specifications of QingStor APIs.
Stars: ✭ 14 (-56.25%)
Mutual labels:  swagger
MithrilShards
.NET 6 extensible P2P Network / Distributed services library.
Stars: ✭ 15 (-53.12%)
Mutual labels:  swagger
EvaEngine.js
A micro service development engine for node.js
Stars: ✭ 31 (-3.12%)
Mutual labels:  swagger
podpodge
Convert YouTube playlists to audio-only RSS feeds for podcast apps to consume.
Stars: ✭ 32 (+0%)
Mutual labels:  swagger

swagger-test

This is a tool for Property Based Testing of swagger APIs.

It basically allow you to approximate the computation of the following proposition:

Which translates to:

For all valid requests that can be derived from my Swagger schema, the API response obtained from a service that implements the schema is valid.

The tool exposes several ways to derive value from the Swagger schema, for example, you may be interested in getting just a random valid request from the schema (use the generate command), or validating if a given response (from a particular operation) is valid (use the validate command), or, run one sample instance of the full proposition, which picks a random request and validate its resulting response (use the request command).

The random requests generator is deterministic by given the same seed value, or one can focus on a particular operation by specifying the operation id.

The tool also simplifies integration with other systems by allowing to configure output formats as standard HTTP message, JSON, or curl. Additionally, there are Haskell modules exposed as a library if one wants to build on top of it.

Command Line Interface

swagger-test supports four commands:

  • generate - generates a new random valid request from the Swagger schema.
  • validate - validate a response to a given operation id, according to the schema.
  • request - generate and make the request, then validates the response (combines generate and validate).
  • report - high-level command that run several requests concurrently, and write HTML reports for multiple Swagger schemas. Useful for testing systems with many Swagger services in a CI server.
swagger-test --help
Property-based testing tool for Swagger APIs

Usage: swagger-test COMMAND
  Execute one of the commands available depending on your needs

Available options:
  -h,--help                Show this help text

Available commands:
  generate                 Generate a random request according to Schema
  validate                 Validate a response against Schema
  request                  Generate, make the request, and validate response
  report                   Run several tests and generate reports

Run `COMMAND --help` to get command specific options help

Sub-commands

Generate

swagger-test generate --help
Usage: swagger-test generate [-s|--schema FILENAME] [--seed N]
                             [-o|--operation ID]
                             [--request-format http|curl|none|json]
                             [-i|--info] [--size N]
  Generate a random request according to Schema

Available options:
  -s,--schema FILENAME     swagger JSON schema file to read
                           from (default: "swagger.json")
  --seed N                 specify the seed for the random generator
  -o,--operation ID        specify a operation id to test (default pick
                           randomly)
  --request-format http|curl|none|json
                           output format of the HTTP request (default: http)
  -i,--info                render information about seed and operation id
  --size N                 control the size of the generated
                           request (default: 30)
  -h,--help                Show this help text

Validate

swagger-test validate --help
Usage: swagger-test validate [-s|--schema FILENAME] [FILENAME]
                             (-o|--operation ID)
  Validate a response against Schema

Available options:
  -s,--schema FILENAME     swagger JSON schema file to read
                           from (default: "swagger.json")
  FILENAME                 http response file to read from (default=stdin)
  -o,--operation ID        specify a operation id to test (default pick
                           randomly)
  -h,--help                Show this help text

Request

swagger-test request --help
Usage: swagger-test request [-s|--schema FILENAME] [--seed N]
                            [-o|--operation ID]
                            [--request-format http|curl|none|json]
                            [--response-format http|json|none] [-i|--info]
                            [--size N]
  Generate, make the request, and validate response

Available options:
  -s,--schema FILENAME     swagger JSON schema file to read
                           from (default: "swagger.json")
  --seed N                 specify the seed for the random generator
  -o,--operation ID        specify a operation id to test (default pick
                           randomly)
  --request-format http|curl|none|json
                           output format of the HTTP request (default: none)
  --response-format http|json|none
                           output format of the HTTP request (default: none)
  -i,--info                render information about seed and operation id
  --size N                 control the size of the generated
                           request (default: 30)
  -h,--help                Show this help text

Report

swagger-test report --help
Usage: swagger-test report [--schemas PATH] [--reports PATH] [--tests N]
                           [--size N]
  Run several tests and generate reports

Available options:
  --schemas PATH           path to folder with swagger
                           schemas (default: "schemas")
  --reports PATH           path to folder to write the HTML
                           reports (default: "reports")
  --tests N                number of tests to run (default: 100)
  --size N                 control the size of the generated
                           request (default: 30)
  -h,--help                Show this help text
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].