Skip to main content

Attendance API Testing Guide

Summary

This guide organizes source-backed test areas without instructing tests against production.

Audience

QA engineers, developers, architects, support engineers, and implementation partners.

Test layers

  • Contract tests: direct envelope versus compatibility bare bodies, binding, status mapping, and correlation behavior.
  • Application integration tests: records, calculation, workflow, audit, tenant filters, and persistence side effects.
  • Gateway tests: direct/shadow, compatibility owner, independent Time Office cutover, and rollback.
  • Payroll dependency tests: locked/unlocked results, unavailable dependency behavior in an approved isolated environment, and no mutation on a locked reopen.
  • Smoke/parity/cutover tests: existing scripts cover service flow, compatibility, routing, backfill parity, and go/no-go decisions.
  • Negative/security tests: missing/mismatched tenant, self-versus-approver scope, administrator-only Time Office mutations, and cross-tenant isolation.

Coverage matrix

AreaConfirmed cases to test
RecordsSave/update-by-date, date-range and employee filters, approved-period query, invalid employee/profile, weekly-off entry, missing tenant, month validation; ordinary future-date rule requires confirmation.
PunchesValid in/out or explicit hours, multiple punches, missing duration, weekly-off work, approval/rejection, not-found; duplicate/sequence rules and correction are unsupported or unconfirmed.
CalculationDirect/Hourly, Present/HalfDay/Absent, overtime, shortfall, paid units, approval recalculation, policy fallback.
SubmissionPending save, authorized approved save, pending query, approve, reject, not-found, audit and high-level event side effects.
ReopeningCreate, duplicate pending conflict, future date, locked period, approve/reject, terminal-state validation, audit.
Time OfficeShift create/update/deactivate, active assignment conflict, effective range, weekly-off validation, default/active policy, embedded policy rules.
RoutingDirect service, compatibility, shadow validation, cutover owner, parity, rollback.

Use synthetic tenants, fictional employee identifiers, and non-customer policy values. No Attendance-specific formal .NET test project was found. Existing PowerShell assets are evidence of smoke/cutover coverage; CI execution remains Requires confirmation.

Source References

  • microservices/scripts/smoke-attendance.ps1
  • microservices/scripts/compare-attendance-shift-parity.ps1
  • microservices/scripts/attendance-shift-cutover-go-no-go.ps1
  • microservices/docs/attendance-shift-cutover-runbook.md
  • microservices/src/attendance-service/Application/Services/AttendanceCommands.cs
  • microservices/src/attendance-service/Application/Services/PunchWorkflow.cs
  • microservices/src/attendance-service/Application/Services/ReopenRequestWorkflow.cs

See Also

Keywords

  • Attendance API
  • Attendance API Testing Guide

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly