Simplfy NuGet cache folder handling in integration tests#7573
Simplfy NuGet cache folder handling in integration tests#7573Youssef1313 merged 13 commits intomainfrom
Conversation
There was a problem hiding this comment.
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_PACKAGESoverride fromDotnetCli.RunAsyncand remove.packagesfrom generatedNuGet.config. - Simplify acceptance test fixtures by removing the custom NuGet cache
TempDirectorywiring and updating all derived fixtures. - Update performance runner steps and all test call sites to the updated
DotnetCli.RunAsyncsignature.
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.
Evangelink
left a comment
There was a problem hiding this comment.
This is problematic when iterating locally (I have done a longer explanation in our team chat).
There was a problem hiding this comment.
Pull request overview
This PR changes the test infrastructure used by MSTest/Microsoft.Testing.Platform acceptance/performance tests so that generated test assets no longer restore/build against a per-asset (or per-assembly) .packages folder, and instead rely on the ambient NuGet global packages location (or ambient NUGET_PACKAGES).
Changes:
- Remove the dedicated
.packagesglobal packages folder setup from acceptance test assembly initialization. - Stop forcing
NUGET_PACKAGESinDotnetCli.RunAsyncand remove theglobalPackagesFolderoverride from generatedNuGet.config. - Update all affected tests/steps to use the new
DotnetCli.RunAsyncsignature and base fixture constructor.
Reviewed changes
Copilot reviewed 119 out of 119 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs | Removes explicit NuGet packages temp directory usage when building generated assets. |
| test/Utilities/Microsoft.Testing.TestInfrastructure/TestAsset.cs | Generated NuGet.config no longer pins globalPackagesFolder to .packages. |
| test/Utilities/Microsoft.Testing.TestInfrastructure/DotnetCli.cs | Removes NUGET_PACKAGES injection; RunAsync no longer forces a packages folder. |
| test/Performance/MSTest.Performance.Runner/Steps/DotnetTrace.cs | Stops using per-asset .packages folder when installing dotnet-trace. |
| test/Performance/MSTest.Performance.Runner/Steps/DotnetMuxer.cs | Stops using per-asset .packages folder for restore/build. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/UnhandledExceptionPolicyTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TypeForwardingTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync and updates fixture base ctor. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxSkippedTestTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxFailingTestTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxDataRowTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrimTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TimeoutTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryDisabledTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ServerLoggingTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/RetryFailedTestsTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync and updates fixture base ctor. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NoBannerTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NativeAotTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.Test.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.Solution.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.GenerateEntryPoint.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.ConfigurationFile.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuild.KnownExtensionRegistration.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/IgnoreExitCodeTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs | Removes creation/disposal of a temp .packages folder at assembly scope. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync and updates fixture base ctor. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpOutputTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ForwardCompatibilityTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExitOnProcessExitTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionRequestCompleteTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/EnvironmentVariablesConfigurationProviderTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DiagnosticTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DataConsumerThroughputTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CustomBannerTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashPlusHangDumpTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashDumpTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ConsoleTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/AbortionTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ValueTaskTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TupleDynamicDataTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrimTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutWhenExpiresTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutWhenCanceledTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTestMethodTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutFromRunSettingsTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutCooperativeTestMethodTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutCooperativeCancellationTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadingTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsInheritanceTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestRunParametersTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestFilterTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryWarningsTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestContextTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SynchronizationContextTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ServerModeTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SdkTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STAThreadingTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTimeoutTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodCooperativeTimeoutTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTimeoutTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunnerTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PublishAotNonNativeTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PlaywrightSdkTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync and updates fixture base ctor. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedTestTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataSourceTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/OutputTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/NativeAotTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSBuildRunnerTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleWithParallelAttributesTaskThreadingTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesVoidThreadingTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesTaskThreadingTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LeakTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/FrameworkOnlyTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DuplicateTestClassAttributeTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DotnetTestCliTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeploymentItemTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeadlockTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DataSourceTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CustomAttributesTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestV2SettingsTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestSettingsTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CancellationTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolverTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolutionTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs | Updates fixture base constructor usage to the parameterless base. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AspireSdkTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync and updates fixture base ctor. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync and updates fixture base ctor. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AnalyzersTests.cs | Removes explicit packages folder argument from DotnetCli.RunAsync. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AbortionTests.cs | Updates fixture base constructor usage to the parameterless base. |
|
@Evangelink I'm now setting NUGET_PACKAGES env variable in assembly initialize. Does that address your concern? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 119 out of 119 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
test/Utilities/Automation.CLI/VSTestConsoleLocator.cs:1
- When
NUGET_PACKAGESis set but the specific package/version folder does not exist yet, this code silently falls back to the user-profile global cache. That undermines the goal of centralized, per-run caching and can mask problems by picking up stale packages from the machine cache. Prefer to not fall back whenNUGET_PACKAGESis set; instead return the expected path underNUGET_PACKAGES(even if it doesn't exist yet) and let the existing error path report that it's missing, or explicitly throw/assert that the package path must exist under the overridden cache.
test/Utilities/Automation.CLI/VSTestConsoleLocator.cs:1 - This helper now returns a full package path (root + packageName + version), not a NuGet 'package folder' root. Renaming to something like
GetNugetPackagePath(or adjusting implementation to return the root folder and letting the caller append package/version) would avoid confusion and reduce the chance of incorrect future reuse.
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs:1 - Cleanup only swallows
IOException.Directory.Delete(..., recursive: true)can also throwUnauthorizedAccessException(and other exceptions) depending on file locks/ACLs, which would fail the entire test assembly cleanup. Consider broadening the handled exceptions (at minimumUnauthorizedAccessException) and/or implementing a small retry/backoff before giving up, and optionally clearingNUGET_PACKAGESback to its prior value to avoid leaking state if other assemblies run in the same process.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 121 out of 121 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (6)
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs:1
- MSTest's
[AssemblyCleanup]typically requires a parameterless static method. If the framework doesn't recognize this signature, cleanup won't run (and the per-run.packagesfolder will leak). Consider changing it back topublic static void AssemblyCleanup()(or an async-returning equivalent supported by MSTest) and move any needed state into captured fields.
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs:1 - The code sets
NUGET_PACKAGESunconditionally but doesn't restore any previous value. If multiple test assemblies execute in the same process, this can leak configuration across assemblies. Consider capturing the previousNUGET_PACKAGESvalue duringAssemblyInitializeand restoring/unsetting it duringAssemblyCleanup.
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs:1 - The code sets
NUGET_PACKAGESunconditionally but doesn't restore any previous value. If multiple test assemblies execute in the same process, this can leak configuration across assemblies. Consider capturing the previousNUGET_PACKAGESvalue duringAssemblyInitializeand restoring/unsetting it duringAssemblyCleanup.
test/Utilities/Automation.CLI/VSTestConsoleLocator.cs:1 - If
NUGET_PACKAGESis set but the specific package/version folder isn't present yet, this silently falls back to the user-profile cache. That undermines isolation (and can pick up a different version than the one restored into the configured cache). IfNUGET_PACKAGESis present, consider treating it as authoritative: return the computedfullPackagePath(and let callers fail with a clear error), or assert/throw if the package isn't found there.
test/Utilities/Automation.CLI/VSTestConsoleLocator.cs:1 - This method now returns a specific package path (it combines
packageNameandpackageVersion) rather than a NuGet packages folder root. Renaming it to something likeGetNugetPackagePath(or adjusting it to return only the root folder) would make the contract clearer.
test/Performance/MSTest.Performance.Runner/Steps/DotnetTrace.cs:1 - The PR title/description focuses on integration tests, but this change also affects the performance runner by removing the per-asset
.packagesrestore folder, which can change tool/package caching behavior across runs/machines. Either update the PR description/title to reflect the broader scope, or keep the previous isolated packages behavior for performance steps (e.g., by settingNUGET_PACKAGESviaenvironmentVariablesfor these calls).
Evangelink
left a comment
There was a problem hiding this comment.
Nice cleanup! Removing the per-call nugetGlobalPackagesFolder plumbing from ~100+ files in favor of a centralized NUGET_PACKAGES env var is a welcome simplification. The randomized cache per run to avoid stale packages is well-motivated.
Main concerns:
-
Scope of
NUGET_PACKAGESsetup —AcceptanceFixtureonly covers one test assembly. Other assemblies usingTestAssetFixtureBase(e.g.,MSTest.Acceptance.IntegrationTests, perf runner) need equivalent setup, or they lose hermeticity. -
Cleanup robustness —
Directory.Deletecleanup catches onlyIOException;UnauthorizedAccessException(read-only files) can also occur and would fail the test run. -
Orphaned directories — Cleanup deletes
.packagesbut not the parent<RandomId>/directory. -
VSTestConsoleLocatorsilent fallback — WhenNUGET_PACKAGESis set but the package isn't there, silently falling back to%USERPROFILE%\.nuget\packagescan mask real issues. -
PackageDownloadforMicrosoft.TestPlatform— Added inAppDomainTestsbut may be needed in other.NET Framework+UseVSTestassets too. -
Inconsistent constructor syntax — Mix of
TestAssetFixture : TestAssetFixtureBasevsTestAssetFixture() : TestAssetFixtureBase().
Also, minor nit: PR title "Simplfy" → "Simplify".
No description provided.