Skip to content

Tests

324 EditMode test cases, in one assembly, no play mode and no LMS required. FakeLmsBridge stands in for the browser bridge, so a test can assert on the exact strings that would have gone to an LMS.

Run them from Window → General → Test Runner → EditMode. CI runs the same suite on every push and fails if fewer than 300 execute — a run that exits zero having compiled nothing is the failure that matters, and an exit code does not catch it.

The map

Per-standard behaviour. ScormRuntimeMappingTests (24) covers element names across both standards; ScormStatusSplitTests (18) covers the 1.2 single-status versus 2004 completion/success split; ScormVocabularyTests (37) covers the vocabulary and interaction-result translation.

Suspend data. ScormSuspendDataTests, ScormSuspendLimitTests (12) and ScormSuspendPolicyTests (8) — the limits, the compression, and the decision to refuse an oversized payload rather than truncate it.

Session lifecycle. ScormSessionGuardTests, ScormShutdownTests (14), ScormExitAndScaledTests, ScormLaunchContextTests (11), RuntimeInitTests.

Objectives, interactions, score, time. ScormObjectivesTests, ScormInteractionTests, ScormScoreTests (12), ScormTimeTests.

xAPI. XApiContractTests (20) pins the public contract; XApiDeliveryTests (15) and XApiQueueAndDiagnosticsTests (13) cover the queue, retry and auth-fault behaviour; XApiQueueScopeTests covers per-learner scoping; XApiActorTests (15) and XApiJsonWriterTests cover serialization.

Packaging. ScormManifestTests (13) and ScormBuildSmokeTests (12). The smoke tests drive the shipped ScormPostBuild.Package and emit real zips, which CI then runs Tests~/tools/validate-package.py against.

The public surface. PublicSurfaceTests holds a baseline list of public types and the declared order of LessonStatus and LessonMode. Reordering an enum or removing a type fails here rather than in a customer's project — which is the point, since both enums have a deliberate zero value.

ScormRuntimeGapTests

14 tests that exist to document what is not supported: multi-SCO, sequencing, attempt management, the xAPI State and Profile APIs. They assert the current behaviour at those edges so that if someone implements one, the test that says "this does nothing" fails and has to be rewritten deliberately — rather than the gap being discovered by a customer.

Not here

The JavaScript bridge and the injected page helper cannot be reached from C#. They have their own suite in Tests~/js, 60 tests under Node, and they run first in CI because they need neither Unity nor a licence.

The live-LMS checklist is Tests~/CONFORMANCE.md. No automated test can replace it: the two most serious defects found before this release were both invisible to a green suite and showed up on a real LMS.