4 releases
new 0.2.3-alpha | Mar 13, 2025 |
---|---|
0.2.2-alpha | Mar 12, 2025 |
0.2.1-alpha | Mar 12, 2025 |
0.2.0-alpha | Mar 12, 2025 |
#200 in Testing
111 downloads per month
68KB
2K
SLoC
mocktail
mocktail is a minimal crate for mocking HTTP and gRPC servers in Rust with support for streaming.
Table of contents
Features
- Mocks HTTP and gRPC servers
- Mocks defined in Rust using a simple, ergonomic API
- Supports HTTP streaming
- Supports gRPC unary, client-streaming, server-streaming, and bidirectional-streaming methods
- Match requests to mock responses using built-in matchers or custom matchers
Getting Started
-
Add
mocktail
toCargo.toml
as a development dependency:[dev-dependencies] mocktail = { git = "https://github.com/IBM/mocktail.git", version = "0.2.2-alpha" }
-
For now, see examples in the
mocktail-tests
crate. Additional documentation coming soon.
Examples
See examples in the mocktail-tests
crate.
Related projects
This crate takes inspiration from other great mocking libraries including:
Dependencies
~12–24MB
~331K SLoC