Files
git.stella-ops.org/src/__Libraries/StellaOps.TestKit
master bc4318ef97 Add tests for SBOM generation determinism across multiple formats
- Created `StellaOps.TestKit.Tests` project for unit tests related to determinism.
- Implemented `DeterminismManifestTests` to validate deterministic output for canonical bytes and strings, file read/write operations, and error handling for invalid schema versions.
- Added `SbomDeterminismTests` to ensure identical inputs produce consistent SBOMs across SPDX 3.0.1 and CycloneDX 1.6/1.7 formats, including parallel execution tests.
- Updated project references in `StellaOps.Integration.Determinism` to include the new determinism testing library.
2025-12-23 18:56:12 +02:00
..

StellaOps.TestKit

Testing infrastructure for StellaOps - deterministic helpers, fixtures, and assertions.

Quick Start

Deterministic Time

using var time = new DeterministicTime(new DateTime(2026, 1, 15, 10, 30, 0, DateTimeKind.Utc));
var timestamp = time.UtcNow; // Always 2026-01-15T10:30:00Z

Snapshot Testing

SnapshotAssert.MatchesSnapshot(sbom, "TestSbom");
// Update: UPDATE_SNAPSHOTS=1 dotnet test

PostgreSQL Integration

public class Tests : IClassFixture<PostgresFixture>
{
    [Fact]
    public async Task TestDb() { /* use _fixture.ConnectionString */ }
}

See full documentation in this README.