NashTech Blog

Data Migration Testing – Testing Phases, Levels and Techniques

Table of Contents

What is Data Migration Testing?

When an application undergoes changes like server migration, technology shift, or version update, it means significant alterations to its infrastructure. In such cases, the testing team must conduct thorough end-to-end testing to ensure a successful migration and address any issues arising from the changes. In this case, we need to conduct system testing with both old and new data. Verify existing functionality alongside new or modified features.

So what is Data migration Testing?

Data Migration Testing is the verification process ensuring a smooth transition from a legacy system to a new one, minimizing disruption and downtime. It focuses on maintaining data integrity, preventing data loss, and confirming that all specified functional and non-functional requirements of the application are met after migration.

What’s not the Data Migration?

The figure below illustrates what does not constitute Data Migration.

Data Migration Testing Phases

Testing is required both before and after migration. There are 3 phases as below.

    • Phase #1: Pre-Migration Testing

    • Phase #2: Data Cleansing
    • Phase #3: Post Migration Testing

1. Pre-Migration Testing: Before migrating data, testing activities are conducted as part of the Pre-Migration test phase. While this may be overlooked in simpler applications, it becomes imperative for complex application migrations.

    • Establish a clear data scope, outlining what data is to be included, excluded, and which data requires transformations or conversions.

    • Ensure a thorough understanding of both the destination and the loading process.

    • Conduct data mapping between the legacy and new applications by comparing the relevant data types in each. Create a higher-level mapping for each data type in the legacy application to its corresponding type in the new application.

    • Examine the data schema of the new application, including field names, types, minimum and maximum values, length, mandatory fields, and field-level validations.

    • Understand data cleansing requirement.

    • Take note of the records in each table and views in the legacy system.
    • Prepare/Execute test cases/test scenarios to verify business rules/mapping data.

2. Data Cleansing: Data cleaning involves rectifying or eliminating incorrect, corrupted, improperly formatted, duplicate, or incomplete data within a dataset. When integrating multiple data sources, there are numerous chances for data to be duplicated or misclassified. If the data is flawed, the results and algorithms become unreliable, despite appearing accurate.

Below is the list of test cases need to be verified for this phase.

3. Post Migration Testing: Once the application is successfully migrated, post-migration testing becomes essential. During this phase, end-to-end system testing takes place in the testing environment. We execute identified test cases, test scenarios, and use cases using both legacy data and a new set of data.

Please see the list of test cases for this phase:

 

  • Backward Compatibility Testing: System migration also requires us to verify Backward Compatibility, ensuring that the new system introduced is compatible with the old system (at least two previous versions) and functions seamlessly with those versions. 
  • Rollback Testing: In case of migration issues or failures, the system should swiftly revert to the legacy system without disrupting users or previous functionality. To verify this, test scenarios for migration failures should be designed and the rollback mechanism thoroughly tested. The time taken to revert to the legacy system should be recorded. Comprehensive testing, including automated regression testing, should follow to confirm the successful rollback and ensure no adverse impacts from the migration.

Data Migration Testing Levels

There are 2 Testing Levels:

  1. DATA – LEVEL VALIDATION: Verify that data has been migrated from a source database to a destination database without any discrepancies.
    It includes the following sub-levels:
    – Row count verification
    – Data accuracy verification
  2. APPLICATION – LELVEL VALIDATION: Ensure smooth running of the application with the migrated data.

Data Migration Testing Techniques

Manual or Automation Test?

To conduct Data Migration Testing effectively, we need to consider which phases or scenarios will be tested manually or using automation. Please refer to the table below for guidance.

Conclusion

Data Migration Testing presents unique benefits and challenges, as with any testing type. It’s crucial to recognize that even a small oversight in verification during testing can result in migration failure in production. Therefore, conducting a meticulous and comprehensive study and analysis of the system before and after migration is of paramount importance.

References

  • https://www.softwaretestinghelp.com/data-migration-testing/
  • https://www.youtube.com/watch?v=cmiJm-_GdVA

 

 

 

  •  

Picture of Thuy Pham

Thuy Pham

With 19 years of experience in software testing, I hold the position of a Senior Test Team Manager. Throughout my career, I have adeptly managed testing projects across diverse domains, consistently achieving successful outcomes. My expertise extends to ETL Testing and SAP Testing, where I have gained valuable hands-on experience.

Leave a Comment

Your email address will not be published. Required fields are marked *

Suggested Article

Scroll to Top