Creating an effective data migration testing strategy is critical to reducing risk and delivering a successful migration. This article offers thoughts and recommendations on how to create a more consistent data migration testing methodology using either a black box or a white box approach.
Author: Alexei Porodzinsky, A1QA, http://www.a1qa.com/
Data migration is a process that involves the migration of data from an existing database to a new one. Whenever an organization decides to upgrade or change its database, it will need to transport the existing data to the new database.
The scope of data migration is much more than what the term suggests. Data migration activity typically will include everything that is required with respect to data to ensure that the new database is up and running without any defects and it also contains all the legacy data (data that is present in the outdated database), and the data has been migrated to correct tables and columns.
So, the only way to insure its correctness is to test the migration process. The process of migration testing starts with the analysis of migration requirements, afterwards the approach is defined. The analysis bases upon such points as
- Type of data to be migrated
- Data sources
- Documentation analysis, describing the migration process
- Database alterations analysis
- Database structure and type
- Data storage format
- Analysis of migration method
- Migration approach
As long as the tester is ready with the analysis, it is time to choose between the types of migration approach. There are three type of approaches:
1. Black box testing
2. White box testing
3. Complex approach
The analysis results are not the only parameters for choosing the approach. You are to pay the attention to the task complexity, client and project manager preferences, employee awareness of database management system specifics and some others. Besides, the more difference between the database source, receiver and data storage formats, the more complex the task is.
Black box testing is the most frequently applied approach. It includes running functional tests of the migrated data. The tester checks the way the system processes data: data overview, alteration, search, report creation and some other business operations. The approach, in fact, doesn’t require additional knowledge from a tester.
The execution of functional tests in the black box testing approach allows defining the non-compliance with the system performance requirements before the complex process of load testing. It detects the errors of database simultaneous usage by several users and challenges in request processing.
Still, functional tests are not the leading preference in data migration testing. Performance and load tests are of great importance also. High quality of operations processing defines the new database efficiency and accuracy.
The white box testing approach is based upon logical check of the migration script. With the knowledge about the database source and receiver structure, the team of QA engineers test completeness and correctness of the script. To start white box migration testing the database should comply with the certain demands:
1. Detailed script description (it should prevent the issues of incorrect data migration or the incompleteness)
2. Structure of the source and the receiver
3. Data Migration Mapping (set of migration rules written in any suitable form)
When the testers finally jump-start the testing process, they get through the basic points:
- Check of the number of migrated registries
- The data are migrated to the appropriate place
- The data completeness
- Filling of the obligatory fields
- The proper source and receiver fields processing
- Accounting business logic changes
Along with these points of migration script check, testers apply the analysis of the SQL code. The approach covers in details the database structure, used data storage formats, migration requirements, analysis of substances, difference among them and their correct processing. The formats of fields and the migration script transformations are also of great importance.
The white box testing approach requires specified tester’s knowledge of legacy database as well as new database structure, unlike the black box approach.
Still, you rarely meet the applying purely the black box or the white box approach; often the complex approach is used. In the complex approach the QA engineers first check the logic of the migration script (white box approach), then they run functional tests (black box approach) on the application to check the migrated data.
About the Author
Alexei Porodzinsky is a Leading Expert of Software Quality Optimization Department at A1QA. Alexei has 2 bachelor degrees and a master`s degree, fluently speaks English and German. Having started his career with web-application testing and become IBM Certified Specialist (Cognos 8 BI), now he manages technical aspects of projects on the pre-sale stage. Being a high-level professional he offers expert analysis in various areas of software testing.