Task 1/6: Integration test suite foundation (strategy, project, mock harness, CI)#128
Merged
Merged
Conversation
Create a dedicated MSTest.Sdk integration test project separated from the unit test projects, referencing ClientApi and Application, and register it in the solution. No tests added yet; utilities/fixtures and smoke test follow in later phases.
Add the mock-tier harness: MockHttpMessageHandler (scripted responses + request recording), PackageUploaderTestHost (real DI graph with the Ingestion network handler and token provider replaced by test doubles), FakeAccessTokenProvider, IntegrationTestBase ([TestCategory(Integration)]), and SyntheticPackageFile for upload-path tests.
…se 3) Add a smoke test validating the mock harness, and split the GitHub Actions test run into unit (TestCategory!=Integration) and integration (TestCategory=Integration) steps. Both gate every PR; --ignore-exit-code 8 absorbs Microsoft.Testing.Platform's zero-match-per-project exit code.
- MockHttpMessageHandler: return 400 (not 501) for unmatched requests so the Ingestion Polly policy does not retry a missing stub; guard the recorded-request list with a lock for concurrent SendAsync. - PackageUploaderTestHost: resolve the scoped IPackageUploaderService from an explicit DI scope with ValidateScopes enabled, instead of the root provider. - SyntheticPackageFile: widen best-effort Dispose catch beyond IOException. - SmokeTest: use TestContext.CancellationToken. - CI: add --minimum-expected-tests 1 so a mistyped/renamed category fails instead of silently passing with zero tests.
WilliamsJason
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First task (1/6) of the PackageUploader Integration Test Suite & Azure DevOps Pipeline deliverable. This establishes the foundation for an end-to-end integration test suite that validates PackageUploader's interactions with the Partner Center Ingestion API (and, later, XFUS).
This PR delivers the strategy decisions (tiered, mock-only first; PR-blocking in GitHub Actions; fake-token auth; committed fixtures + synthetic packages), a new
PackageUploader.IntegrationTestproject, the mock-tier test harness and fixtures, a smoke test, and the CI wiring that runs unit and integration tests as separate PR-blocking steps.Out of scope (later tasks 2–6)
Full mock-server behaviors and per-operation E2E flow tests, XFUS upload-path interception, the Azure DevOps pipeline, and any live-sandbox execution.