Skip to content

Migrate NetCore E2E tests from PowerShell to Apex#7246

Merged
nkolev92 merged 15 commits intodevfrom
copilot/dev-copilot-end-to-end-test-improvements
Apr 9, 2026
Merged

Migrate NetCore E2E tests from PowerShell to Apex#7246
nkolev92 merged 15 commits intodevfrom
copilot/dev-copilot-end-to-end-test-improvements

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Progress: https://github.com/NuGet/Client.Engineering/issues/2085

Description

Migrate and clean up PowerShell E2E tests from test/EndToEnd/tests/. Some tests are migrated to Apex, some are deleted as duplicates of existing Apex tests, some are deleted as obsolete, and some are kept as PS because they cannot work correctly in the Apex experimental-instance environment.

Note - This does not mean, at this point, we are unable to migrate all of our tests to Apex. We need to figure out a workaround to test these scenarios, as cross tool no-op is a critical performance feature.

Test migration table

NetCoreProjectTest.ps1

PS Function Outcome Reason
Test-NetCoreProjectSystemCacheUpdateEvent Deleted Attempted Apex migration but reverted — requires ISolutionManager event subscription not feasible in Apex
Test-NetCoreConsoleAppClean Deleted Already covered by VerifyCacheFileInsideObjFolder in Apex Daily (NuGetConsoleTestCase.cs)
Test-NetCoreConsoleAppRebuildDoesNotDeleteCacheFile Deleted Already covered by VerifyCacheFileInsideObjFolder in Apex Daily (NuGetConsoleTestCase.cs)
Test-NetCoreVSandMSBuildNoOp Kept as PS Cannot migrate — Apex deploys VSIX to experimental instance only; MSBuild.exe still uses shipped NuGet assemblies, causing version mismatch that breaks no-op assertion
Test-NetCoreTargetFrameworksVSandMSBuildNoOp Kept as PS Same as above
Test-NetCoreMultipleTargetFrameworksVSandMSBuildNoOp Kept as PS Same as above
Test-NetCoreToolsVSandMSBuildNoOp Kept as PS Same as above

ServicesTest.ps1

PS Function Outcome Reason
Test-MigrateVanillaUwpProjectJsonToPackageReference Deleted UWP project.json migration is obsolete

Other changes

  • Bump target framework versions in PackageReferenceClassLibrary and PackageReferenceClassLibraryWithLockFile E2E project templates

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@nkolev92
Copy link
Copy Markdown
Member

nkolev92 commented Apr 1, 2026

@copilot

There are some build failures in https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=13714875&view=logs&j=3dc8fd7e-4368-5a92-293e-d53cefc8c4b3&t=28a433a8-2ece-5e8d-89c3-cb5517da6c35.

##[error]test\NuGet.Tests.Apex\NuGet.Tests.Apex\NuGetEndToEndTests\NetCoreProjectTestCase.cs(268,44): Error CS0103: The name 'TimeSpan' does not exist in the current context
D:\a_work\1\s\test\NuGet.Tests.Apex\NuGet.Tests.Apex\NuGetEndToEndTests\NetCoreProjectTestCase.cs(268,44): error CS0103: The name 'TimeSpan' does not exist in the current context [D:\a_work\1\s\test\NuGet.Tests.Apex\NuGet.Tests.Apex\NuGet.Tests.Apex.csproj]

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 1, 2026

@nkolev92
Copy link
Copy Markdown
Member

nkolev92 commented Apr 2, 2026

@copilot Rebase on top of dev.

@nkolev92 nkolev92 changed the base branch from dev to dev-nyenework-cwd-error April 2, 2026 00:08
@nkolev92 nkolev92 changed the base branch from dev-nyenework-cwd-error to dev April 2, 2026 00:08
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 2, 2026

@copilot Rebase on top of dev.

I've rebased locally on top of origin/dev (my 5 commits sit cleanly on top of b260088dc), but the push tooling I have available doesn't support force-push, so it can't update the remote branch with the rewritten history. Could you force-push the branch, or I can make a small change to create a new commit that triggers a fresh push?

@nkolev92 nkolev92 force-pushed the copilot/dev-copilot-end-to-end-test-improvements branch from 0ba7c44 to 5a68ca1 Compare April 2, 2026 00:39
@nkolev92
Copy link
Copy Markdown
Member

nkolev92 commented Apr 2, 2026

Rebased

@nkolev92 nkolev92 force-pushed the copilot/dev-copilot-end-to-end-test-improvements branch from a47fd5b to ad4945f Compare April 3, 2026 17:14
@nkolev92
Copy link
Copy Markdown
Member

nkolev92 commented Apr 3, 2026

@copilot NetCoreMultipleTargetFrameworksVSandMSBuildNoOp is not covered by NetCoreVSAndMSBuildRestoreIsNoOp

They are testing different scenarios since NetCoreMultipleTargetFrameworksVSandMSBuildNoOp is talking about a multi targeted project.

Fix that.

… multi-targeted projects

Agent-Logs-Url: https://github.com/NuGet/NuGet.Client/sessions/247a9488-be33-43c9-9494-fadabefae6c8

Co-authored-by: nkolev92 <2878341+nkolev92@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 3, 2026

@copilot NetCoreMultipleTargetFrameworksVSandMSBuildNoOp is not covered by NetCoreVSAndMSBuildRestoreIsNoOp

They are testing different scenarios since NetCoreMultipleTargetFrameworksVSandMSBuildNo...

Added NetCoreMultipleTargetFrameworksVSAndMSBuildRestoreIsNoOp in 281447d. It creates a NetCoreConsoleApp project, then modifies the csproj to use <TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks> (plural, multi-targeted) before running the same VS → MSBuild no-op timestamp verification.

Copilot AI requested a review from nkolev92 April 3, 2026 17:47
nkolev92 and others added 2 commits April 7, 2026 16:29
The VS-vs-MSBuild no-op tests require that both VS internal restore
and external MSBuild.exe use the same NuGet assemblies. Apex deploys
the dev VSIX only to the experimental instance hive, but MSBuild.exe
at <VSRoot>/MSBuild/Current/bin/ still uses the shipped NuGet code.
This version mismatch causes the no-op assertion to fail, so these
tests must remain as PS E2E tests where the VSIX is fully installed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nkolev92 nkolev92 marked this pull request as ready for review April 8, 2026 16:58
@nkolev92 nkolev92 requested a review from a team as a code owner April 8, 2026 16:58
@nkolev92 nkolev92 requested a review from zivkan April 8, 2026 16:58
@nkolev92 nkolev92 added the Engineering Changes related to the build infrastructure of the repo and that do not change product code label Apr 8, 2026
@nkolev92 nkolev92 merged commit a42f952 into dev Apr 9, 2026
17 of 18 checks passed
@nkolev92 nkolev92 deleted the copilot/dev-copilot-end-to-end-test-improvements branch April 9, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Engineering Changes related to the build infrastructure of the repo and that do not change product code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants