Database Migration
The following is a four part series of educational material to examine in depth the processes of Data Migration, Testing and Automation that are fundamental for any proper operation to take place.
Below is a short summary of the content that will be covered in the 4 part series, followed by part 1.
Reasons and benefits as to why organization will choose Database Migration,
- Application can have multiple databases at the backend to support huge customer data
- Data enhancement can be achieved
- Proper analysis of data will help in improving the data quality
- Data sampling & data cleansing helps in keeping the database clean and effective
- To carry out data analytics
Examples of Database Migration:
- Migration from one RDBMS to another RDBMS
- Migration from RDBMS to MongoDB
- Upgrading from Informix HC4 to HC6 or HC7
Testing:
- Ensuring that the legacy database is not updated during tests after migration.
- To ensure the mapping at field and table levels do not change.
- Ensuring data is migrated accurately and completely.
- Pre-migration and Post-migration testing activities.
Testing Migration in a same type database:
- Verify if the queries executed in the new database yield same results as in the older one.
- Verify if the number of records in the old database and new database is the same.
- Verify that there are no redundancies and new database works exactly as the older one.
- Verify if the schema, relationships, table structures are unaltered or set back to match the old database image.
- Verify whether the changes made in application updates new database with correct values and type.
- Verify if after the new database connection is provided to all the components of the application (Application, server, interfaces, firewall, network connectivity etc.).
- Verify the query performance (time-taken to execute complex queries) of the new database is not more than earlier performance.
Automated Testing
- Understanding the Cost Benefit analysis of Automated Data Migration Testing.
- Challenges of managing the data quantity required to be tested.
- Ensuring the quality of the output.
Conclusion
Considering the complexity involved in carrying out data Migration Testing, understanding that even missing a small aspect of of verification will lead to potential failure or damage to valuable data. It is very important to carry out careful and thorough examination and analysis of the system before and after migration. Plan and design the effective migration strategy with the robust tools along with skilled teams.
As we know that Migration has a huge impact on quality of the application, a good amount of effort must be put up by the entire team to verify the entire system in all aspects like functionality, performance, security, usability, availability, reliability, compatibility etc., which in turn will ensure successful ‘Migration Testing’.
Part 1, Overview of Data Migration Testing:
Data migration is the process of selecting, preparing, extracting, and transforming data and permanently transferring it from one computer storage system to another (Wikipedia, 2019). In many organizations data needs to be migrated for a variety of reasons, ranging from newer servers to better applications. But what does this actually mean? In this paper we will look thoroughly in to the process of data migration, and examine what is needed for a successful operation. Data Migration can be cut down to two major processes, the migration, and testing. From the testing point of view, it all means that the application has to be tested thoroughly end-to-end along with migration from the existing system to the new system successfully. Migration Testing is a verification process of migration of the legacy system to the new system with minimal disruption/downtime, with data integrity and no loss of data, while ensuring that all the specified functional and non-functional aspects of the application are met post-migration.
Data Migration Testing Strategy, is an important piece of the operation as it sets out proper parameters of how and when to evaluate the migration to ensure it is running smoothly throughout the entire operation. This is to minimize the errors and risks that occur as a result of migration and to perform the migration testing effectively.
Some Important Activities in Testing:
1) Specialized team formation:
Form the testing team with the members having the required knowledge & experience and provide training related to the system that is being migrated.
2) Business risk analysis, possible errors analysis:
Current & ongoing business operations should not be hampered after migration and hence it is important to carry out ‘Business Risk Analysis’ meetings involving the right stakeholders (Test Manager, Business Analyst, Architects, Product Owners, Business Owner etc.,) to identify the risks and the implementable mitigations. The testing should include scenarios to uncover those risks and verify if proper mitigations have been implemented.
Conduct ‘Possible Error Analysis’ using appropriate ‘Error Guessing Approaches’ and then design tests around these errors to unearth them during testing.
3) Migration scope analysis and identification:
Analyze the clear scope of the migration test as when and what needs to be tested.
4) Identify the appropriate Tool for Migration:
While defining the strategy of this testing, automated or manual, identify the tools that are going to be used. E.g: Automated tool to compare source and destination data.
5) Identify the appropriate Test Environment for Migration:
Identify separate environments for Pre and Post Migration environments to carry out any verification that is required as part of testing. Understand and document the technical aspects of the Legacy and New system of Migration, to ensure that the test environment is set up as per that.
6) Migration Test Specification Document and review:
Prepare Migration Test Specification document which clearly describes the test approach, areas of testing, testing methods (automated, manual), testing methodology (black box, white box testing technique), Number of cycles of testing, schedule of testing, approach of creating data and using live data (sensitive info needs to be masked), test environment specification, testers qualification etc., and run a review session with the stakeholders.
7) Production launch of the migrated system:
Analyze and document the to-do list for production migration and publish it well in advance.