What Is Data Migration Testing And Its Techniques?


Data migration testing is the process of verifying that the data transferred from the current system or the legacy system to the new target system.

Data Migration is generally performed in any organizations either due to data consolidation, obsolete technology or optimisation of the system.

While performing migration of data from one system to another it is ensured that:

  1. The system should be down only for a limited interval of time, because it may cause inconvenience to a lot of its user and their work might get affected by it. 
  2. While performing the migration, the major concern is the loss of data which is not at all accepted.
  3. Along with that, the migration process should be secure enough to prevent any loss to the integrity of the data.
  4. Even, after the migration is completed, the new system should be fulfilling all the functional and non-functional requirements.

Need of Data Migration Testing

1. Data conversion testing is done to avoid any inconvenience to the user because of migration.

2. It should also be ensured that the user can access all the features of the application just like before migration.

3. It is necessary to see if the upgraded system is compatible to work with the hardware and solutions of the legacy system.

4. All the functionalities of the application should be working as in the earlier system.

5. Any defects in the new system should be detected and removed during the data migration test.

6. This testing also discovers ‘ if the migration has caused any degradation in the performance of the system?’ and measures are taken to improve it.

7. To ensure that there is a seamless flow of data within the system components like servers, clients and other hardware.

Data Migration Testing Techniques

1. Data Validation Test

  • First of all the completeness of the data is tested to see if some data is missing in its new location
  • It is validated that the appearance of the objects on the graphical user interface of the application in the legacy system and the upgraded system is the same. This process is generally performed manually by comparing the objects before and after migration.
  • Integration testing helps in validating that the interlinkings and the connections within the system are working perfectly.
  • Processing of the data is performed to ensure that the new system can process the migrated data.

2. Migration Run Test

It is performed to ensure that the migration process takes place smoothly and do not cause any issue in the system.

  • Full migration testing is performed by migrating the whole data set. It is a kind of practice before performing the actual migration.
  • Partial migration testing is performed on limited data to enact a shorter form of complete migration.

Phases in Data Migration Testing 

1. Pre-Migration Testing

At this stage, the scope of the data to be included in the migration testing is determined. It is decided that ‘which data should be considered in the testing?’ and ‘ which should be not?’.

It is also important to understand the destination and the load processes. The mapping of the data is performed.

It is determined that what will be the requirements for data cleansing. The records of the tables are kept for verification after migration.

This stage, also involves the creation of test cases, test scenarios and conditions to be executed on the target system after migration.

A set of test cases are executed and their results are recorded. It is also ensured that the business cases, user stories and use cases are also considered.

2. Data Cleansing

Data cleansing is performed on the system that stores and maintains the data. The errors in the system are determined. These errors may be blank fields, inappropriate data length.

The data can be checked either using SQL commands or by using data migration tools. The data dependencies in the system should also be determined as incorrect information in one table can affect the other linked tables.

All the issues detected should be fixed and the data count should be verified.

what is Data migration testing
Image Source: Rolustech – Medium

3. Post-Migration Testing

After the end of migration, it is tested that the data has successfully migrated to the target system within the predefined downtime. It also involves verifying that the schema of the data has been changed as per the new system.

The data types including the business and technical ones of the migrated data are tested and the flow of data within the system is verified. The target system should continue the functionalities present in the legacy system.

The existence of the redundancy of the legacy data should also be checked and removed. Other testings like performance testing, usability testing, security testing and rollback testing are performed on the target system.

Strategy for Data Migration Testing 

1. The testing team should include members that have specialized knowledge about the domain.

2. Before performing the migration, all the business risks should be determined and actions should be taken to mitigate them.

3. The errors that may occur during the migration should be analysed and the team should know ‘how to fix them?’.

4. The scope of the migration testing should be determined. It will help in determining what should be tested and when it should be tested?

5. The tools that can help in making the testing more efficient should be determined. For example, automated tools can be used to compare the legacy data and the target data.

6. The separate testing environment is also chosen for pre and post-migration testing for verification purpose.

Data migration testing process
Image Source: Peerbits

7. Proper documentation of the whole migration testing should be done including the test plan, test approach, schedule of the testing.

8. Before the launch of the new system discussion should be done with the stakeholders to see if all the testing requirements have been covered.

Conclusion

Organisations with a large amount of data, generally have to migrate data from one place to another and hence need migration testing.

Data migration testing has its significance in ensuring that any up-gradation in the system or changing the location of the data do not raise any undesirable issues and if they occur, can be resolved as soon as possible.