top of page
Search
Sam

Software Testing Data Migration

Updated: Mar 25, 2023



Data Migration, Testing Migration Testing, is a verification process of migrating the legacy system to the new system with minimal disruption/downtime, with data integrity and no data loss, while ensuring that all the specified functional and non-functional aspects of the application are met post-migration.

Why Migration Test? As we know, the application migration to a new system could be for various reasons: system consolidation, obsolete technology, optimization, or other reasons.


Hence while the System in Use needs to be migrated to a new system, it is essential to ensure the following points:

  1. Any disruption/inconvenience caused to the user due to Migration must be avoided/minimized. E.g., downtime, loss of data

  2. Need to ensure that the user can continue to use all the features of the software by causing minimal or no damage during Migration. E.g., change in the functionality, removal of a particular functionality

  3. It is also essential to anticipate and rule out all the possible glitches/hindrances that occur during the actual Migration of the live system.

Hence to ensure a smooth migration of the live system by eliminating those defects, it is essential to carry out Migration Testing in the Lab. This Testing is necessary and plays a vital role when the data comes into the picture.


Technically, it is also required to be executed for the following purposes:

  • To ensure compatibility of the new/upgraded application with all possible hardware and software that the legacy application supports. Also, new compatibility should be tested for new hardware and software platforms.

  • To ensure all the existing functionalities work as in the legacy application. The application works the same as the legacy one.

  • The possibility of many defects due to Migration is very high. Many of the defects will usually be related to data; hence, these defects need to be identified & fixed during Testing.

  • To ensure whether the System response time of the new/upgraded application is the same or less than what it takes to the legacy application.

  • To ensure the connection between servers, hardware, software etc., is intact and does not break while Testing. Data flow between different components should not break under any condition.

When is This Testing Required? Testing has to be performed both before and after Migration.


The different phases of the Migration test to be carried out at the Test Lab can be classified below.

  1. Pre-Migration Testing

  2. Migration Testing

  3. Post Migration Testing

In addition to the above, the following tests are executed as part of the migration activity.

  1. Backward Compatibility Verification

  2. Rollback Testing

Before performing this Testing, any Tester needs to understand the following points clearly:

  1. The changes happening as a part of the new system (server, front end, DB, schema, data flow, functionality etc.)

  2. To understand the basic migration strategy laid out by the team. How the Migration happens, step-by-step changes happening in the system's backend and the scripts responsible for these changes.

Hence, it is essential to thoroughly study the old and the new system and then plan and design the test cases and scenarios to be covered as part of the above testing phases and prepare the testing strategy.

Data Migration Testing Strategy

Designing the test strategy for Migration includes a set of activities to be performed and a few aspects to be considered. This is to minimize the errors and risks that occur due to Migration and to complete the migration testing effectively.


Activities in this 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 business should be maintained after Migration and hence carry out 'Business Risk Analysis' meetings involving the right stakeholders (Test Manager, Business Analyst, Architects, Product Owners, Business Owner etc.,) identifying 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 precise scope of the migration test as to 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 will be used: E.g., Automated tool to compare source and destination data.


#5) Identify the appropriate Test Environment for Migration:

Identify different environments for Pre and Post Migration environments to carry out any verification required as part of Testing. Understand and document the technical aspects of the Legacy and New Migration system to ensure that the test environment is set up as per that.


#6) Migration Test Specification Document and review:

Prepare a 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, the 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:

Analyse and document the to-do list for production migration and publish it well in advance

Different Phases of Migration

Given below are the various phases of Migration.

Phase #1: Pre-Migration Testing

Before migrating the data, a set of testing activities are performed as a part of the Pre-Migration test phase. This is ignored or not considered in simpler applications. But when complex applications are to be migrated, the Pre-Migration activities are a must.


Below is the list of actions that are taken up during this phase:

  • Set a clear scope of the data – what data has to be included, what data has to be excluded, which data needs transformations/conversions etc.

  • Perform data mapping between the legacy and the new application – for each type of data in the legacy application, compare its relevant type in the new application and then map them – Higher level mapping.

  • If the new application has the field that is mandatory in it, but it is not the case in the legacy, then ensure that the legacy does not have that field as null. – Lower-level mapping.

  • Study the new application's data schema –field names, types, minimum and maximum values, length, mandatory fields, field level validations etc., clearly.

  • A number of tables in the legacy system are to be noted down, and if any tables are dropped and added, post-migration needs to be verified.

  • The Number of records in each table and views should be noted in the legacy application.

  • Study the interfaces in the new application and their connections. Data flowing in the interface should be highly secured and not broken.

  • Prepare test cases, test scenarios, and use cases for new conditions in the new applications.

  • Execute a set of test cases and scenarios with a set of users and keep the results and logs stored. The same needs to be verified after Migration to ensure that legacy data and functionality are intact.

  • The count of the data and records should be noted down. Clearly, it needs to be verified after Migration for no loss of data.

Phase #2: Migration Testing


''Migration Guide'', which is prepared by the Migration team, needs to be strictly followed to carry out the migration activity. Ideally, the migration activity begins with the data backup on the tape so that any time the legacy system can be restored.

Verifying the documentation part of the ''Migration Guide'' is also a part of data Migration Testing. Verify if the document is clear and easy to follow. All the scripts and steps must be documented correctly without any ambiguity. Any kind of documentation errors or miss matches in the order of execution of steps also needs to be considered important so that they can be reported and fixed.


Migration scripts, guides, and other information related to actual Migration need to be picked up from the version control repository for execution.

To note down the actual time taken for Migration from the point of start of Migration till successful restoration of the system is one of the test cases to be executed, and hence the ''Time taken to migrate the system'' needs to be recorded in the final test report which will be delivered as part of Migration test results and this information will be useful during the production launch. The downtime recorded in the test environment is extrapolated to calculate the approximate downtime in the live system.


It is on the legacy system where the Migration activity will be carried out. During this Testing, all the components of the environment will usually be brought down and removed from the network to carry out the Migration activities. Hence it is necessary to note the ''Downtime'' required for the Migration test. Ideally, it will be the same as that of the Migration time.


Generally, Migration activity defined in the ''Migration Guide' document includes:

  • Actual Migration of the application

  • Firewalls, ports, hosts, hardware, and software configurations are all modified as per the new system on which the legacy is being migrated.

  • Data leaks and security checks are performed.

  • Connectivity between all the components of the application is checked.

It is advisable for the testers to verify the above in the backend of the system or by conducting white box testing.

Once the Migration activity specified in the guide is completed, all the servers are brought up, and basic tests related to verification of successful Migration will be done, which ensures that all the end-to-end systems are appropriately connected and all the components are talking to each other, DB is up and running, the front end is communicating with the back end successfully. These tests need to be identified earlier and recorded in the Migration Test Specification document.


There are possibilities that the software supports multiple different platforms. In such case, Migration needs to be verified on each of these platforms separately.

Verification of Migration scripts will be a part of the Migration test. Sometimes individual migration script is also verified using ''White box testing'' in a standalone testing environment.


Hence Migration testing will be a combination of both ''white box and Black box testing''.

Once this migration-related verification is done and corresponding tests are passed, the team can proceed further with the activity of Post-Migration Testing.

Phase #3: Post-Migration Testing

Once the application is migrated successfully, Post-Migration testing comes into the picture.


Here end-to-end system testing is performed in the testing environment. Testers execute identified test cases, test scenarios, and use cases with legacy data as well as a new set of data.


In addition to these, there are specific items to be verified in the migrated environments, which are listed below:

All of these are documented as a test case and included in the ''Test Specification'' document.

  1. Check whether all the data in the legacy is migrated to the new application within the downtime that was planned. To ensure this, compare the number of records between the legacy and the new application for each table and view in the database. Also, report the time taken to move, say, 10000 records.

  2. Check whether all the schema changes (fields and tables added or removed) as per the new system are updated.

  3. Data migrated from the legacy to the new application should retain its value and format unless it is not specified to do so. To ensure this, compare data values between legacy and new application databases.

  4. Test the migrated data against the new application. Here cover a maximum number of possible cases. To ensure 100% coverage with respect to data migration verification, use the automated testing tool.

  5. Check for database security.

  6. Check for data integrity for all possible sample records.

  7. Check and ensure that the earlier supported functionality in the legacy system works as expected in the new system.

  8. Check the data flow within the application, which covers most of the components.

  9. The interface between the components should be extensively tested, as the data should not be modified, lost, or corrupted when it is going through components. Integration test cases can be used to verify this.

  10. Check for legacy data's redundancy. No legacy data should be duplicated during Migration.

  11. Check for data mismatch cases like data type changed, storing format changed etc.,

  12. All the field-level checks in the legacy application should be covered in the new application as well.

  13. Any data addition in the new application should not reflect back on the legacy.

  14. Updating legacy application's data through the new application should be supported. Once updated in the new application, it should not reflect back on the legacy.

  15. Deleting the legacy application's data in the new application should be supported. Once deleted in the new application, it should not delete data in the legacy as well.

  16. Verify that the changes made to the legacy system support the new functionality delivered as a part of the new system.

  17. Verify the users from the legacy system can continue to use both the old functionality and new functionality, especially the ones where the changes are involved. Execute the test cases and the test results stored during the Pre-migration testing.

  18. Create new users on the system and carry out tests to ensure that functionality from the legacy as well as the new application supports the newly created users and it works fine.

  19. Carry out functionality-related tests with a variety of data samples (different age groups, users from different regions etc.)

  20. It is also required to verify if ''Feature Flags'' are enabled for the new features, and switching it on/off enables the features to turn on and off.

  21. Performance testing is important to ensure that Migration to new system/software has not degraded the performance of the system.

  22. It is also required to carry out Load and stress tests to ensure the system stability.

  23. Verify that the software upgrade has not opened up any security vulnerabilities and hence carry out security testing, especially in the area where changes have been made to the system during Migration.

  24. Usability is another aspect which is to be verified, wherein if the GUI layout/front-end system has changed or any functionality has changed, what is the Ease of Use that the end user is feeling as compared to the legacy system?

Since the scope of Post-Migration Testing becomes huge, it is ideal to segregate the important tests that need to be done first to qualify that Migration is successful and then to carry out the remaining later.


It is also advisable to automate the end-to-end functional test cases and other possible test cases so that the testing time can be reduced and the results would be available quickly.


Here are a few tips for testers for writing the test cases for post-migration execution:

  • When the application is migrated, it does not mean that the test cases have to be written for the wholly new application. Test cases already designed for the legacy should still hold good for the new application. So, as far as possible, use the old test cases and convert the legacy test cases to new application cases wherever required.

  • If there is any feature change in the new application, then test cases related to the feature should be modified.

  • If there is any new feature added in the new application, then new test cases should be designed for that particular feature.

  • When there is any feature drop in the new application, related legacy application's test cases should not be considered for post-migration execution, and they should be marked as not valid and kept apart.

  • Test cases designed should always be reliable and consistent in terms of usage. Verification of Critical data should be covered in test cases so that it is not missed while executing.

  • When the design of the new application is different from that of the legacy (UI), then the UI-related test cases should be modified to adapt to the new design. The decision to either update or write new ones, in this case, can be taken by the tester based on the volume of change that happened.

Backward Compatibility Testing

Migration of the system also calls for the testers to verify the ''Backward Compatibility'', wherein the new system introduced is compatible with the old system (at least two previous versions) and ensures that it functions perfectly with those versions.


Backward compatibility is to ensure:

  1. Whether the new system supports the functionality supported in the earlier two versions along with the new one.

  2. The system can be migrated successfully from the earlier two versions without any hassles.

Hence it is essential to ensure the backward compatibility of the system by specifically carrying out the tests related to supporting backward compatibility. The tests related to backward compatibility need to be designed and included in the Test Specification document for execution.

Rollback Testing

In case of any issues while carrying out the Migration or if there is a migration failure at any point of time during Migration, then it should be possible for the system to roll back to the legacy system and resume its function quickly without impacting the users and the functionality supported earlier.


So, in order to verify this, Migration failure test scenarios need to be designed as part of negative Testing, and a rollback mechanism needs to be tested. The total time required to resume back to the legacy system also needs to be recorded and reported in the test results.


After the rollback, the main functionality and the regression testing (automated) should be run to ensure that Migration has not impacted anything and rollback is successful in bringing back the legacy system in place.


Migration Test Summary Report

The test summary report should be produced after completing the Testing and should cover the report on the summary of the various tests/scenarios carried out as part of various phases of Migration with the result status (pass/fail) and the test logs.


The time recorded for the following activities should be clearly reported:

  1. Total time for Migration

  2. Downtime of the applications

  3. Time spent to migrate 10000 records.

  4. Time spent for rollback.

In addition to the above information, any observations /recommendations can also be reported.


Challenges in Data Migration Testing


Challenges faced in this Testing are mainly with data. Below are a few on the list:

#1) Data Quality:

We may find that the data used in the legacy application is of poor quality in the new/upgraded application. In such cases, data quality has to be improved to meet business standards.

Factors like assumptions, data conversions after migrations, data entered in the legacy application itself are invalid, poor data analysis etc., leads to poor data quality. This results in high operational costs, increased data integration risks, and deviation from the purpose of business.


#2) Data Mismatch:

Data migrated from the legacy to the new/upgraded application may be found mismatched in the new one. This may be due to the change in data type, format of data storage, and the purpose for which the data is being used may be redefined.

This results in a huge effort to modify the necessary changes to either correct the mismatched data or accept it and tweak it to that purpose.


#3) Data Loss:

Data might be lost while migrating from the legacy to the new/upgraded application. This may be with mandatory fields or non-mandatory fields. If the data lost is for non-mandatory fields, then the record for it will still be valid and can be updated again.

But if the mandatory field's data is lost, then the record itself becomes void, and it cannot be retracted. This will result in huge data loss and should have to be retrieved either from the backup database or audit logs if captured correctly.


#4) Data Volume:

Huge Data that requires a lot of time to migrate within the downtime window of the migration activity. E.g., Scratch cards in the Telecom industry, and users on an Intelligent network platform etc., here the challenge is by the time, the legacy data is cleared, a huge amount of new data will be created, which needs to be migrated again. Automation is the solution for huge data migration.


#5) Simulation of a real-time environment (with the actual data):

Simulation of a real-time environment in the testing lab is another real challenge, where testers get into different kinds of issues with the real data and the real system, which is not faced during Testing.

So, data sampling, replication of the real environment, and identification of the volume of data involved in Migration are quite important while carrying out data Migration Testing.


#6) Simulation of the volume of data:

Teams need to study the data in the live system very carefully and should come up with a typical analysis and sampling of the data.

E.g., users with age group below ten years, 10-30 years etc., As far as possible, data from life needs to be obtained. Suppose no data creation needs to be done in the testing environment. Automated tools need to be used to create a large volume of data. Extrapolation, wherever applicable, can be used if the volume cannot be simulated.

Tips to Smoothen the Data Migration Risks


Below given are a few tips to be carried out in order to smoothen the data migration risks:

  • Standardize data used in the legacy system so that when migrated, standard data will be available in the new system.

  • Enhance the quality of the data so that when migrated, there is qualitative data to test, giving the feel of Testing as an end-user

  • Clean the data before migrating so that when migrated, duplicate data will not be present in the new system, and also, this keeps the entire system clean.

  • Recheck the constraints, stored procedures, and complex queries which yield accurate results so that when migrated, correct data is returned in the new system as well.

  • Identify the correct automation tool to perform data checks /record checks in the new system in comparison with the legacy.

Conclusion

Hence considering the complexity involved in carrying out data Migration Testing, keeping in mind that a small miss in any aspect of verification during Testing will lead to the risk of failure of Migration at the production, it is very important to carry out careful and thorough study & analysis of the system before and after Migration. Plan and design an effective migration strategy with robust tools along with skilled and trained testers.


As we know, Migration has a huge impact on the 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''.

0 views0 comments

Коментарі

Оцінка: 0 з 5 зірок.
Ще немає оцінок

Додайте оцінку
bottom of page