
Automate gRPC server testing with configuration files. Validate endpoints, requests, and responses using simple .gctf
files.
- Automatic self-update with checksum verification
- Enhanced warning system with dedicated log level
- Improved error handling and validation
- Better security with SHA-256 verification
- π Self-updating with
--update
flag - π‘ Security with checksum verification
- π Recursive directory processing
- π¨ Colored output with emoji support
- π Automatic dependency checks
β οΈ Dedicated warning log level- π Flexible configuration format
- π Full gRPC streaming support: unary, client, server, and bidirectional streams
- β‘ Fast sequential test execution
- π Version information display
Enhance your .gctf
workflow with the official VS Code extension:
- Syntax highlighting for
.gctf
files - Snippets for quick test creation
- Section folding
- Validation warnings
- Quick documentation
# Tap the repository
brew tap gripmock/tap
# Install grpctestify
brew install grpctestify
# Verify installation
grpctestify --version
-
Install Dependencies:
# macOS brew install grpcurl jq # Ubuntu/Debian sudo apt install -y grpcurl jq # Verify installation grpcurl --version jq --version
-
Download the Script: Use
curl
orwget
to download thegrpctestify.sh
script from the latest release:# Using curl curl -LO https://github.com/gripmock/grpctestify/releases/latest/download/grpctestify.sh # Using wget wget https://github.com/gripmock/grpctestify/releases/latest/download/grpctestify.sh
-
Make the Script Executable: After downloading, make the script executable:
chmod +x grpctestify.sh
-
Move the Script to a Directory in Your PATH: Optionally, move the script to a directory in your
PATH
for easier access:sudo mv grpctestify.sh /usr/local/bin/grpctestify
-
Verify Installation: Check that the script is working correctly:
grpctestify --version
# Single test file
./grpctestify.sh test_case.gctf
# Directory mode (recursive)
./grpctestify.sh tests/
# Verbose output mode
./grpctestify.sh --verbose tests/
# Disable colors
./grpctestify.sh --no-color test_case.gctf
# Check for updates
./grpctestify.sh --update
# Show version
./grpctestify.sh --version
--- ADDRESS ---
localhost:50051
--- ENDPOINT ---
package.service/Method
--- REQUEST ---
{
"key": "value"
}
--- RESPONSE ---
{
"status": "OK"
}
Multiple REQUEST blocks followed by a single RESPONSE
--- ADDRESS ---
localhost:50051
--- ENDPOINT ---
chat.ChatService/SendMessages
--- REQUEST ---
{ "name": "hello" }
--- REQUEST ---
{ "name": "world" }
--- REQUEST ---
{ "name": "from" }
--- REQUEST ---
{ "name": "grpctestify" }
--- RESPONSE ---
{ "message": "hello world from grpctestify" }
Single REQUEST followed by multiple RESPONSE blocks
--- ADDRESS ---
localhost:50051
--- ENDPOINT ---
news.NewsService/Subscribe
--- REQUEST ---
{ "message": "hello world from grpctestify" }
--- RESPONSE ---
{ "name": "hello" }
--- RESPONSE ---
{ "name": "world" }
--- RESPONSE ---
{ "name": "from" }
--- RESPONSE ---
{ "name": "grpctestify" }
Alternating REQUEST and RESPONSE blocks
--- ADDRESS ---
localhost:50051
--- ENDPOINT ---
math.Calculator/SumStream
--- REQUEST ---
{ "value": 2 }
--- RESPONSE ---
{ "sum": 2 }
--- REQUEST ---
{ "value": 1 }
--- RESPONSE ---
{ "sum": 3 }
--- REQUEST ---
{ "value": 0 }
--- RESPONSE ---
{ "sum": 3 }
- Automatic checksum verification during updates
- Secure download process with SHA-256 validation
- Warning system for potential security issues
# Install dependencies
make setup
# Start test server
make up
# Run all tests
make test
# Stop server
make down
- Fork repository
- Create feature branch
- Follow shell scripting best practices
- Add test cases
- Submit pull request
MIT License Β© 2025 GripMock