Testing
Local SDK test
Exercise the process without the Org Portal:
| Area | How |
|---|---|
| Tool invocation | Sign a tool.invoke body and POST /qefro (or unit-test handlers) |
| Schema / validation | Assert handler rejects bad inputs |
| Authentication | Wrong signature → invalid_signature; skew → fail |
| Storage | Only when platform.storage fixture provided |
| Customer Hub | Mock platform.customer or disable Hub flags |
mock-order-status-sdk provides npm run smoke for a local signed round-trip.
Minimal ping (pseudo-flow):
- Body
{"protocol_version":"1","request_id":"t1","type":"ping"} - Sign with your secret
- Expect
{ "type": "pong", … }
External connection test
Qefro Org Portal
↓ Test Connection (ping)
SDK connection
↓
/qefro
↓
tool.invoke (chat or Test Tool)
Checklist:
- Test Connection healthy
- Sync Tools with workspace selected
- Invoke a public tool (
auth: none) from chat - Invoke an authenticated tool with identity
- Confirm org-only tools blocked on customer channels
Managed app test
qefro dev
↓
publish
↓
install
↓
health / ping
↓
tool invocation
↓
upgrade + re-test
Restaurant Pro ships scripts/smoke-tools.mjs for tool smoke coverage when available in the package.
What to assert
- Tool names stable across Sync / install
- HMAC failure modes
- Tenant isolation (no cross-workspace document leaks)
- Organization actions not callable from WhatsApp when marked staff-only