mcpField
S
scaffolding-oracle-to-postgres-migration-test-project

scaffolding-oracle-to-postgres-migration-test-project

github.com/githubTesting & quality40.5k1.7k installsUpdated 1d ago
Repository

About scaffolding-oracle-to-postgres-migration-test-project

A skill for scaffolding an empty xUnit integration-test project for Oracle-to-PostgreSQL migration work. It is intended for developers preparing the Oracle test-project infrastructure before writing test cases.

Key features

  1. 01Matches the target project's .NET and package versions
  2. 02Creates an Oracle-connected xUnit project
  3. 03Adds transaction rollback test infrastructure
  4. 04Adds transactional seed-data management
  5. 05Builds the project to check compilation

Use cases

  1. 01Set up the Oracle test project in migration Phase 3
  2. 02Prepare rollback-based tests without committing seed data
  3. 03Verify test infrastructure compiles before adding cases

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/github/awesome-copilot --skill scaffolding-oracle-to-postgres-migration-test-project

After installing, type/scaffolding-oracle-to-postgres-migration-test-projectin Claude Code to confirm it loaded.

Details

From the project README

Scaffolding an Integration Test Project for Oracle-to-PostgreSQL Migration

Creates a compilable, empty xUnit test project with transaction management and seed data infrastructure for a single target project. Run once per project before writing tests.

Workflow

Progress:
- [ ] Step 1: Inspect the target project
- [ ] Step 2: Create the xUnit test project
- [ ] Step 3: Implement transaction-rollback base class
- [ ] Step 4: Implement seed data manager
- [ ] Step 5: Verify the project compiles

Step 1: Inspect the target project

Read the target project's .csproj to determine the .NET version and existing package references. Match these versions exactly — do not upgrade.

Step 2: Create the xUnit test project

  • Target the same .NET version as the application under test.
  • Add NuGet packages for Oracle database connectivity (Oracle.ManagedDataAccess.Core) and xUnit.
  • Add a project reference to the target project only — no other application projects.
  • Add an appsettings.json configured for Oracle database connectivity.

Step 3: Implement transaction-rollback base class

  • Create a base test class that opens a transaction before each test and rolls it back after.
  • Catch and handle all exceptions to guarantee rollback.
  • Make the pattern inheritable by all downstream test classes.

Step 4: Implement seed data manager

  • Create a global seed manager for loading test data within the transaction scope.
  • Do not commit seed data — transactions roll back after each test.
  • Do not use TRUNCATE TABLE — preserve existing database data.
  • Establish a naming convention for seed file location that downstream test creation will follow.

Step 5: Verify the project compiles

Build the test project and confirm it compiles with zero errors before finishing.

Key Constraints

  • Phase 3 only — this skill scaffolds the Oracle-targeting test project. The PostgreSQL test project (Phase 6) is created by copying and migrating this project; do not run this skill again at that point.
  • Oracle is the golden behavior source — scaffold for Oracle only, not PostgreSQL.
  • Keep to existing .NET and C# versions; do not introduce newer language or runtime features.
  • Output is an empty test project with infrastructure only — no test cases.

Comments

Markdown supported