Skip to main content

LMS Database Testing Guide

Summary

Source-backed inventory of existing persistence evidence and safe recommended coverage.

Audience

Engineering, QA, architecture, security, support, and release reviewers.

Reference Content

A broad smoke script starts the service in an isolated test context and checks migration/seed evidence through HTTP, tenant-separated report behavior, lifecycle persistence, audit/timeline growth, outbox intent, imports, reports, and optional document-reference behavior. It is not a dedicated database integration suite. No Training unit-test project, migration test suite, relationship test suite, concurrency suite, or persistence-focused HTTP collection was found.

AreaExisting evidenceRecommended non-production coverage
PersistenceBroad HTTP smokeCRUD/lifecycle state and conversion round trips
RelationshipsNested create smokeAll five cascade rules and logical-reference failure cases
Tenant isolationSelected cross-tenant report smokeEvery filtered type, elevated bypass governance, unfiltered evidence types
OutboxEvent-intent smokeSame-save atomicity, uniqueness, state/retry transitions
Audit/timelineCount growthActor fallback, tenant filter, retention/redaction policy
MigrationsStartup migration/seed smokeEmpty-to-current, snapshot drift, rollback rehearsal
SeedingHealth-data evidenceIdempotency and partial-state recovery
TransactionsIndirect lifecycle evidencefailure injection around import and external document boundaries

Testing must use synthetic, isolated data and must not target production services. This documentation does not provide operational commands, connection details, or sample personal/assessment/certificate records.

Source References

  • microservices/scripts/smoke-training.ps1
  • microservices/src/training-service/Infrastructure/TrainingDbContext.cs
  • microservices/src/training-service/Infrastructure/DevelopmentSeeder.cs
  • microservices/src/training-service/Infrastructure/Migrations/20260708143457_InitialTrainingSchema.cs

See Also

Keywords

  • LMS database
  • Training persistence
  • Source-backed model

Revision Information

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