← Back to Tools

RESTest

Powerful REST API Testing from the Command Line

RESTest is a flexible REST API testing tool written in Python that allows you to create, run and validate API tests through simple JSON files. Quickly set up test suites, validate responses, extract and reuse data between requests, and much more.

RESTest Logo

Watch the PyCon IT 2023 Presentation

Discover RESTest in action — presented at PyCon Italy 2023 (in Italian)

Key Features

{} JSON-based Tests

Write tests using straightforward JSON syntax. No complex setup or configuration needed — just define your requests and expected results in simple, readable JSON files.

Session Management

Automatic handling of cookies and authentication tokens across requests. Built-in support for Bearer token authentication keeps your test flows seamless.

Variables & Data Reuse

Extract data from responses and store them as variables. Reuse extracted values in subsequent requests to build powerful, chained test scenarios.

Powerful Path Parser

Extract and validate nested JSON values with ease using the built-in path parser. Navigate deep into response structures with a simple, intuitive syntax.

Test Organization

Group tests into logical sections and chain them together. Build comprehensive test suites that validate complete API workflows from start to finish.

Export & Logging

Generate Postman collections from your tests for team sharing. Detailed logging keeps track of all requests, responses, timing, and performance metrics.

Quick Start

1

Install RESTest

Install via pip in seconds

pip install restest
2

Write a Test File

Define your API endpoints, methods, and expected results in a simple JSON file

3

Run Your Tests

Execute your test suite from the command line

restest test.json
4

Review Results

Get detailed output with pass/fail status, response times, and comprehensive logs

{
  "system": {
    "base_url": "https://api.example.com",
    "log_file": "./restest.log"
  },
  "actions": [
    {
      "method": "get",
      "url": "/users/1",
      "tests": [
        {
          "field": "id",
          "value": 1
        }
      ]
    }
  ]
}

</> Open Source & Community

RESTest is an open-source project released under the GPLv3 License. The community is welcome to contribute, report issues, and help shape the future of API testing.

Star on GitHub

Show your support by starring the repository and help others discover RESTest.

⦿

Report Issues

Found a bug or have a suggestion? Open an issue on GitHub and help improve the tool.

Submit PRs

Contribute code, fix bugs, or add new features. Pull requests are always welcome.

Documentation

Comprehensive docs covering everything from getting started to advanced features and path parsing.

Start Testing Your APIs Today

Stop writing complex test scripts. RESTest makes API testing simple, fast, and reliable with just a JSON file and a single command.