apex-migration

Migrate NuGet PowerShell E2E tests to C# Apex tests preserving scenarios and assertions.

819|757|Updated Apr 30, 2014
One-click install
npx skills add https://github.com/NuGet/NuGet.Client --skill apex-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apex-migration
Source: https://github.com/NuGet/NuGet.Client/tree/main/.copilot/skills/apex-migration
Command: npx skills add https://github.com/NuGet/NuGet.Client --skill apex-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you migrate NuGet PowerShell end-to-end (E2E) tests into C# Apex tests while preserving the exact scenario and assertions, so your test suite becomes faster, more consistent, and easier to maintain.

Core Features & Use Cases

  • Scenario-preserving migration workflow: Read the PowerShell E2E test, translate constructs, verify compilation, and remove the original function.
  • Correct Apex file selection by interaction surface: Routes PMC, UI, IVs, sync/binding redirect, audit, and .NET project-creation scenarios to the appropriate Apex test file.
  • Deterministic translation rules: Converts common PowerShell project factories, PMC command execution patterns, assertions, package creation, and NuGet.config manipulation into the closest Apex equivalents.
  • Safety guardrails: Advises when tests should not be migrated and when existing Apex coverage already exists (avoid duplicate gating).

Quick Start

Use the apex-migration skill to rewrite a PowerShell E2E test from test/EndToEnd/tests/ that calls Install-PackageTest or Update-PackageTest into a matching C# Apex test under test/NuGet.Tests.Apex/... .

Frequently Asked Questions about apex-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate NuGet PowerShell E2E tests to C# Apex?

To migrate NuGet PowerShell E2E tests to C# Apex, you translate Install-PackageTest or Update-PackageTest functions into the Apex test layout while preserving the exact scenario and assertions. This process routes PMC, UI, and sync scenarios to the appropriate Apex test file.

What is the best way to convert PowerShell PMC command execution patterns to Apex tests?

Converting PowerShell PMC command execution patterns to Apex tests requires mapping project-template factories and PMC command execution semantics to their closest Apex equivalents. This ensures your test suite becomes faster, more consistent, and easier to maintain.

Can I preserve NuGet.config setup and assertions when porting PowerShell tests to C#?

Yes, you can preserve NuGet.config setup and assertions when porting PowerShell tests to C#. The migration process includes deterministic translation rules that convert package source setup and NuGet.config manipulation into matching Apex test equivalents.

When should I not migrate a PowerShell E2E test to Apex?

You should not migrate a PowerShell E2E test to Apex when existing Apex coverage already exists for that scenario. The migration process includes safety guardrails to advise skipping duplicate-covered scenarios and avoiding duplicate gating.

Does NuGet Apex migration support binding redirect and audit scenarios?

Yes, NuGet Apex migration supports binding redirect and audit scenarios. The workflow correctly routes these specific interaction surfaces, alongside IVs and .NET project-creation scenarios, into the appropriate Apex test files during translation.

How does the apex-migration skill handle test suite cleanup after porting?

The apex-migration skill handles test suite cleanup by verifying compilation of the newly translated C# Apex test and then removing the original PowerShell E2E test function to prevent duplicate coverage and streamline maintenance.