$npx -y skills add github/awesome-copilot --skill scaffolding-oracle-to-postgres-migration-test-projectScaffolds an xUnit integration test project for validating Oracle-to-PostgreSQL database migration behavior in .NET solutions. Creates the test project, transaction-rollback base class, and seed data manager. Use when setting up test infrastructure before writing migration integr
| 1 | # Scaffolding an Integration Test Project for Oracle-to-PostgreSQL Migration |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## Workflow |
| 6 | |
| 7 | ``` |
| 8 | Progress: |
| 9 | - [ ] Step 1: Inspect the target project |
| 10 | - [ ] Step 2: Create the xUnit test project |
| 11 | - [ ] Step 3: Implement transaction-rollback base class |
| 12 | - [ ] Step 4: Implement seed data manager |
| 13 | - [ ] Step 5: Verify the project compiles |
| 14 | ``` |
| 15 | |
| 16 | **Step 1: Inspect the target project** |
| 17 | |
| 18 | Read the target project's `.csproj` to determine the .NET version and existing package references. Match these versions exactly — do not upgrade. |
| 19 | |
| 20 | **Step 2: Create the xUnit test project** |
| 21 | |
| 22 | - Target the same .NET version as the application under test. |
| 23 | - Add NuGet packages for Oracle database connectivity and xUnit. |
| 24 | - Add a project reference to the target project only — no other application projects. |
| 25 | - Add an `appsettings.json` configured for Oracle database connectivity. |
| 26 | |
| 27 | **Step 3: Implement transaction-rollback base class** |
| 28 | |
| 29 | - Create a base test class that opens a transaction before each test and rolls it back after. |
| 30 | - Catch and handle all exceptions to guarantee rollback. |
| 31 | - Make the pattern inheritable by all downstream test classes. |
| 32 | |
| 33 | **Step 4: Implement seed data manager** |
| 34 | |
| 35 | - Create a global seed manager for loading test data within the transaction scope. |
| 36 | - Do not commit seed data — transactions roll back after each test. |
| 37 | - Do not use `TRUNCATE TABLE` — preserve existing database data. |
| 38 | - Reuse existing seed files if available. |
| 39 | - Establish a naming convention for seed file location that downstream test creation will follow. |
| 40 | |
| 41 | **Step 5: Verify the project compiles** |
| 42 | |
| 43 | Build the test project and confirm it compiles with zero errors before finishing. |
| 44 | |
| 45 | ## Key Constraints |
| 46 | |
| 47 | - Oracle is the golden behavior source — scaffold for Oracle first. |
| 48 | - Keep to existing .NET and C# versions; do not introduce newer language or runtime features. |
| 49 | - Output is an empty test project with infrastructure only — no test cases. |