Skip to content

Testing Components

Components have three tiers of testing: local validation, doctor diagnostics, and end-to-end verification.

Before installing, validate the manifest offline:

Terminal window
wh component validate ./my-component

This checks:

  1. Schema validationcomponent.json and manifest.json structure
  2. Cross-reference validation — subscriptions reference existing credential sets, seeds reference declared or built-in shapes, and CLI methods reference existing credential sets
  3. ID format validation — reverse-DNS format check
  4. Consistency checkcomponent.json id/name must match manifest.json component section

Validation does not read or check any action references or action file paths — the manifest format has no actions section.

Components install by identity, so register the manifest, then install by <org>/<name> against a test repo:

Terminal window
wh component register my-component --org org --manifest ./my-component/warmhub/manifest.json
wh component install org/my-component --repo org/test-repo

After install, run doctor to verify all declared resources exist:

Terminal window
wh component doctor my-component --repo org/test-repo

Doctor 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.

The full verification path:

Terminal window
# Register the manifest, then install by identity
wh component register my-component --org org --manifest ./my-component/warmhub/manifest.json
wh component install org/my-component --repo org/test-repo
Terminal window
wh credential set my-creds api_key --value "sk-..." --repo org/test-repo
Terminal window
wh component doctor my-component --repo org/test-repo
# Should report "ready"

For event-driven subscriptions, create a thing on the trigger shape:

Terminal window
wh commit submit --repo org/test-repo \
--ops '[{"operation":"add","kind":"thing","name":"Echo/test-1","data":{"message":"hello","tags":["test"]}}]'

Check that the expected output things were created:

Terminal window
wh thing query --shape EchoResult --repo org/test-repo

Check subscription delivery logs:

Terminal window
wh sub log se/echo-handler --repo org/test-repo

After install passes, verify the update path picks up manifest changes:

Terminal window
# Bump component.version in the manifest (re-publish requires a higher semver),
# then re-publish to the registry
wh component registry update org/my-component --manifest ./my-component/warmhub/manifest.json
# Pull the latest published manifest into the install
wh component update my-component --repo org/test-repo
# Run doctor again
wh component doctor my-component --repo org/test-repo