Skip to content

Use global NuGet cache in acceptance integration tests#7573

Draft
Youssef1313 wants to merge 1 commit intomainfrom
dev/ygerges/use-global-cache
Draft

Use global NuGet cache in acceptance integration tests#7573
Youssef1313 wants to merge 1 commit intomainfrom
dev/ygerges/use-global-cache

Conversation

@Youssef1313
Copy link
Member

I'm not sure why we had .packages cache per asset previously. Let's see if something will fail.

Copilot AI review requested due to automatic review settings March 19, 2026 12:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the test infrastructure and integration tests to stop using a per-asset .packages restore location and instead rely on the ambient/global NuGet cache behavior (e.g., NUGET_PACKAGES from the environment or the default user global-packages folder).

Changes:

  • Remove the explicit NUGET_PACKAGES override from DotnetCli.RunAsync and remove .packages from generated NuGet.config.
  • Simplify acceptance test fixtures by removing the custom NuGet cache TempDirectory wiring and updating all derived fixtures.
  • Update performance runner steps and all test call sites to the updated DotnetCli.RunAsync signature.

Reviewed changes

Copilot reviewed 113 out of 113 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs Stop passing custom NuGet folder into builds
test/Utilities/Microsoft.Testing.TestInfrastructure/TestAsset.cs Remove .packages globalPackagesFolder in NuGet.config
test/Utilities/Microsoft.Testing.TestInfrastructure/DotnetCli.cs Remove NUGET_PACKAGES injection parameter
test/Performance/MSTest.Performance.Runner/Steps/DotnetTrace.cs Use updated DotnetCli invocation
test/Performance/MSTest.Performance.Runner/Steps/DotnetMuxer.cs Use updated DotnetCli invocation
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/UnhandledExceptionPolicyTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TypeForwardingTests.cs Remove custom NuGet folder argument
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxTests.cs Remove custom NuGet folder argument + fixture update
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxSkippedTestTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxFailingTestTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxDataRowTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrimTests.cs Remove custom NuGet folder argument
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TimeoutTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryDisabledTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ServerLoggingTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/RetryFailedTestsTests.cs Remove custom NuGet folder argument + fixture update
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NoBannerTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NativeAotTests.cs Remove custom NuGet folder argument
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.Test.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.Solution.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.GenerateEntryPoint.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.ConfigurationFile.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuild.KnownExtensionRegistration.cs Remove custom NuGet folder argument
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/IgnoreExitCodeTests.cs Remove custom NuGet folder argument
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs Remove .packages TempDirectory management
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs Remove custom NuGet folder argument(s) + fixture update
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpOutputTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ForwardCompatibilityTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExitOnProcessExitTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionRequestCompleteTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/EnvironmentVariablesConfigurationProviderTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DiagnosticTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DataConsumerThroughputTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CustomBannerTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashPlusHangDumpTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashDumpTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ConsoleTests.cs Update fixture base ctor call
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/AbortionTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ValueTaskTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TupleDynamicDataTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrimTests.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadingTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsInheritanceTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestRunParametersTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestFilterTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryWarningsTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestContextTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SynchronizationContextTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ServerModeTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SdkTests.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STAThreadingTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTimeoutTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodCooperativeTimeoutTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTimeoutTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunnerTests.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PublishAotNonNativeTests.cs Remove custom NuGet folder argument
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PlaywrightSdkTests.cs Remove custom NuGet folder argument + fixture update
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedTestTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataSourceTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/OutputTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/NativeAotTests.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSBuildRunnerTests.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleWithParallelAttributesTaskThreadingTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesVoidThreadingTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesTaskThreadingTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LeakTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/FrameworkOnlyTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DuplicateTestClassAttributeTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DotnetTestCliTests.cs Remove custom NuGet folder argument
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeploymentItemTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeadlockTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DataSourceTests.cs Remove custom NuGet folder argument
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CustomAttributesTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestV2SettingsTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestSettingsTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CancellationTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolverTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolutionTests.cs Remove custom NuGet folder argument
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs Update fixture base ctor call
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AspireSdkTests.cs Remove custom NuGet folder argument + fixture update
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs Remove custom NuGet folder argument + fixture update
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AnalyzersTests.cs Remove custom NuGet folder argument(s)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AbortionTests.cs Update fixture base ctor call

You can also share your feedback on Copilot code review. Take the survey.

@Youssef1313 Youssef1313 marked this pull request as ready for review March 19, 2026 13:41
Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is problematic when iterating locally (I have done a longer explanation in our team chat).

@Youssef1313
Copy link
Member Author

Drafting - need to ensure that re-packing production changes don't break things up.

Maybe what we can do is:

  • Unify the global package cache at artifacts/tmp/.packages
  • In asm init, we delete that folder.

What I need to double check:

  • Is every test asset getting its own cache currently?

@Youssef1313 Youssef1313 marked this pull request as draft March 19, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants