MarketSquare / roboswag

Apache License 2.0
26 stars 2 forks source link

Roboswag

Introduction

:robot: Roboswag is a tool that automatically generates Python libraries out of your Swagger (OpenAPI specification file). These libraries can be used to create tests with various payload content and its validation. It also supports response validation against schema and verification of different status codes.

Note

The tool is in the Alpha state, which means it may be unstable and should be used at your own risk. Some features may be broken and there are still many things to be developed. Happy testing!

The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs. Click here for v3 documentation and here for v2 documentation.

Hosted on GitHub. :medal_military:

Installation

You can install Roboswag simply by running::

pip install roboswag

Usage

Roboswag can be easily run from command line. To check if it's installed, run this to see the current version:

roboswag -v

To execute Roboswag with its full capabilities, run it with provided path to the Swagger (OpenAPI specification) file:

roboswag generate -s <path_to_swagger>

You can try out the tool using the example of swagger file located in swaggers/petstore.json.

Successful execution should result in printing the information about generated files and a whole new directory (named by the value of info.title from your Swagger file) consisting of:

Now you can just create a test file, import desired endpoint and start automating the testing!

Limitations

The tool is already able to generate libraries but...

Please be forgiving and submit an issue, if you struggle with something or just contact us on our Slack channel. It's more than welcome also to support us by code contribution! :keyboard: