Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates multiple test projects to xUnit v3 with Microsoft Testing Platform support, adds cooperative cancellation propagation, and enables console output capture in test results.
Changes:
- Switch test infrastructure to xUnit v3 (
xunit.v3.core.mtp-v2) and set test projects to executable output. - Propagate
TestContext.Current.CancellationTokenthrough async test calls. - Add
[assembly: CaptureConsole]to test assemblies.
Reviewed changes
Copilot reviewed 43 out of 44 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test.props | Updates shared test project props for MTP/xUnit v3 (exe output + package refs). |
| Directory.Packages.props | Central package update to use xunit.v3.core.mtp-v2. |
| introspection/test/AspNetCore.Authentication.OAuth2Introspection.Tests/Introspection.cs | Propagates cancellation token through HTTP calls in introspection tests. |
| introspection/test/AspNetCore.Authentication.OAuth2Introspection.Tests/Configuration.cs | Propagates cancellation token through HTTP calls in configuration tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/UserInfoExtensionsTests.cs | Propagates cancellation token through IdentityModel HTTP client extension tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/TokenRevocationExtensions.cs | Propagates cancellation token through token revocation extension tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/TokenRequestExtensionsResponseTests.cs | Propagates cancellation token through token response tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/TokenRequestExtensionsRequestTests.cs | Propagates cancellation token through token request tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/TokenIntrospectionTests.cs | Propagates cancellation token through introspection extension tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/PushedAuthorizationTests.cs | Propagates cancellation token through PAR extension tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/JsonWebKeyExtensionsTests.cs | Propagates cancellation token through JWKs extension tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/DynamicClientRegistrationTests.cs | Propagates cancellation token through dynamic registration tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/DiscoveryExtensionsTests.cs | Propagates cancellation token and adjusts discovery tests for v3/MTP. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/DeviceAuthorizationExtensionsTests.cs | Propagates cancellation token through device authorization tests. |
| identity-model/test/IdentityModel.Tests/HttpClientExtensions/CibaExtensionsTests.cs | Propagates cancellation token through CIBA extension tests. |
| identity-model/test/IdentityModel.Tests/DiscoveryPolicyTests_AuthorityUriComparison.cs | Propagates cancellation token through discovery policy tests (URI strategy). |
| identity-model/test/IdentityModel.Tests/DiscoveryPolicyTests_AuthorityStringComparison.cs | Propagates cancellation token through discovery policy tests (string strategy). |
| identity-model/test/IdentityModel.Tests/AssemblyInfo.cs | Adds [assembly: CaptureConsole] for console capture. |
| identity-model-oidc-client/test/IdentityModel.OidcClient.Tests/RefreshTokenDelegatingHandlerTests.cs | Adds cancellation token wiring in OidcClient tests. |
| identity-model-oidc-client/test/IdentityModel.OidcClient.Tests/OidcClientTests.cs | Adds cancellation token wiring to OidcClient API calls. |
| identity-model-oidc-client/test/IdentityModel.OidcClient.Tests/DPoP/DPoPTests.cs | Adds cancellation token wiring to DPoP integration tests. |
| identity-model-oidc-client/test/IdentityModel.OidcClient.Tests/ConfigurationTests.cs | Uses cooperative cancellation token in provider info loading tests. |
| identity-model-oidc-client/test/IdentityModel.OidcClient.Tests/CommonResponseTests.cs | Adds cancellation token wiring to response processing tests. |
| identity-model-oidc-client/test/IdentityModel.OidcClient.Tests/CodeFlowResponseTests.cs | Adds cancellation token wiring throughout code flow response tests. |
| identity-model-oidc-client/test/IdentityModel.OidcClient.Tests/AuthorizeRequestTests.cs | Adds cancellation token wiring to authorize request tests. |
| identity-model-oidc-client/test/IdentityModel.OidcClient.Tests/AssemblyInfo.cs | Adds [assembly: CaptureConsole] for console capture. |
| access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementWithDPoPTests.cs | Propagates cancellation token through DPoP user-token integration tests. |
| access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs | Propagates cancellation token through user token management integration tests. |
| access-token-management/test/AccessTokenManagement.Tests/TokenRetrieverTests.cs | Uses cooperative cancellation token in token retriever tests. |
| access-token-management/test/AccessTokenManagement.Tests/TokenRequestCustomizer/UserAccessTokenTokenRequestCustomizerTests.cs | Propagates cancellation token through token request customizer tests. |
| access-token-management/test/AccessTokenManagement.Tests/TokenRequestCustomizer/ScenarioTests.cs | Propagates cancellation token through scenario tests. |
| access-token-management/test/AccessTokenManagement.Tests/TokenRequestCustomizer/RevokeRefreshTokenAsyncTests.cs | Propagates cancellation token through revoke-refresh-token tests. |
| access-token-management/test/AccessTokenManagement.Tests/TokenRequestCustomizer/GetUserAccessTokenAsyncTests.cs | Propagates cancellation token through get-user-token tests. |
| access-token-management/test/AccessTokenManagement.Tests/TokenRequestCustomizer/GetClientAccessTokenAsyncTests.cs | Propagates cancellation token through get-client-token tests. |
| access-token-management/test/AccessTokenManagement.Tests/TokenRequestCustomizer/ClientCredentialsTokenRequestCustomizerTests.cs | Propagates cancellation token through client-credentials customizer tests. |
| access-token-management/test/AccessTokenManagement.Tests/TokenRequestCustomizer/ClientAccessTokenTokenRequestCustomizerTests.cs | Propagates cancellation token through client-access-token customizer tests. |
| access-token-management/test/AccessTokenManagement.Tests/StoreTokensInAuthenticationPropertiesTests.cs | Adds cancellation token propagation to token storage APIs. |
| access-token-management/test/AccessTokenManagement.Tests/HybridCacheExplorationTests.cs | Adds cancellation token propagation to HybridCache calls. |
| access-token-management/test/AccessTokenManagement.Tests/ClientTokenManagementTests.cs | Adds cancellation token propagation to client token manager tests. |
| access-token-management/test/AccessTokenManagement.Tests/ClientTokenManagementApiTests.cs | Adds cancellation token propagation to API-level token management tests. |
| access-token-management/test/AccessTokenManagement.Tests/BackChannelClientTests.cs | Adds cancellation token propagation to backchannel client tests. |
| access-token-management/test/AccessTokenManagement.Tests/AssemblyInfo.cs | Adds [assembly: CaptureConsole] for console capture. |
| access-token-management/test/AccessTokenManagement.Tests/AccessTokenHandler/AccessTokenHandlerTests.cs | Adds cancellation token propagation to access token handler tests. |
Comments suppressed due to low confidence (1)
identity-model/test/IdentityModel.Tests/HttpClientExtensions/DiscoveryExtensionsTests.cs:1
- This test no longer validates the stated behavior (“Authority should expand to endpoint”). Passing
_endpointas the Address bypasses authority-expansion logic and makes the test assert a trivial case. Restore an authority input (e.g.,https://demo.identityserver.io) and keep_endpointas the expected expanded request URI.
// Copyright (c) Duende Software. All rights reserved.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b3a87a0 to
1b79113
Compare
- Add Microsoft.Testing.Extensions.CodeCoverage package - Enable UseMicrosoftTestingPlatformRunner in test.props - Update workflow-gen to use dotnet run with MTP options - Run tests for all TFMs (net8.0, net9.0, net10.0) - Generate TRX reports and Cobertura coverage per TFM
Erwinvandervalk
previously approved these changes
Feb 16, 2026
The net481 test support was temporarily disabled in Oct 2025 and the commented-out code has since become incompatible with refactored method signatures. Remove the dead commented-out blocks from the workflow generator and clean up orphaned net481 conditional ItemGroups in IdentityModel.Tests.csproj.
Erwinvandervalk
approved these changes
Feb 16, 2026
Member
Author
|
We'll drop support for netstandard and running tests on windows hosts in a follow up PR. |
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
[assembly: CaptureConsole]to capture console output in test resultsChanges
xunit.v3.core.mtp-v2for MTP integrationTestContext.Current.CancellationTokenpropagation to all async test methods[assembly: CaptureConsole]attribute to test assembliesTest Projects Updated