Test Data for a Core System Replacement: When to Start, by Unit, Integration and Migration Stage
· DataMint · 9 min read
At the kickoff meeting for integration testing in a core system replacement project (called a "next-generation" project in Korea), a familiar exchange takes place. "The test scenarios are reviewed and the programs are deployed. So when does data arrive in the integration test DB?" The answer is usually "when the migration program is ready" or "when the client's security team approves."
To answer the question in the title first: test data for a core system replacement has to be prepared right after kickoff, and the first data should exist by the time the TO-BE design is finished at the latest. The reason is simple. Unit tests, integration tests, performance tests and migration rehearsals all need different data, and some of it takes weeks to produce.
This post covers what test data each stage needs, what happens when preparation is late, a stage-by-stage preparation table, and how to generate test data. The later part describes how DataMint Core, the product we build, reduces this work.
Test data for a core system replacement differs by stage
The biggest difference between a core system replacement and a system enhancement project is that a new TO-BE schema is created. The table structure, code scheme and key design differ from the AS-IS. So "just copy the production DB" does not work from the start. There is no data yet to put into the new schema.
- Unit tests: tens to thousands of rows in the TO-BE tables are enough. But boundary values and exception codes must be evenly represented, and foreign keys and CHECK constraints must be satisfied or the screens will not load.
- Integration tests: the business flow has to run from start to finish. Customers, accounts, transactions and consultation history must match each other, and the same customer must appear with the same number in the interfacing systems. Defects only surface when the exception cases of real business are in the data.
- Performance tests: row counts and distribution must match production. A response time measured on 10,000 rows means nothing at 100 million rows.
- Migration rehearsals: the entire AS-IS is moved. The goal is to reconcile row counts and measure migration time, so a portion is not enough.
- User testing and training: business users must be able to look at the data and say "yes, this is our work." At the same time, real customer names must not appear on training room screens.
Each stage needs a different amount, shape and source of data, and it is hard to fill every stage with one method. In short, made-up data fits the earlier stages and transformed production data fits the later ones. The schedule needs to say who prepares each, and from when.
What happens in integration testing when test data is late
Projects that prepare late repeat the same patterns.
The migration program produces the integration test data
This is a common setup in core system replacements. The migration program that moves AS-IS data to the TO-BE becomes the supplier of integration test data. That means there is no integration test data until the migration program is complete. And if the migration program has defects, test defects and migration defects get mixed together, so finding the cause takes longer.
A production dump taken in a hurry stays in the development environment
Under schedule pressure, someone decides "let's use a production dump for now and delete it later." Development and test environments have more people with access than production and looser controls. For financial companies, Korea's Electronic Financial Supervision Regulations say not to use customer information in testing, and where it is unavoidable, to transform it before use and delete it when testing ends. The detailed conditions are in the exceptions and conditions in the regulation.
Hand-made data cannot keep up with the relationships
Creating 100 customers in a spreadsheet and loading them with INSERT statements takes a day. Matching the relationships through those customers' accounts, cards, transactions, limits and consultation history takes a week. In a replacement schema with hundreds of tables, it never ends.
You learn "how many hours it takes" only right before the migration rehearsal
If rehearsal day arrives without ever having moved the full data once, that is the day you first learn the migration time. If the cutover window is a two-day weekend and the rehearsal took thirty hours, the next rehearsal slips while you change the partitioning, parallelism and loading method. Moving even just a few of the large tables early avoids this.
Stage-by-stage test data preparation table: when, what, and from what
The table below is what the PMO, the client's DBA and the security officer should agree on in one go at kickoff. The timing shows the usual order. Move it earlier or later to fit the project schedule. Data preparation has to start one step ahead of each test stage, or the schedule slips.
| When | What to prepare | Data source | What to check |
|---|---|---|---|
| Kickoff to analysis | List of personal data columns, export and import procedure, where transformation happens, retention period | AS-IS catalog and samples | Who approves, and where the record is kept |
| TO-BE design complete | Data for unit tests | Data made up from the TO-BE schema | Are foreign keys, unique keys and CHECK constraints satisfied? |
| Mid-development | Data for integration tests | AS-IS production data, transformed and reduced | Are relationships intact? Is any personal data left? |
| After integration testing | Data for performance tests and migration rehearsals | The entire AS-IS, transformed | Do row counts and totals match? How many hours does it take? |
| User testing and training | Data business users recognize | Transformed data, reset for each round | Does it return to the initial state between rounds? |
The first row is the one most often missing. The list of personal data columns and the approval procedure are questions that come up again at every test stage, so deciding them once at kickoff speeds up everything after. How to build the column list is covered separately in how to find personal data columns.
When the TO-BE schema is empty: starting unit tests with generated test data
Unit test data does not need to look at production. It can be built from the structure of the new schema. If you build it yourself, order matters.
- Parents first: fill parent tables such as codes, branches and products first, and pick the children's foreign keys from values that actually exist in the parent.
- Read the constraints: if there is a CHECK constraint such as
STATUS IN ('A','B'), generate within those values. If the end date must be after the start date, keep that order. - No collisions in unique keys: filling them with random numbers produces duplicates at around a few hundred thousand rows, and the load fails.
- Formatted values in their format: resident registration numbers (RRN, Korea's national ID number), business registration numbers and card numbers must be correct down to the check digit to pass on-screen validation.
The limits of made-up data are also clear. Its distribution is spread evenly, so the odd data found only in production, such as an account that was closed and then reactivated, does not appear. That is why production data is needed from integration testing on.
AS-IS production data as integration test data: transformation and subsetting
Integration test data is closest to reality when only the personal data in AS-IS production data is changed and the rest is left as is. Two conditions have to hold.
First, the same original value must become the same value everywhere. If the RRN in the customer table and the RRN in the card table are changed to different values, joins break. In the messages exchanged with interfacing systems, the same customer must also have the same number. This problem is worked through with an example in when masking breaks your joins.
Second, if the integration test environment does not need all of production, the data must be reduced while keeping relationships. Cutting the first 10,000 rows from each table produces accounts without customers and transactions without accounts. You have to choose a driving table and reduce parents and children together along the foreign keys. Older AS-IS systems often do not declare foreign keys, so writing the relationships down comes first.
If the replacement moves to a different DB, there is one more thing. When the AS-IS is Oracle and the TO-BE is PostgreSQL, empty strings, dates and character lengths can change without any error. See also 7 things to watch when moving to a different DB.
Preparing replacement project test data with DataMint Core
DataMint Core is installed on the client's internal network. It turns the data in production databases into test data with no personal data and moves it to development and test DBs. The transformation finishes inside the production network, and only the changed values reach the test DB. It connects to the stage-by-stage preparation above as follows.
| When | Core feature | What changes |
|---|---|---|
| The TO-BE schema is empty and unit tests cannot start | Synthetic data: reads only the structure and creates rows that satisfy foreign keys, unique keys and CHECK constraints | Unit tests start right after design, with no production data leaving production |
| The AS-IS is Oracle and the TO-BE is a different DB | Cross-database migration and transformation in one step. Set the target schema and table names, and load into existing target tables under different column names | No separate dump, conversion script and load |
| The integration test environment does not need all of production | Subsetting: reduces parents and children together by a condition or ratio on the driving table. Relationships are registered for tables without foreign keys | No accounts without customers, no transactions without accounts |
| Data has to return to its initial state for every test round | Bookmarks: takes a copy inside the test DB and rolls back to that point | No re-migration from production, and no new approval |
| Runs that use production data have to be controlled | Approval: runs only after approval, and the request reason and approval comment are kept in the run record | Who took the data and why can be submitted as is at audit time |
Synthetic data does not read a single row of the production DB. RRNs and card numbers are made-up numbers with valid check digits, and emails use domains reserved for testing. Running the same job again produces the same data, so the expected values of unit tests can be fixed.
For integration test transformation, you attach a rule to each column on the job screen. The product first suggests rules based on column names and comments, and the person in charge reviews and corrects them. The same original value becomes the same value across tables and runs, so joins are kept. An RRN inside long text such as a consultation memo is also changed to the same value as in the column.

For subsetting, you set only the driving table and a condition (or ratio) in the table step of the job, and Core builds the condition for each connected table. It does not create temporary tables in the production DB. It only reads. When you select by ratio, the same rows are picked on every run, so you can test with the same customers across rounds. If the AS-IS has no declared foreign keys, Core finds relationship candidates by column name, shows how well they match on actual values, and a person then registers them. We built a ledger-style schema of 22 tables with no foreign keys at all on Oracle and PostgreSQL and tested it with four scenarios. Apart from the relationships the screen flagged separately, none of the 36 relationships were broken in the test DB.
Core also handles columns added to the AS-IS during the project. A column that appears in production after the job was created is not passed to the test DB until the person in charge reviews it, and Core reports it in the job list and by notification. Speed matters for large migrations such as a migration rehearsal. In our own measurement on development hardware, 100 million rows (19 GB) between PostgreSQL databases took 3 minutes 31 seconds, and 4 minutes 47 seconds with four transformation rules applied. The DB and the engine shared one PC in that test, so it has to be measured again in the client's environment.
With approval turned on, a run that uses production data only starts once it is approved. When a developer writes a reason and submits a request, it appears in the approver's approval list, and the approval comment is kept with the run record. In a project where staff change often, this record turns out to be the most useful thing later.

Core system replacement test data: frequently asked questions
Can't the migration program produce the integration test data?
In the end, it has to. But integration testing starts before the migration program is complete, so separate data is needed to fill the gap or the schedule slips. It also makes it easier to tell migration program defects from business program defects.
Can integration testing be done with synthetic data alone?
For functions that do not exist in the AS-IS, such as new business, yes. For existing business, it is difficult. Exception data that exists only in production is what exposes defects, and made-up data has no such cases.
When should the test data de-identification plan be written?
At kickoff. If the target columns, transformation method, approval procedure, retention and disposal are agreed at the kickoff report, the same discussion is not repeated at each stage. How to validate the migration rehearsal continues in row count reconciliation and validation in a migration rehearsal.
Summary: prepare core system replacement test data one step ahead
- Unit tests use data made up from the TO-BE structure. From integration testing on, use transformed production data.
- If integration test data depends only on the migration program, testing is late by as much as the migration program is late.
- In transformed data, the same original must have the same value, and when reducing, reduce along the relationships.
- Decide the list of personal data columns, the approval procedure and the retention period once, at kickoff.
At the next weekly meeting, open the schedule and write one line for each test stage: "when does the data come, and from where?" The stage with a blank is the one that will slip first. If your project modifies a system that is in operation, read on with preparing test data for a system enhancement project.
- #core system replacement
- #next-generation system project
- #integration test data
- #test data generation
- #migration rehearsal
- #synthetic data
- #test data de-identification