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; a method outside the proxy's allowed methods returns
405(Method X not allowed for this endpoint) without running the workflow; a method the profile blocks returns405(HTTP method not allowed); wrong profile returns403. Send each method your clients use, plus one method outside the proxy's list, to the published gateway route: editor test runs and the Listen for a request test URL do not apply the proxy's allowed methods. - Trigger method: the workflow builder shows no method warning above the canvas. It warns when a template or the HTTP trigger uses a method the proxy does not allow, because those requests get
405; add the method to the proxy's allowed methods. - 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.