Validation And Testing
Use this page as a practical test loop for Zerq workflows before and after publish. The goal is to prove both happy-path and deny/error branches with evidence in logs.
Test matrix to run every publish
- Auth: valid token (
200), missing token (401), wrong audience/scope (403). - Method/profile: allowed method succeeds, blocked method returns
405, wrong profile returns403. - Input validation: schema-valid payload routes
valid; malformed payload routesinvalid. - Rate and resilience: sustained load eventually triggers
429; upstream fault routeserror.
Required test inputs
- Published
collection+proxyrevision under test. - Test identities for at least two
cliententries and twoprofilevalues. - Headers:
X-Client-ID,X-Profile-ID, andAuthorization. - Expected branch/output contract for each node boundary.
Validation steps
- Send a baseline request that should succeed for the expected
collectionandproxy. - Repeat the same request with a different
X-Profile-IDto confirm profile isolation. - Remove or alter
Authorizationand confirm the deny path returns401or403. - Burst requests to confirm throttling behavior and watch for
429when limits are exceeded. - Review request logs and audit logs to confirm actor,
client,profile, and policy decision.
Example: validating valid vs invalid
# valid payload -> expected 200
curl -i https://gateway.example.com/payments \
-H "Authorization: Bearer $TOKEN" \
-H "X-Client-ID: acme-mobile" \
-H "X-Profile-ID: partner-prod" \
-H "Content-Type: application/json" \
-d '{"amount":1250,"currency":"USD"}'
# invalid payload -> expected 400 with invalid branch evidence
curl -i https://gateway.example.com/payments \
-H "Authorization: Bearer $TOKEN" \
-H "X-Client-ID: acme-mobile" \
-H "X-Profile-ID: partner-prod" \
-H "Content-Type: application/json" \
-d '{"amount":"bad"}'
Release gate
Promote only when request logs prove the expected branch (success, error, valid, invalid) for each test case and audit logs capture who published the revision.
Validation depth limitation
Current workflow validation endpoints verify workflow payload presence and basic structure, but they do not guarantee every runtime branch will execute successfully. Continue using scenario tests (success, deny, malformed input, upstream failure) before publish.