Testing Components
Components have three tiers of testing: local validation, doctor diagnostics, and end-to-end verification.
Local Validation
Section titled “Local Validation”Before installing, validate the manifest offline:
wh component validate ./my-componentThis checks:
- Schema validation —
component.jsonandmanifest.jsonstructure - Cross-reference validation — subscriptions reference existing credential sets, seeds reference declared or built-in shapes, and CLI methods reference existing credential sets
- ID format validation — reverse-DNS format check
- Consistency check —
component.jsonid/name must matchmanifest.jsoncomponent section
Validation does not read or check any action references or action file paths — the manifest format has no actions section.
Install for Testing
Section titled “Install for Testing”Components install by identity, so register the manifest, then install by <org>/<name> against a test repo:
wh component register my-component --org org --manifest ./my-component/warmhub/manifest.jsonwh component install org/my-component --repo org/test-repoDoctor Diagnostics
Section titled “Doctor Diagnostics”After install, run doctor to verify all declared resources exist:
wh component doctor my-component --repo org/test-repoDoctor checks:
- Shapes — exist and are active
- Subscriptions — exist and are active
- Credential sets — exist with all required keys populated
Doctor operates on the installed manifest snapshot. It does not compare against the source or auto-remediate. If resources are missing, reinstall or create them manually.
End-to-End Testing
Section titled “End-to-End Testing”The full verification path:
1. Install the Component
Section titled “1. Install the Component”# Register the manifest, then install by identitywh component register my-component --org org --manifest ./my-component/warmhub/manifest.jsonwh component install org/my-component --repo org/test-repo2. Bind Credentials
Section titled “2. Bind Credentials”wh credential set my-creds api_key --value "sk-..." --repo org/test-repo3. Verify Doctor
Section titled “3. Verify Doctor”wh component doctor my-component --repo org/test-repo# Should report "ready"4. Trigger the Action
Section titled “4. Trigger the Action”For event-driven subscriptions, create a thing on the trigger shape:
wh commit submit --repo org/test-repo \ --ops '[{"operation":"add","kind":"thing","name":"Echo/test-1","data":{"message":"hello","tags":["test"]}}]'5. Verify Output
Section titled “5. Verify Output”Check that the expected output things were created:
wh thing query --shape EchoResult --repo org/test-repoCheck subscription delivery logs:
wh sub log se/echo-handler --repo org/test-repoUpdate Test
Section titled “Update Test”After install passes, verify the update path picks up manifest changes:
# Bump component.version in the manifest (re-publish requires a higher semver),# then re-publish to the registrywh component registry update org/my-component --manifest ./my-component/warmhub/manifest.json
# Pull the latest published manifest into the installwh component update my-component --repo org/test-repo
# Run doctor againwh component doctor my-component --repo org/test-repoHit a problem or have a question? Get in touch.