Repository navigation
Conversation
nkolev92
left a comment
There was a problem hiding this comment.
@copilot Explore create a variant of these tests in https://github.com/NuGet/NuGet.Client/tree/dev/test/NuGet.Clients.Tests/NuGetConsole.Host.PowerShell.Test instead.
These APEX tests are long running and expensive, a cheaper version would be to have unit tests.
Leave all the migrated Apex tests for the time being, just try to create a copy of them.
Addressed in e79504d. I added a cheaper unit-style variant suite in |
567a8fa to
ed110d8
Compare
- Remove duplicate private static GetConsole method in GetPackageTestCase.cs that hid the inherited protected base member (CS0108) and incorrectly used inaccessible GetComponentModelService<T>() (CS0122). - Remove unused 'using NuGet.Test.Utility;' from GetPackageTestCase.cs (IDE0005). - Remove unused 'using System.Linq;' from NuGetConsoleTestCase.cs (IDE0005). Co-authored-by: Copilot <[email protected]>
|
By steering copilot I was able to get faster integration tests instead. I'll merge that here. |
- 16 tests covering ListAvailable, Updates, and Installed scenarios - Tests invoke GetPackageCommand directly in a PowerShell runspace - Covers prerelease filtering, version collapsing, project filtering - Replaces need for expensive Apex E2E tests (PR #7452) Co-authored-by: Copilot <[email protected]>
Progress: https://github.com/NuGet/Client.Engineering/issues/2085
This PR advances the Apex migration effort by moving a focused set of
Get-Packageend-to-end behaviors from PowerShell to C# Apex tests, and adds lower-cost unit-style coverage in the PowerShell host test project for key parsing/view-model behaviors.Migration scope
Get-Packagepath source handling, prerelease filtering, and update resolution behavior.ReleaseNotesPackage).Apex scope adjustment
relativeLeafFromParent.GetPackageFromPMCWithPathSource_ReturnsAvailablePackagesAsyncis now a single-scenario test (no longer data-driven across 3 source modes).Cheaper variant coverage (PowerShell host unit tests)
test/NuGet.Clients.Tests/NuGetConsole.Host.PowerShell.Test/Model/GetPackageViewModelTests.cs.Get-Packageview-model behavior, including:Feedback-driven organization update
Get-PackageApex scenarios out ofNuGetConsoleTestCase.csinto a dedicatedGetPackageTestCase.csfor command-focused colocation and clearer test organization.Get-PackagePMC scenarios inNuGetConsoleTestCase.cs..copilot/skills/apex-migration/SKILL.mdfile-placement guidance so future migrations placeGet-Packagescenarios inGetPackageTestCase.cs.Decision table (migrated/combined)
Test-GetPackageAcceptsAbsolutePathSourceGetPackageFromPMCWithPathSource_ReturnsAvailablePackagesAsync(single retainedrelativeLeafFromParentscenario)Test-GetPackageAcceptsRelativePathSourceGetPackageFromPMCWithPathSource_ReturnsAvailablePackagesAsync(single retainedrelativeLeafFromParentscenario)Test-GetPackageAcceptsRelativePathSource2GetPackageFromPMCWithPathSource_ReturnsAvailablePackagesAsync(single retainedrelativeLeafFromParentscenario)Test-ZipPackageLoadsReleaseNotesAttributeGetPackageFromPMCWithListAvailableFilter_FindsReleaseNotesPackageAsyncTest-GetPackagesDoesNotShowPrereleasePackagesWhenSwitchIsNotSpecifiedGetPackageFromPMCWithoutPrereleaseSwitch_HidesPrereleaseVersionsAsyncTest-GetPackagesAllVersionsDoesNotShowPrereleasePackagesWhenSwitchIsNotSpecifiedGetPackageFromPMCWithAllVersionsWithoutPrereleaseSwitch_HidesPrereleaseVersionsAsyncTest-GetPackagesWithPrereleaseSwitchShowsPrereleasePackagesGetPackageFromPMCWithPrereleaseSwitch_ShowsPrereleaseVersionAsyncTest-GetPackagesWithAllAndPrereleaseSwitchShowsAllPackagesGetPackageFromPMCWithAllVersionsAndPrereleaseSwitch_ShowsAllVersionsAsyncTest-GetPackageUpdatesDoNotReturnPrereleasePackagesIfFlagIsNotSpecifiedGetPackageUpdatesFromPMCWithoutPrereleaseSwitch_DoesNotReturnPrereleaseUpdateAsyncTest-GetPackageUpdatesReturnPrereleasePackagesIfFlagIsSpecifiedGetPackageUpdatesFromPMCWithPrereleaseSwitch_ReturnsPrereleaseUpdateAsyncTest-GetPackageUpdatesReturnAllVersionsIfFlagIsSpecifiedGetPackageUpdatesFromPMCWithAllVersionsSwitch_ReturnsStableVersionAsyncTest-GetPackageUpdatesReturnAllVersionsAndPrereleaseVersionsIfTwoFlagsAreSpecifiedGetPackageUpdatesFromPMCWithAllVersionsAndPrereleaseSwitch_ReturnsAllEligibleUpdatesAsync