Data migration is the process of transferring data from one application to another, and can take place due to the following reasons:
- An application upgrade
- A new platform of the same domain is introduced
- Your organization wants to move from one application to another
Data migration can be considered high risk due to the data being sensitive or in large volumes. In data migration testing, QA teams verify that the migration from a legacy system to the new system occurs without any data loss, thus maintaining data integrity. It also ensures that the features of the application are still working post-migration and that no sensitive data was lost during the migration.
Prerequisites for Data Migration Testing
Before starting data migration verification can take place, the following activities need to be completed, which are considered pre-migration testing techniques:
- The QA team should define the scope of the migration, for example, the extraction process, the number of records migrated, tables, and relationships.
- On should have schema knowledge of the legacy system as well as the destination system.
- A document/data dictionary should have field attributes, database tables, extraction, and transformation logic details of both legacy database and target database (commonly known as ‘Mapping Document’).
- One should have access to the legacy database and target database & application.
- The QA team member should validate the mapping document in obedience to the client's requirements. It will help the QA team uncover issues in the data migration template at an early testing stage.
Data Migration Testing Approach
Below are the four primary approaches, also described as post-migration techniques, QA teams take when tasked with a data migration process.
- Row count and data comparison at the database level
- UI Verification of migrated data
- Execution of data validation scripts
- Validation testing at the application level
Data Migration Testing Techniques
Row Count and Data Comparison at the Database Level
This approach requires SQL knowledge as quality assurance team members need to prepare scripts based on the mapping document and requirements. The QA team has to create SQL queries in a way that covers every aspect of a table as well as defined scope. They then compare the number of records and data migrated corresponding to each attribute of the legacy database with the target database. The benefit of this technique is that the QA team can update the SQL scripts whenever they are required. Using this technique, one can verify the following elements of the migration:
- Check whether any data loss happens during migration.
- Check for data mismatch between legacy data and migrated data.
- Check for data redundancy in the target database.
Data comparison can also be done using Macros. In this method, the data from the source as well as target database is extracted into an excel spreadsheet and then compared. However, this approach is not favorable when dealing with a large quantity of data.
UI Verification of Migrated Data
This technique is important in data migration testing because it checks how the migrated data will display in an application to an end-user. All the migrated data should retain its value and format unless it is specifically mentioned not to do so. In this technique, the data from the legacy application/database is compared with the target application to see if the data is populated in desired fields. QA engineers should always take the dataset that has values in all the fields and verify a few records from all migrated database tables. UI testing allows test teams to:
- Simulate end-user interaction with the application and migrated data.
- Evaluates and test usability
- Increase test coverage
Automation scripts can also be used with test data from a legacy system and validated against target applications.
Execution of Data Validation Scripts
It is another self-scripted approach where the accuracy and quality of migrated data are checked. The following points will help you better understand this technique:
- Two different applications will have different schemas. At the UI level, it is not feasible to check whether all the data is migrated according to the requirement or target application or not. Hence, in data migration testing, create data validation SQL scripts that will verify if any migrated data exists in the destination system that is against the application’s base behavior or schema. For example, two users cannot have the same username. Hence, a SQL query can be written to validate this in the target database.
- Use this testing technique after comparing the data between the legacy database and target database. Hence, all discrepancies found while executing data validation scripts are not actual bugs but contain the data that needs cleanup and should be sent back to the client for their feedback.
- This technique also certifies that the data is complete where no null or blank values exist for required fields.
Validation Testing at Application Level
Validation testing decides whether the system functions as it was intended or not. An application with migrated data should work the same as it was working before data migration and should meet all specified business requirements. This technique verifies the stability of the application and ensures smooth running with migrated data. In this, a tester verifies an application’s core functionalities using migrated data and can check the following scenarios:
- Validate login to the application with migrated users.
- Validate application behavior with migrated users.
- Should be able to create new user accounts.
- Validate functionality with a combination of new and migrated data.
- Performance testing can also be included in this technique to verify the behavior of the application with a large volume of data.
Data is an evaluative component for any business. A small miss in the verification of migrated data could result in a risk of failure at production. To avoid such risks, the above data migration testing techniques can help a tester in discovering any discrepancies in the migrated data. It leads to quality testing and a better user experience.
Take Advantage of the Best Data Migration Testing Services With QASource
QASource is the most reliable source for Data Migration Testing Services. We assure our clients work with skilled, certified, and experienced test engineers. We provide an end-to-end, comprehensive validation and testing strategy covering all of the above-stated aspects of data migration testing, and can also customize the plan of action as per specifications and demands.