Oracle to Postgres Migration Integration Tests

Oracle to Postgres Migration Integration Tests

Writes integration tests against Oracle for .NET data access code, capturing Oracle behaviour as the baseline that is later ported to PostgreSQL.

Skill files1 file
SKILL.md67 lines
1
---
2
name: creating-oracle-to-postgres-migration-integration-tests
3
description: 'Creates integration test cases targeting Oracle for .NET data access artifacts. Tests capture Oracle expected behavior as the authoritative baseline; they are written once and later ported to PostgreSQL by migrating the test project in Phase 6. Use only during Phase 3, before any PostgreSQL migration work has begun. Do not invoke during Phase 6 or against a project that has already been migrated.'
4
---
5
6
# Creating Integration Tests for Oracle-to-PostgreSQL Migration
7
8
Generates integration test cases for data access artifacts in a single target project. Tests target Oracle and capture its behavior as the authoritative baseline. They are written to be logically portable — so they can survive Phase 6 migration without rewriting — but they do not run against PostgreSQL at this stage.
9
10
## Prerequisites
11
12
- The test project must already exist and compile (scaffolded separately).
13
- Read the existing base test class and seed manager conventions before writing tests.
14
15
## Workflow
16
17
```
18
Test Creation:
19
- [ ] Step 1: Discover the test project conventions
20
- [ ] Step 2: Identify testable data access artifacts
21
- [ ] Step 3: Create seed data
22
- [ ] Step 4: Write test cases
23
- [ ] Step 5: Review determinism
24
```
25
26
**Step 1: Discover the test project conventions**
27
28
Read the base test class, seed manager, and project file to understand inheritance patterns, transaction management, and seed file conventions.
29
30
**Step 2: Identify testable data access artifacts**
31
32
Scope to the target project only. List data access methods that interact with the database — repositories, DAOs, stored procedure callers, query builders.
33
34
**Step 3: Create seed data**
35
36
- Follow seed file location and naming conventions from the existing project.
37
- Avoid `TRUNCATE TABLE` — keep existing database data intact.
38
- Assume existing business rows and lookup rows are already present; add only minimal, collision-safe seed records needed for the scenario.
39
- Do not commit seed data; tests run in transactions that roll back.
40
- Ensure seed data does not conflict with other tests.
41
- Load and verify seed data before assertions depend on it.
42
- Create or reuse a test `LookupConstants` class for stable lookup IDs/codes used across seed builders and assertions.
43
44
**Step 4: Write test cases**
45
46
- Inherit from the base test class to get automatic transaction create/rollback.
47
- Ensure each database-touching method in scope has at least one integration test (or multiple tests for higher-risk behavior branches).
48
- Assert logical outputs (rows, columns, counts, error types), not platform-specific messages.
49
- 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.
50
- Avoid testing code paths that do not exist or asserting behavior that cannot occur.
51
- Avoid redundant assertions across tests targeting the same method.
52
- For text parameters, include both empty-string and `NULL`/missing input coverage where applicable.
53
- For datetime behavior, include assertions that validate the value written and read back matches — use the Oracle column's precision (e.g., seconds-only for a date/time column with no fractional seconds) rather than assuming any particular database type syntax.
54
55
**Step 5: Review determinism**
56
57
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.
58
59
## Key Constraints
60
61
- **Phase 3 only** — these tests target Oracle. Do not invoke this skill during Phase 6 or against a PostgreSQL-targeting project.
62
- **Oracle is the golden source** — tests capture Oracle's expected behavior.
63
- **Assertion portability** — avoid platform-specific error messages or syntax in assertions so that when the test project is migrated to PostgreSQL in Phase 6, assertions require no changes.
64
- **Seed only against Oracle** — the test project will be migrated to PostgreSQL in Phase 6; seed data and infrastructure stay Oracle-targeted until then.
65
- **Scoped to one project** — do not create tests for artifacts outside the target project.
66
- **Preserve existing data** — never rewrite or wipe pre-existing business or lookup rows.
67

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,338 prompts

More by @OpenSourceBuffGuy

See all
Anime Red Gown Girl in Pop-Up Storybook prompt image

Anime Red Gown Girl in Pop-Up Storybook

Draws an anime-style girl in a red ball gown stepping out of an ornate layered paper pop-up fairy-tale book, with Japanese title signs and candlelit antique props.

image-prompt, anime, papercraft, illustration, fairy-tales, fantasy-world, 3d-render, picture-book, structured-output, text-rendering, guardrails, moody, bokeh, high-angle, square-format, gpt-image, character-design, storybook, dreamy, cozy, flowers, long-form

Gold filigree and paper relief fashion figure prompt image

Gold filigree and paper relief fashion figure

Fill-in template for a luxury 3D bas-relief fashion artwork, with material rules for gold filigree, glass, embroidery or papercraft and slots for pose, outfit and lighting.

image-prompt, template, placeholders, papercraft, embroidery, sculpture, luxury, fashion, fashion-shoot, editorial, 3d-render, square-format, text-rendering, illustration, for-artists, for-designers, nano-banana, long-form

Clumsy delivery boy animated comedy short prompt image

Clumsy delivery boy animated comedy short

Describes a Pixar-style 3D animated comedy short in which a clumsy delivery boy causes a chain of slapstick chaos and ends up a hero in a seaside city.

video-prompt, animation, pixar-style, comedy, humorous, short-film, storytelling, camera-movement, tracking-shot, scene-transitions, music-video, widescreen, family-friendly, cozy, vibrant-colors, cartoon, whimsical, cityscape, summer, for-filmmakers, long-form, encouraging, structured-output, 3d-render, text-rendering

Reviews

Loading reviews…

Discussion

Loading comments…