Catalog
github/creating-oracle-to-postgres-migration-integration-tests

github

creating-oracle-to-postgres-migration-integration-tests

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.

global
New~738
v1.0Saved Jun 26, 2026

Creating Integration Tests for Oracle-to-PostgreSQL Migration

Generates integration test cases for data access artifacts in a single target project. Tests validate behavior consistency when running against Oracle or PostgreSQL.

Prerequisites

  • The test project must already exist and compile (scaffolded separately).
  • Read the existing base test class and seed manager conventions before writing tests.

Workflow

Test Creation:
- [ ] Step 1: Discover the test project conventions
- [ ] Step 2: Identify testable data access artifacts
- [ ] Step 3: Create seed data
- [ ] Step 4: Write test cases
- [ ] Step 5: Review determinism

Step 1: Discover the test project conventions

Read the base test class, seed manager, and project file to understand inheritance patterns, transaction management, and seed file conventions.

Step 2: Identify testable data access artifacts

Scope to the target project only. List data access methods that interact with the database — repositories, DAOs, stored procedure callers, query builders.

Step 3: Create seed data

  • Follow seed file location and naming conventions from the existing project.
  • Reuse existing seed files when possible.
  • Avoid TRUNCATE TABLE — keep existing database data intact.
  • Do not commit seed data; tests run in transactions that roll back.
  • Ensure seed data does not conflict with other tests.
  • Load and verify seed data before assertions depend on it.

Step 4: Write test cases

  • Inherit from the base test class to get automatic transaction create/rollback.
  • Assert logical outputs (rows, columns, counts, error types), not platform-specific messages.
  • 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.
  • Avoid testing code paths that do not exist or asserting behavior that cannot occur.
  • Avoid redundant assertions across tests targeting the same method.

Step 5: Review determinism

Re-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.

Key Constraints

  • Oracle is the golden source — tests capture Oracle's expected behavior.
  • DB-agnostic assertions — no platform-specific error messages or syntax in assertions.
  • Seed only against Oracle — test project will be migrated to PostgreSQL later.
  • Scoped to one project — do not create tests for artifacts outside the target project.
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

86/100

Grade

A

Excellent

Safety

89

Quality

87

Clarity

84

Completeness

81

Summary

This skill guides the creation of database-agnostic integration tests for .NET projects during Oracle-to-PostgreSQL migrations. It provides a structured five-step workflow (discover conventions, identify artifacts, create seed data, write tests, review determinism) with clear constraints around scoping, assertions, and test isolation. Tests inherit from a base class for automatic transaction management and are designed to validate behavior consistency across both database systems.

Detected Capabilities

file read (base test class, seed manager, project files)file write (test case files, seed data files)project-scoped code generation (xUnit tests, C# test methods)transaction-based test isolation (automatic rollback)

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

oracle to postgres migrationintegration test generationdatabase migration testsxunit test creationmigration validation tests

Use Cases

  • Generate integration test coverage for .NET data access layers during Oracle-to-PostgreSQL migrations
  • Validate behavior consistency of repositories and DAOs when running against both Oracle and PostgreSQL
  • Create seed data and test cases that follow existing project test conventions
  • Write deterministic, platform-agnostic assertions that capture expected database behavior
  • Build test suites that ensure migration correctness without modifying existing database state

Quality Notes

  • Excellent scope clarity: explicitly limits work to a single target project only
  • Strong emphasis on determinism and test isolation — transactions automatically roll back, seed data is not committed
  • Practical constraints grounded in Oracle-to-PostgreSQL migration context: Oracle as source of truth, DB-agnostic assertions
  • Clear five-step workflow with checkboxes, making progress tracking straightforward
  • Good guidance on assertion best practices: concrete expected values from seed data, not just non-null checks
  • Addresses key edge cases: transaction management, seed data conflicts, existing database state preservation
  • Sensible conventions around avoiding TRUNCATE and respecting existing seed file patterns
  • Well-positioned prerequisites help agent understand project context before test creation begins
Model: claude-haiku-4-5-20251001Analyzed: Jun 26, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Add github/creating-oracle-to-postgres-migration-integration-tests to your library

Command Palette

Search for a command to run...