{"kind":"Skill","metadata":{"namespace":"community","name":"creating-oracle-to-postgres-migration-integration-tests","version":"0.1.0"},"spec":{"description":"Creates integration test cases for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Generates DB-agnostic xUnit tests with deterministic seed data that validate behavior consistency across both database systems. Use when creating integration tests for a migrated project, generating test coverage for data access layers, or writing Oracle-to-PostgreSQL migration validation tests.","files":{"SKILL.md":"---\nname: creating-oracle-to-postgres-migration-integration-tests\ndescription: 'Creates integration test cases for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Generates DB-agnostic xUnit tests with deterministic seed data that validate behavior consistency across both database systems. Use when creating integration tests for a migrated project, generating test coverage for data access layers, or writing Oracle-to-PostgreSQL migration validation tests.'\n---\n\n# Creating Integration Tests for Oracle-to-PostgreSQL Migration\n\nGenerates integration test cases for data access artifacts in a single target project. Tests validate behavior consistency when running against Oracle or PostgreSQL.\n\n## Prerequisites\n\n- The test project must already exist and compile (scaffolded separately).\n- Read the existing base test class and seed manager conventions before writing tests.\n\n## Workflow\n\n```\nTest Creation:\n- [ ] Step 1: Discover the test project conventions\n- [ ] Step 2: Identify testable data access artifacts\n- [ ] Step 3: Create seed data\n- [ ] Step 4: Write test cases\n- [ ] Step 5: Review determinism\n```\n\n**Step 1: Discover the test project conventions**\n\nRead the base test class, seed manager, and project file to understand inheritance patterns, transaction management, and seed file conventions.\n\n**Step 2: Identify testable data access artifacts**\n\nScope to the target project only. List data access methods that interact with the database — repositories, DAOs, stored procedure callers, query builders.\n\n**Step 3: Create seed data**\n\n- Follow seed file location and naming conventions from the existing project.\n- Reuse existing seed files when possible.\n- Avoid `TRUNCATE TABLE` — keep existing database data intact.\n- Do not commit seed data; tests run in transactions that roll back.\n- Ensure seed data does not conflict with other tests.\n- Load and verify seed data before assertions depend on it.\n\n**Step 4: Write test cases**\n\n- Inherit from the base test class to get automatic transaction create/rollback.\n- Assert logical outputs (rows, columns, counts, error types), not platform-specific messages.\n- Assert specific expected values — never assert that a value is merely non-null or non-empty when a concrete value is available from seed data.\n- Avoid testing code paths that do not exist or asserting behavior that cannot occur.\n- Avoid redundant assertions across tests targeting the same method.\n\n**Step 5: Review determinism**\n\nRe-examine every assertion against non-null values. Confirm each is deterministic against the seeded data. Fix any assertion that depends on database state outside the test's control.\n\n## Key Constraints\n\n- **Oracle is the golden source** — tests capture Oracle's expected behavior.\n- **DB-agnostic assertions** — no platform-specific error messages or syntax in assertions.\n- **Seed only against Oracle** — test project will be migrated to PostgreSQL later.\n- **Scoped to one project** — do not create tests for artifacts outside the target project.\n"},"import":{"commit_sha":"541b7819d8c3545c6df122491af4fa1eae415779","imported_at":"2026-05-18T20:05:35Z","license_text":"MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","owner":"github","repo":"github/awesome-copilot","source_url":"https://github.com/github/awesome-copilot/tree/541b7819d8c3545c6df122491af4fa1eae415779/plugins/oracle-to-postgres-migration-expert/skills/creating-oracle-to-postgres-migration-integration-tests"}},"content_hash":[234,208,123,207,124,121,53,133,72,113,184,203,69,26,88,199,183,89,105,32,212,43,135,111,8,199,80,131,205,34,7,121],"trust_level":"unsigned","yanked":false}
