Payroll Event Integration Testing Guide
Summary
This page documents confirmed payroll event integration testing guide behavior and explicitly marks incomplete integration boundaries.
Audience
Payroll and integration developers, QA and support engineers, solution and security architects, and implementation partners.
Test scope
Use isolated environments and synthetic, non-sensitive payloads. Do not use production broker topology, credentials, employee data, or payroll values.
Contract tests
- Verify the four shared outbound types derive from IntegrationEvent and publishers set schema version 1.
- Verify concrete serialization retains common and event-specific fields without asserting sensitive values.
- Verify outbox mapping preserves event identity/type, payload, occurrence, correlation, tenant metadata, source, and Pending state as implemented.
Publisher tests
- For calculate, freeze, unfreeze, and payslip generation, verify business state, evidence, and outbox intent commit together.
- Force local commit failure and confirm neither business state nor intent persists.
- Verify current null/empty envelope behavior explicitly until corrected.
Consumer tests
- Exercise all 11 Payroll inbound types with valid, missing, duplicate, older, equal-time, malformed, and unsupported cases.
- Confirm projection, audit, and processed marker commit before acknowledgement.
- Confirm exceptions requeue and successful duplicates do not mutate projection state.
Outbox and failure tests
- Test Pending/Failed selection order, success/failure status updates, retry-count increments, and duplicate-publish failure windows.
- Test the actual deployed relay separately once its invocation is confirmed.
Landscape tests
- Confirm Document handles calculated/frozen/payslip, Notification handles frozen/payslip, and Platform records frozen receipt.
- Assert no behavior for unconfirmed subscriptions.
Expected result
The source inventory remains four outbound contracts, 11 inbound subscriptions, three confirmed downstream service consumers, and schema version 1, with no exactly-once assertion.
Requires confirmation
- Approved broker test harness, relay fixture, replay testing, and operational acceptance criteria.
Source References
microservices/src/contracts/Events/IntegrationEvent.csmicroservices/src/contracts/Events/PayrollCalculatedEvent.csmicroservices/src/contracts/Events/PayslipGeneratedEvent.csmicroservices/src/payroll-service/Application/PayrollCalculationService.csmicroservices/src/payroll-service/Application/PayrollOutputsService.csmicroservices/src/shared-kernel/Outbox/IntegrationEventJsonSerializer.csmicroservices/src/shared-kernel/Outbox/OutboxMessage.csmicroservices/src/shared-kernel/Messaging/OutboxProcessor.csmicroservices/src/payroll-service/Infrastructure/Persistence.csmicroservices/src/payroll-service/Program.csmicroservices/src/payroll-service/Messaging/PayrollReadModelConsumer.csmicroservices/src/payroll-service/Domain/PayrollEntities.csmicroservices/src/document-service/Messaging/DocumentReadModelConsumer.csmicroservices/src/notification-service/Application/EventNotificationResolver.csmicroservices/src/notification-service/Messaging/NotificationEventConsumer.csmicroservices/src/platform-service/Messaging/PlatformEventConsumer.csmicroservices/src/integration-service/Domain/IntegrationEntities.cs
Related Articles
See Also
Keywords
- Payroll events
- Payroll Event Integration Testing Guide
- Integration contracts
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly