Source: TesterHome Community

Data migration is the process of moving data from a legacy database to a new one while ensuring business continuity between the old and new systems.
Before testing, you must understand how data will be restructured and linked between the two systems through migration strategies and plans.
The testing process must ensure correctness on two levels:
You may wonder: What exactly should you focus on during data migration testing? What risks might you encounter?
Data migration typically falls into two categories:
The latter often involves table structure changes, encoding differences, and syntax variations – all of which increase migration difficulty.
Table structure considerations:
Data volume impact:
The scale of migrated data affects outcomes. Large data volumes increase the difficulty of maintaining accuracy across database tables.
Typically, application services are halted before migration, and necessary data checks are performed to prevent new transactions or OS-level disruptions during the migration window.
If the migration involves schema changes (additions, deletions, or modifications), testers must verify:
Beyond validating the new system’s rule changes, you must ensure that migrated legacy data properly adapts to them.
Example scenario:
A field present only in the new system (but absent in the old system) must receive a correct default value.
The ultimate goal: Ensure business availability and continuity of the migrated legacy data, so there is no need for re-rollback testing after migration.
You must understand:
Key questions to answer:
|
Question |
Why It Matters |
|
Will batch processes or end-of-day services be halted during switchover? |
Prevents conflicts during migration |
|
What happens to legacy system equipment after cutover (retired or retained)? |
Impacts regression testing scope |
|
How will data reconciliation and ledger migration be carried out? |
Ensures financial data integrity |
|
What are the synchronization timing and scope (full vs. incremental)? |
Determines validation approach |
Real-world example – Commercial Drafts System:
After the migration plan is clear, define the scope to focus your test cases.
Determine whether migration involves:
Key focus areas:
A. Data types and states – different data types require different testing focuses:
|
Data Type |
Testing Focus |
|
Master data |
Data consistency between old and new systems |
|
Pure historical data |
Data consistency + query functionality on new system |
|
In-flight data |
Status at each step + ability to continue processing |
B. Migration rules – document and validate:
Design test cases based on these rules to ensure correct mapping post-migration.
C. Downstream files – verify:
Special attention: Encoding methods may change. Coordinate with upstream/downstream systems early to define solutions and prevent garbled characters.
Backup and rollback strategies must cover:
Be prepared to roll back promptly if migration fails or encounters critical issues.
Special circumstances example (Commercial Drafts System):
If missing or incorrect records are discovered in production, define manual maintenance procedures using newly added maintenance functions.
Data migration verification relies on both technical and business validation methods.
Scheduling approach:
Important considerations:
|
|
Validation Item |
Description |
|
1 |
Zero data loss |
Use pre- and post-migration SQL checks to verify no duplication or omission |
|
2 |
Database testing |
Verify table/field processing rules, field mapping, and migration rules |
|
3 |
Migration log inspection |
Check step-by-step processing logic and data record correctness |
|
4 |
Initial values |
Validate configuration and handling of serial numbers, business IDs, account IDs, etc. |
|
5 |
Exception handling |
Test abnormal data, abnormal transactions, and exception processing scenarios |
|
|
Validation Item |
Description |
|
1 |
Register and report accuracy |
Verify report functionality and data accuracy |
|
2 |
Functional availability |
Ensure all features work correctly |
|
3 |
Business continuity |
Validate end-to-end business processes |
Data pre-loading is a critical pre-test step. It determines whether you have sufficient and complete data for migration testing.
Process:
Timing consideration: Prioritize validating this data in early SIT phases. Some data (e.g., matured or settled bills) is time-sensitive and may become unusable for later business continuity testing.
Phase 1: Data volume validation
Phase 2: Data accuracy validation
|
Sub-item |
Validation Action |
|
Zero data loss |
Compare pre- and post-migration counts based on migration rules |
|
Database points |
Compare table structures, field processing rules, field mapping, and migration rules |
|
Permissions |
Validate organizational structure, user data volume, and job role permissions in common tables |
Phase 3: Register and report validation
Verify for all organizations (head office, branches, etc.):
Phase 4: Functional availability and business continuity validation
Functional availability – verify:
Query capability – verify:
Business continuity – verify:
Phase 5: Special circumstances and exception validation