Testing Strategy

ManagedCode.Storage uses xUnit + Shouldly and aims to verify storage behaviour through realistic flows (upload/download/list/delete/metadata) with minimal mocking.

Test Project

Suite Map

flowchart TD
  Tests[ManagedCode.Storage.Tests] --> Core[Core helpers + invariants]
  Tests --> Providers[Provider suites]
  Tests --> AspNet[ASP.NET controllers + SignalR]
  Tests --> Vfs[VFS suites]

  Providers --> Containers["Testcontainers (Azurite/LocalStack/FakeGcsServer/SFTP)"]
  Providers --> CloudDrive["CloudDrive (Graph/Drive/Dropbox)"]
  CloudDrive --> HttpFakes[HttpMessageHandler fakes wired into official SDK clients]

Structure

Tests are grouped by “surface” and provider:

External Dependencies

Where possible, tests run without real cloud accounts:

Categories

Some tests are marked as “large file” to validate streaming behaviour:

Run the default fast suite:

dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --filter "Category!=BrowserStress"

Install the Playwright browser for the browser-local tests:

dotnet tool restore
dotnet build Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release
dotnet playwright -p Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj install chromium

Skip large-file tests when iterating:

dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --filter "Category!=LargeFile"

Skip the hosted-browser stress lane while still running the default fast browser coverage:

dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --filter "Category!=BrowserStress"

Run only the hosted-browser stress lane locally when you explicitly need it:

dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --filter "Category=BrowserStress"

Tiered browser large-file coverage now works like this:

The earlier 1 GiB browser target was removed from automated CI because Chromium-backed WASM verification hit an unstable OPFS write boundary around 512 MiB, so 256 MiB became the stable automated stress target.

Quality Rules