BalderHub REST

Test REST APIs without writing a test by yourself.

This is a BalderHub package for the Balder test framework. If you are new to Balder check out the official documentation first.

balderhub-rest is a BalderHub package that provides ready-to-use, high-quality test scenarios and building blocks for comprehensively validating REST API endpoints using the Balder testing framework.

It builds on top of balderhub-crud and offers specialized features, parsers and utilities tailored for testing Create, Read, Update and Delete (CRUD) operations over HTTP/REST interfaces.

Whether you are testing a Django REST Framework backend, a FastAPI service, or any other RESTful API - this package lets you write powerful, reusable REST tests once and run them with minimal extra effort.

What you will find in this package

  • CRUD for REST - Full support for CRUD testing via the balderhub.rest.contrib.crud module:

    • Ready-to-use setup features and factories for single/multi-item Create, Read and Update operations

    • REST-specific endpoint configuration and global API config scenario features

    • Automatic response handling and field mapping utilities

  • Parsers & Utilities - Flexible response parsers for JSON, form-data and multipart content:

    • JsonParser, FormParser, MultipartParser and a BaseParser

    • Helper functions for field collection, filling and error message generation

  • Integration with balderhub-crud and balderhub-data - Seamless data modeling, validation and cross-device verification powered by Pydantic-style SingleDataItem models.

Note

Please note, this package is still under development. If you would like to contribute, take a look into the project.