Files
git.stella-ops.org/src/__Libraries/StellaOps.TestKit
StellaOps Bot 7503c19b8f Add determinism tests for verdict artifact generation and update SHA256 sums script
- Implemented comprehensive tests for verdict artifact generation to ensure deterministic outputs across various scenarios, including identical inputs, parallel execution, and change ordering.
- Created helper methods for generating sample verdict inputs and computing canonical hashes.
- Added tests to validate the stability of canonical hashes, proof spine ordering, and summary statistics.
- Introduced a new PowerShell script to update SHA256 sums for files, ensuring accurate hash generation and file integrity checks.
2025-12-24 02:17:34 +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.