Skip to main content

Notification Testing Architecture

Summary​

Verified automated coverage is a single PowerShell smoke script plus in-service test hooks. No unit or integration test project references the Notification Service in the reviewed source.

Test surfaces​

Smoke script​

microservices/scripts/smoke-notification.ps1 boots the service from its build output (PostgreSQL required; migrations auto-apply). It runs in two modes: direct drives events synchronously through /notifications/test/dispatch; broker publishes onto RabbitMQ so the consumer round-trips the event. It can also exercise an already-running or auto-started gateway’s shadow route. The script contains on the order of three dozen assertions covering idempotency, template resolution, rendering, delivery, retry and audit.

In-service test hooks​

The API includes verification-oriented endpoints: /notifications/test/dispatch (no broker), /notifications/test/publish (broker path), and an x-force-fail flag honored by every channel sender to force the failure and retry path deterministically.

  • No xUnit/NUnit unit tests for the dispatcher, resolver, template engine, preference evaluator or retry policy.
  • No integration test project for the consumer or persistence.
  • No contract tests for the event payloads consumed from other modules.

Verified absence​

No test .csproj references NotificationService or notification-service. The only automated artifact is the smoke script.

Requires Confirmation​

Ownership of the smoke script in CI, and whether a formal test project is planned, require confirmation.

Source References​

  • microservices/scripts/smoke-notification.ps1
  • microservices/src/notification-service/Api/NotificationEndpoints.cs
  • microservices/src/notification-service/Channels/InAppSender.cs

See Also​

Keywords​

Testing, smoke test, test hooks, coverage, verified absence.

Revision Information​

  • Status: Draft
  • Last reviewed: 2026-07-21
  • Next review: 2026-10-21