Troubleshooting
Quick checklist for unexpected failures.
Fast triage
- Run
grpctestify check <file>to validate syntax/sections. - Run the same file with
--verbose. - Reduce concurrency (
--parallel 1) if failures are flaky. - Check endpoint address/TLS settings.
Connection problems
Service unavailable
- Verify server is running
- Confirm
ADDRESSvalue orGRPCTESTIFY_ADDRESS - Check TLS settings if server requires TLS/mTLS
Timeout errors
Use a higher timeout:
bash
grpctestify test.gctf --timeout 60For unstable endpoints, run with reduced parallelism to isolate load-related failures:
bash
grpctestify tests/ --parallel 1 --verboseTest file problems
JSON parse errors
- Validate JSON in
REQUEST/RESPONSE/ERROR - Remove trailing commas
- Ensure section markers are valid
Missing required sections
ENDPOINTis required- At least one verification block is required:
RESPONSE,ERROR, orASSERTS RESPONSEandERRORcannot appear in the same fileMETA(if present) must be the first section and appear only once
Unexpected section behavior
- Use
REQUEST_HEADERSinstead of legacyHEADERS - Keep section markers exact:
--- SECTION_NAME --- - For inline options, use
key=valuewhen needed, or short boolean flags likewith_asserts
Assertion problems
Expression fails
- Start with simple checks (
.status == "ok") - Validate paths exist in actual response
- For metadata checks use
@header()/@trailer()
Type/format checks fail
- Verify values match expected format for
@timestamp,@url,@ip,@email,@uuid - Check raw response types with
inspectoutput before writing strict assertions
Debugging commands
bash
# Verbose run
grpctestify test.gctf --verbose
# Execution preview
grpctestify test.gctf --dry-run --verbose
# Syntax check
grpctestify check test.gctf
# Inspect parsed structure
grpctestify inspect test.gctf --format json
# Explain execution plan and assertion scopes
grpctestify explain test.gctfEnvironment variables
GRPCTESTIFY_ADDRESSGRPCTESTIFY_COMPRESSIONGRPCTESTIFY_TLS_CA_FILEGRPCTESTIFY_TLS_CERT_FILEGRPCTESTIFY_TLS_KEY_FILEGRPCTESTIFY_TLS_SERVER_NAME