Skip to content

Repository files navigation

gRPC Testify (Rust)

Coverage Status Release Documentation License: MIT

Native CLI for gRPC testing with .gctf files.

Documentation

Key Features

  • Unary, client streaming, server streaming, and bidirectional streaming tests
  • Assertions with built-in operators and plugin functions (@header, @trailer, @uuid, @email, etc.)
  • Parallel execution, timeouts, coverage, snapshot mode (--write)
  • Output formats: console, json, yaml, junit, allure, html
  • Load/benchmark testing (bench) with regression gating (bench-compare)
  • Web UI playground (play) with proto reflection, saved requests, history, and environments
  • Extra tools for developer workflows: check, fmt, inspect, explain, reflect, lsp, call, gen, grpcurl, list, index, query, health, scaffold

Requirements

  • No external runtime dependencies for CLI execution
  • Docker is optional (for integration examples)

Installation

Homebrew (macOS and Linux)

brew tap gripmock/tap
brew install gripmock/tap/grpctestify

Cargo

cargo install grpctestify

Prebuilt binaries (GitHub Releases)

  • Download from GitHub Releases
  • Available for macOS, Linux, and Windows (amd64/arm64)

Verify installation:

grpctestify --version

Quick Start

  1. Create hello.gctf:
--- ADDRESS ---
localhost:4770

--- ENDPOINT ---
hello.HelloService/SayHello

--- REQUEST ---
{
  "name": "World"
}

--- ASSERTS ---
.message == "Hello, World!"
  1. Run test:
grpctestify hello.gctf

Common Commands

# Run tests
grpctestify tests/

# Parallel run
grpctestify tests/ --parallel 4

# JSON report
grpctestify tests/ --log-format json --log-output results.json

# JUnit report
grpctestify tests/ --log-format junit --log-output junit.xml

# Validate syntax (recurses into directories — no shell glob needed)
grpctestify check tests/

# Format files
grpctestify fmt -w tests/

# Scaffold a .gctf test from server reflection
grpctestify scaffold --endpoint pkg.Service/Method --reflect --address localhost:4770

# Load test with regression gate
grpctestify bench tests/ --duration 30s --concurrency 10 --log-format json --log-output baseline.json
grpctestify bench tests/ --duration 30s --concurrency 10 --log-format json --log-output current.json
grpctestify bench-compare baseline.json current.json

# Launch the web UI playground
grpctestify play

Contributing

Issues and PRs are welcome: GitHub Issues

License

MIT

Releases

Packages

Contributors

Languages