OpenTraceability.TestServerPackage 2.0.0-beta.100

This is a prerelease version of OpenTraceability.TestServerPackage.
dotnet add package OpenTraceability.TestServerPackage --version 2.0.0-beta.100
                    
NuGet\Install-Package OpenTraceability.TestServerPackage -Version 2.0.0-beta.100
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenTraceability.TestServerPackage" Version="2.0.0-beta.100" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenTraceability.TestServerPackage" Version="2.0.0-beta.100" />
                    
Directory.Packages.props
<PackageReference Include="OpenTraceability.TestServerPackage" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenTraceability.TestServerPackage --version 2.0.0-beta.100
                    
#r "nuget: OpenTraceability.TestServerPackage, 2.0.0-beta.100"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenTraceability.TestServerPackage@2.0.0-beta.100
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenTraceability.TestServerPackage&version=2.0.0-beta.100&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OpenTraceability.TestServerPackage&version=2.0.0-beta.100&prerelease
                    
Install as a Cake Tool

Open Traceability — Test Server Package

Shared core of the OpenTraceability test server, plus tooling for using it from tests and other services:

  • Core services + SQLite store — ingestion, EPCIS query, master data, digital link resolution, and dataset persistence, shared by the real ASP.NET test server and the in-process WireMock host so behavior never diverges.
  • TestServerClient — a typed HTTP client aligned 1:1 with the test server's controllers.
  • WireMockTraceabilityServer — an in-process, in-memory server for fast unit tests.

Datasets and modules

Data is isolated into datasets, and every dataset is a persisted record carrying its own GDST module set (Seafood, Wildcaught, Aquaculture; Core is always implied and Wildcaught/Aquaculture imply Seafood). A dataset's modules drive module minification of every EPCIS / master data response served from it, so one server can serve core-only data and full GDST data side by side. Datasets are selected by the /{datasetId}/... route prefix — the same mechanism a GDST capability tool follows when handed a dataset-scoped digital-link root — and unknown datasets return 404.

Typed client

using var client = new TestServerClient("https://my-test-server", apiKey: "test");

// create a dataset with the modules it should serve
await client.UpsertDatasetAsync("my-test", new UpsertDatasetRequest
{
    Modules = new() { "Seafood", "Wildcaught" }
});

// dataset-scoped operations use the /{datasetId}/... path prefix
var ds = client.ForDataset("my-test");
await ds.PostEpcisDocumentAsync(epcisDocument);
var results = await ds.QueryEventsAsync(new EPCISQueryParameters());
var links = await ds.GetProductLinksAsync("09506000134376");

// hand this to the GDST capability tool — every request it makes stays inside the dataset
string resolverRoot = ds.DigitalLinkUrl;   // https://my-test-server/my-test/digitallink/

// run the full capability test (modules come from the dataset record)
var report = await client.RunCapabilityTestAsync(new CapabilityTestRequest
{
    ToolUrl = "https://capability-tool",
    ToolApiKey = "...",
    SolutionName = "MySolution",
    Pgln = "urn:gdst:example.org:party:me",
    DatasetId = "my-test",
    ClearDatasetBeforeRun = true
});

In-process WireMock server

using var server = WireMockTraceabilityServer.StartWireMockTraceabilityServer(new WireMockTraceabilityConfig
{
    Modules = new() { GdstModule.Wildcaught },          // modules of the primary dataset
    SeedEpcisDocuments = new() { epcisJson },
    Datasets = new()                                     // additional datasets, each with its own tier
    {
        new WireMockDataset { DatasetId = "core-tier", Modules = new() },
        new WireMockDataset { DatasetId = "full-tier", Modules = new() { GdstModule.Wildcaught, GdstModule.Aquaculture } }
    }
});

// GET {server.Url}/epcis/events              -> primary dataset
// GET {server.Url}/core-tier/epcis/events    -> core-only minified
// GET {server.Url}/full-tier/epcis/events    -> full GDST data

The WireMock host serves GET routes only (digital link, EPCIS query, master data); ingestion, traceback, capability tests and dataset management are only available on the real server. Datasets are declared via the config.

Seed manifests

The real server seeds datasets from SeedData/ folders. A folder may carry a dataset.json manifest declaring its modules, description, and shared data files:

{ "modules": ["Seafood", "Wildcaught"], "description": "...", "files": ["_shared/gdst-testdata01.json"] }

Folders starting with _ hold shared assets and are not datasets. Four canonical GDST datasets ship with the package: gdst-core, gdst-seafood, gdst-wildcatch, and gdst-full.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-beta.100 39 6/30/2026
2.0.0-beta.99 55 6/10/2026
2.0.0-beta.98 58 6/8/2026
2.0.0-beta.97 49 6/4/2026
2.0.0-beta.96 62 5/15/2026
1.5.84 119 4/16/2026
1.5.83 108 4/15/2026
1.5.82 138 12/29/2025
1.5.81 732 12/1/2025
1.5.80 180 10/10/2025
1.5.79 171 10/10/2025
1.5.78 172 10/10/2025
1.4.75 335 4/14/2025
1.4.72 299 4/1/2025
1.4.71 244 1/30/2025
1.4.69 226 12/18/2024
1.4.68 250 12/13/2024
1.4.67 237 12/5/2024
1.4.66 239 10/5/2024
1.4.64 233 10/4/2024
Loading failed