Data migration method and device of test platform, storage medium and electronic equipment

By using automated comparison and correction mechanisms, data differences between test platforms are identified and corrected, resolving data inconsistency issues during test platform integration, improving the accuracy and efficiency of data migration, and ensuring the consistency of test results and the smooth progress of platform integration.

CN121009072APending Publication Date: 2025-11-25HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510729125.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

During the integration and data migration of automated testing platforms, differences in data format, encoding, and semantics can lead to inaccurate data after migration, affecting the accuracy of data migration for the testing platform.

Method used

By comparing the operation instructions and test results of the first and second test platforms after executing the same test request, the differences in instructions and results caused by differences in data format, encoding or platform characteristics are identified and corrected. An automated comparison and correction mechanism is adopted to ensure the consistency of test data after migration.

Benefits of technology

It improves the accuracy and efficiency of data migration on the testing platform, ensures the integrity and consistency of test results on the new platform, reduces the time and manpower costs of manual adjustments, and promotes the standardization and unification of cross-platform test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009072A_ABST
    Figure CN121009072A_ABST
Patent Text Reader

Abstract

The invention discloses a data migration method and device of a test platform, a storage medium and electronic equipment. The method comprises the following steps: migrating first test data corresponding to a first test platform to a second test platform; obtaining a first test result obtained by responding to the at least one test request and executing the first operation instruction on the first test platform, and obtaining a second test result obtained by responding to the at least one test request and executing the second operation instruction on the second test platform; and correcting the second operation instruction in the second test data according to instruction difference information between the first operation instruction and the second operation instruction and result difference information between the first test result and the second test result. The technical problem that the accuracy of data migration of the test platform is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computers, in particular to a data migration method and device of a test platform, a storage medium and an electronic device. BACKGROUND

[0002] In the scene of automatic test platform integration and data migration, the test data migrated from the old platform to the new platform often cannot be accurate due to data format, coding, semantic difference, and thus the accuracy of the data migration of the test platform is low.

[0003] Therefore, there is a technical problem of low accuracy of the data migration of the test platform in the related art. SUMMARY

[0004] Embodiments of the present application provide a data migration method and device of a test platform, a storage medium and an electronic device to at least solve the technical problem of low accuracy of the data migration of the test platform in the related art.

[0005] According to an aspect of embodiments of the present application, a data migration method of a test platform is provided, comprising: migrating first test data corresponding to a first test platform to a second test platform, wherein the second test platform corresponds to second test data; obtaining a first test result of the first test platform responding to at least one test request and executing a first operation instruction, and obtaining a second test result of the second test platform responding to at least one test request and executing a second operation instruction, wherein the first test data comprises the first operation instruction, and the second test data comprises the second operation instruction; and correcting the second operation instruction in the second test data according to instruction difference information between the first operation instruction and the second operation instruction, and result difference information between the first test result and the second test result.

[0006] According to another aspect of the embodiments of the present application, a data migration apparatus of a test platform is further provided, comprising: a migration unit configured to migrate first test data corresponding to a first test platform to a second test platform, wherein the second test platform corresponds to second test data; an acquisition unit configured to acquire a first test result obtained by the first test platform in response to at least one test request and executing a first operation instruction, and acquire a second test result obtained by the second test platform in response to at least one test request and executing a second operation instruction, wherein the first test data comprises the first operation instruction, and the second test data comprises the second operation instruction; and a correction unit configured to correct the second operation instruction in the second test data according to instruction difference information between the first operation instruction and the second operation instruction, and result difference information between the first test result and the second test result. According to yet another aspect of the embodiments of the present application, a computer program product is provided, which comprises computer programs / instructions stored in a computer readable storage medium. A processor of a computer device reads the computer programs / instructions from the computer readable storage medium, and the processor executes the computer programs / instructions, so that the computer device executes the data migration method of the test platform as described above.

[0007] According to yet another aspect of the embodiments of the present application, an electronic device is further provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the data migration method of the test platform as described above through the computer program.

[0008] In the embodiments, by comparing the operation instructions and the test results of the first test platform and the second test platform after executing the same test request, the instruction and result difference caused by the data format, encoding or platform characteristic difference can be automatically identified and corrected, the consistency of the test result of the second test platform with the first test platform is verified, the potential test result deviation is found and corrected in time, and thus the test data after migration can completely and accurately reflect the test behavior of the first test platform, and the technical effect of improving the accuracy of the data migration of the test platform is achieved.

[0009] It should be noted that, through the analysis of the instruction difference information, the second operation instruction can be intelligently adjusted according to the instruction difference information and the result difference information, so as to adapt to the execution environment of the second test platform after the data migration, and the problem of instruction incompatibility or low execution efficiency caused by the data migration is avoided, thereby not only the accuracy of the data migration is enhanced, but also the efficiency of the data migration is improved through the automatic instruction adaptation and optimization. BRIEF DESCRIPTION OF DRAWINGS

[0010] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0011] Figure 1 is a schematic diagram of a flow of a data migration method of an optional test platform according to an embodiment of the application;

[0012] Figure 2 is an application schematic diagram of a data migration device of an optional test platform based data migration method according to an embodiment of the application;

[0013] Figure 3 is a flow schematic diagram of an optional data migration according to an embodiment of the application;

[0014] Figure 4 is a flow schematic diagram of an optional data migration according to an embodiment of the application;

[0015] Figure 5 is a flow schematic diagram of an optional data migration according to an embodiment of the application;

[0016] Figure 6 is a schematic diagram of a data migration device of an optional test platform according to an embodiment of the application;

[0017] Figure 7 is a structural schematic diagram of an optional electronic device according to an embodiment of the application. DETAILED DESCRIPTION

[0018] In order to make the personnel in the art better understand the application scheme, the technical scheme in the application embodiments will be clearly and completely described below in combination with the drawings in the application embodiments. Obviously, the described embodiments are only a part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative labor should belong to the protection scope of the application.

[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0020] Alternatively, as an alternative implementation method, such as Figure 1 As shown, the data migration method of the test platform includes the following specific steps:

[0021] S102, migrate the first test data corresponding to the first test platform to the second test platform, wherein the second test platform corresponds to the second test data;

[0022] S104, obtain the first test result obtained by the first test platform responding to at least one test request and executing the first operation instruction, and obtain the second test result obtained by the second test platform responding to at least one test request and executing the second operation instruction, wherein the first test data includes the first operation instruction, and the second test data includes the second operation instruction;

[0023] S106, based on the instruction difference information between the first and second operation instructions and the result difference information between the first and second test results, the second operation instruction is corrected in the second test data. Optionally, in this embodiment, the first test platform and the second test platform refer to the original automated testing environment and the newly introduced or updated automated testing environment, respectively. These two platforms may be based on different testing frameworks, execution logics, and data formats. The first test data and the second test data respectively cover key information such as test cases, operation instructions, and expected results used on the first test platform and the second test platform.

[0024] Optionally, in this embodiment, the operation instruction refers to the command issued by the test script to the test platform during test execution, used to simulate user interaction behavior or test specific functions. For example, an operation instruction might be "send a GET request to a certain URL" or "enter text in a specified field". The test result refers to the result information returned by the test platform after the operation instruction is executed, including but not limited to test status (pass, fail), exception information, performance indicators, etc.

[0025] Optionally, in this embodiment, test data (i.e., first test data) on the first test platform is migrated to the second test platform so that the second test platform can inherit the testing capabilities of the first test platform. For example, suppose there are several automated UI test cases on the first test platform, which include operation instructions (such as clicking a button or filling in a form) and their expected results. During the data migration phase, these test cases, along with the operation instructions, will be copied or converted to the second test platform, enabling the second test platform to perform the same tests.

[0026] After the data migration is complete, the same test requests need to be performed on both platforms to collect test results before and after execution. This means that under the same set of test cases, a series of operation instructions are first executed on the first test platform, and the first test result is recorded; then the same operation instructions are executed on the second test platform, and the second test result is captured. For example, the user login process can be simulated on both platforms, and the information on whether the login was successful or not can be recorded as a basis for comparison.

[0027] Next, the differences between the operation commands and test results on the first and second test platforms are identified by comparing them. This process can be broken down into two stages: command comparison and result comparison. Command comparison aims to discover differences in the format, parameters, or function calls of operation commands, while result comparison focuses on checking whether the actual output after test execution matches the expected output, thereby assessing the accuracy and completeness of data migration.

[0028] For example, instruction comparison might reveal that the first test platform used the `sendKeys()` function to send data to the input field, while the second test platform used the `inputText()` function to achieve the same functionality. Result comparison might show that after performing a user login test, the first test platform reported successful login, while the second test platform reported failure, indicating a problem during data migration that requires further analysis and correction.

[0029] Based on the collected instruction and result difference information, the second test data on the second test platform is corrected to ensure that it is functionally identical to the test data on the first test platform. This typically means performing necessary function mapping, parameter adjustments, or logic rewriting on the second test platform to accurately execute the same test tasks.

[0030] For example, if the instruction difference information indicates that the inputText() function on the second test platform is not working properly in certain situations, the function needs to be adjusted, or an equivalent alternative function needs to be found to ensure that test execution on the second test platform is not affected. Similarly, if the result difference information reveals that some test cases on the second test platform failed, the corresponding operation instructions need to be checked and fixed, or the test environment settings need to be adjusted until the test results on the second test platform are consistent with those on the first test platform.

[0031] Understandably, this embodiment proposes a comprehensive test platform data migration method to overcome the challenges posed by data inconsistencies between different test platforms, ensuring that the accuracy and execution efficiency of test cases are not affected during platform integration or upgrades. Through data migration, obtaining test results, comparing instructions with results, and correcting based on discrepancies, this embodiment constructs a closed-loop migration verification and correction mechanism that can automatically identify and resolve potential problems introduced by platform differences.

[0032] Data migration is the foundation of the entire process, ensuring the availability of testing functionality on the new platform. Obtaining test results is essential for executing the same test cases on both platforms, providing a direct data source for subsequent difference comparisons. The instruction and result comparison phase, through meticulous comparative analysis, identified potential problems in the data migration, providing clear direction for subsequent corrections. Finally, corrections based on the difference information were made by automatically correcting the data and instructions on the second test platform, eliminating discrepancies and ensuring the correct execution of test cases on the new platform.

[0033] The embodiments provided in this application effectively overcome common data inconsistencies and functional distortions encountered during test platform integration. Automated comparison and correction not only save time and manpower costs associated with manual adjustments but also improve the success rate of data migration, laying a solid technical foundation for the smooth upgrade and integration of the test platform. Furthermore, it promotes the standardization and generalization of cross-platform test cases, contributing to the construction of a more unified and efficient testing system.

[0034] As an optional approach, before modifying the second operation instruction in the second test data, the method further includes:

[0035] The first instruction data corresponding to the first operation instruction and the second instruction data corresponding to the second operation instruction are compared to obtain the code difference information between the first operation instruction and the second operation instruction.

[0036] A second instruction comparison is performed on the first dependency relationship corresponding to the first operation instruction and the second dependency relationship corresponding to the second operation instruction to obtain the dependency difference information between the first operation instruction and the second operation instruction. The instruction difference information includes code difference information and dependency difference information.

[0037] Optionally, in this embodiment, the first instruction data and the second instruction data refer to the specific code details contained in the first and second operation instructions, such as function calls, operation parameters, and execution logic. This data is the core of the test script execution and directly determines the test behavior and results.

[0038] Optionally, in this embodiment, the first dependency and the second dependency refer to other functions, modules, or external systems that the test operation instructions depend on during execution. For example, an operation instruction may depend on the result of another operation instruction, or on a specific environment configuration.

[0039] Optionally, in this embodiment, the specific code content of the operation instructions is compared to check for differences in the instructions across different testing platforms. For example, the first testing platform might use the `findElement()` method to locate page elements, while the second testing platform might use the `getElement()` method. By identifying these differences, necessary conversions or adjustments can be made to the test instructions on the second testing platform to adapt to the execution environment of the new platform.

[0040] Optionally, the first instruction comparison may include, but is not limited to, the following steps: extracting the code details of the first operation instruction from the first test data, and extracting the code details of the second operation instruction from the second test data. Comparing the function names, parameter types and quantities, execution logic, etc., of the two to identify syntactic and semantic differences. Based on the comparison results, performing syntactic adjustments or semantic mapping for the operation instructions on the second test platform to ensure correct execution in the new environment.

[0041] For example, suppose the test cases on the first test platform contain the instruction `findElement(By.id("loginButton")).click()`. On the second test platform, a comparison with the first instruction reveals that the `findElement()` method has been changed to `getElementById()`, and the `click()` method also needs to be adjusted to `simulateClick()`. This ensures that the instruction on the first test platform is converted to `getElementById("loginButton").simulateClick()`, guaranteeing consistent operation on the second test platform.

[0042] Optionally, in this embodiment, attention is paid to the dependencies of operation instructions, and it is checked whether the other functions, modules or external systems that the instructions depend on are consistent across different platforms. For example, a test case may require calling an environment initialization function before execution, or depend on a specific cleanup function after the operation.

[0043] Optionally, the second instruction comparison may include, but is not limited to, the following steps: constructing a dependency graph for the operation instructions of the first and second test platforms, showing the logical links between instructions; comparing the two dependency graphs to identify whether there are missing or conflicting dependencies in the operation instructions on the first and second test platforms; and, based on the differences, adding missing dependency functions or adjusting the dependency order for the second test platform to ensure the integrity of the test environment and operation logic.

[0044] To illustrate further, suppose the login test cases on the first test platform depend on the execution of the `setUp()` initialization method, but this dependency is not included in the migration data of the second test platform. A comparison of the second set of instructions will reveal this missing dependency. Then, a call to the `setUp()` method can be added to the test data of the second test platform, or the execution order of the operation instructions can be adjusted to ensure consistency in dependencies.

[0045] The embodiments provided in this application ensure the accuracy of data migration and the portability of test cases through more detailed and comprehensive instruction comparison. By comparing the first and second instructions, not only the direct syntax and semantics of the operation instructions are considered, but also the logical dependencies between instructions, which is particularly crucial in complex or highly coupled test scenarios. This not only helps eliminate instruction incompatibility caused by platform differences but also ensures the correct execution order and dependencies of test cases in the new environment, thereby greatly improving the success rate of test data migration and the reliability of test results.

[0046] As an optional approach, based on the instruction difference information and result difference information, the second operation instruction is modified in the second test data, including:

[0047] If the result difference information includes first result difference sub-information that meets the first expected difference condition, the second dependency relationship is modified according to the first dependency relationship, wherein the first expected difference condition is used to indicate that the first result difference sub-information is generated based on the dependency difference information, and the instruction difference information includes the dependency difference information.

[0048] Optionally, in this embodiment, a dependency-based correction strategy is proposed for the discrepancies in the test results, particularly specific discrepancies that meet the expected discrepancy conditions. The purpose of this strategy is to resolve inconsistencies in test results by adjusting dependencies, rather than directly modifying operation instructions. This provides an efficient and accurate method for problem localization and correction while maintaining the core logic of the test cases.

[0049] When the first result difference sub-information discovered through result comparison meets the first expected difference condition, this usually means that the difference is caused by the dependency relationship of the operation instructions rather than a syntactic or semantic problem with the instructions themselves. In this case, based on the dependency difference information contained in the instruction difference information, the dependencies on the second test platform are modified accordingly.

[0050] First, confirm whether the first result difference sub-information meets the preset first expected difference condition, and determine whether the difference is caused by dependencies. Analyze the first and second dependencies to identify differences, such as differences in dependent function versions, parameter settings, or execution order. In the second test platform, adjust according to the first dependency and correct the differences in the second dependency to ensure that the environment configuration and function execution meet expectations.

[0051] For example, suppose during the integration of test platforms, it is discovered that in user login test cases, the average response time of the first test platform is 2 seconds, while the average response time of the second test platform suddenly increases to 10 seconds. Further analysis of the instruction difference information reveals that the first test platform calls the `initializeDatabaseConnection()` method to warm up the database connection before the login test, while the second test platform fails to call this method before the same test. This is because this dependency was ignored during migration, constituting part of the dependency difference information. In this case, the second dependency can be corrected by adding or adjusting the calls to the `initializeDatabaseConnection()` method in the test data of the second test platform, thereby expecting the response time of the second test platform to approach the performance of the first test platform.

[0052] The implementation of the embodiments provided in this application, based on the dependency-based correction strategy, not only avoids blindly modifying the core test logic, but also achieves consistency of test results and expected performance through minimal adjustments, ensuring the correct execution of test data on the new platform and optimizing the test environment.

[0053] As an optional approach, based on the instruction difference information and result difference information, the second operation instruction is modified in the second test data, including:

[0054] If the result difference information includes second result difference sub-information that meets the second expected difference condition, a third operation instruction corresponding to the first operation instruction is created in the second test data according to the first operation instruction. The third operation instruction is used to replace the second operation instruction for execution when the second test platform responds to at least one test request. The second expected difference condition is used to indicate that the second result difference sub-information is generated based on the code difference information. The instruction difference information includes the code difference information.

[0055] Optionally, in this embodiment, by constructing a third operation instruction, the test script of the second test platform is effectively adjusted. Compared with directly modifying or deleting the second operation instruction, the method of creating a third operation instruction is more flexible and controllable, and can achieve a smooth transition and compatibility of functions without destroying the original architecture of the second test platform.

[0056] When the test results of the second test platform differ from those of the first test platform, and this difference is confirmed to meet the second expected difference condition, it is considered to be caused by code difference information. The process then proceeds to the third stage of creating and replacing operation instructions.

[0057] First, based on the second expected difference condition, confirm whether the second result difference sub-information conforms to the expected scope of code difference impact. Examine the code details of the first operation instruction, especially the parts related to the second result difference sub-information, to understand its functional implementation and execution logic. Clarify the code difference information between the first and second operation instructions, which may include differences in function call methods, parameter handling, error handling, etc. Based on the functional implementation of the first operation instruction and the characteristics of the second test platform, create a third operation instruction to ensure its correct execution on the second test platform, achieving the same or equivalent test functionality as the first test platform. In the second test data, replace the original second operation instruction with the third operation instruction to eliminate the test result differences caused by code difference information during test execution on the second test platform.

[0058] For example, suppose during test data migration, a test case on the first test platform uses the `uploadFile(filePath)` method to perform the "file upload" function, while on the second test platform, the corresponding operation uses the `transferFile(path, fileName)` method. These two methods differ significantly in syntax and calling convention, leading to a second difference in the execution result—the test case failed to upload the file successfully on the second test platform.

[0059] Based on the analysis of the second anticipated difference condition, similar differences caused by different function calling methods can be foreseen. Therefore, a third operation instruction equivalent to the uploadFile(filePath) function is created. Code review revealed that the transferFile() method requires an additional filename parameter in the second test platform. Therefore, the third operation instruction can be defined as transferFile(filePath, extractFileName(filePath)), where extractFileName() is a newly added small function used to extract the filename from the file path. In this way, when executed on the second test platform, the third operation instruction replaces the original second operation instruction, eliminating the test result differences caused by code discrepancies.

[0060] The embodiments provided in this application, through a strategy of creating and replacing third operation instructions, aim to solve the problem of inconsistent test results caused by code differences, and are particularly suitable for scenarios where there are significant differences in the functional implementation methods between test platforms. This strategy not only ensures that the test scripts on the second test platform accurately reflect the functional execution of the first test platform, but also protects the original code structure and execution efficiency of the second test platform by minimizing code modifications, avoiding unnecessary refactoring risks.

[0061] As an optional approach, after migrating the first test data corresponding to the first test platform to the second test platform, the method further includes:

[0062] Get the newly added test data from the first test data corresponding to the first test platform. The newly added test data is the test result obtained by the first test platform in response to the new test request and by executing the operation instructions corresponding to the new test request.

[0063] Migrate the new test data to the second test data;

[0064] Based on the test results corresponding to the new test request on the first and second test platforms, the fourth operation instruction is modified in the second test data. The fourth operation instruction is the operation instruction executed on the second test platform in response to the new test request.

[0065] Optionally, in this embodiment, after data migration, the first testing platform may continue to generate new test data due to business needs, feature updates, or supplementary testing. This data includes new test requests and their corresponding test results.

[0066] Optionally, in this embodiment, after the initial migration of the first test data to the second test platform is completed, any new test data generated by the first test platform will be continuously monitored and analyzed, including new test cases, operation instructions and their execution results.

[0067] Through regular or real-time monitoring mechanisms, new test data generated in the primary testing platform is captured. This data may, but is not limited to, originate from testing new features, in-depth testing of existing features, or expansion of test coverage.

[0068] Extract key information from the newly added test data, including new test requests, corresponding operation instructions, and test results, to prepare for subsequent data migration.

[0069] The extracted new test data will be completely migrated to the second test platform to expand its test dataset, ensuring comprehensive and timely test coverage.

[0070] After the migration, the second testing platform will execute the corresponding operation instructions from the newly added test data, i.e., the fourth operation instruction, and compare them with the test results of the first testing platform to verify the consistency of the function implementation. If discrepancies are found, a correction scheme will be implemented based on the fourth operation instruction of the newly added test request.

[0071] Compare the test results of the newly added test data on the two platforms to identify any discrepancies. If discrepancies are found, it indicates that the fourth operation instruction may need to be modified. The modification method may include, but is not limited to, the data migration method described above for the test platforms.

[0072] Through the embodiments provided in this application, a flexible, efficient and adaptive test platform integration framework is built through continuous monitoring, data migration and instruction adjustment, which effectively promotes the real-time sharing of cross-platform test data and functional synchronization.

[0073] As an optional approach, before migrating the first test data corresponding to the first test platform to the second test platform, the method further includes:

[0074] A first storage area and a second storage area are created on the second test platform. The first storage area is used to store operation instruction data of function type, and the second storage area is used to store operation instruction data of business type and the corresponding dependency relationship of operation instruction.

[0075] Migrate the first test data corresponding to the first test platform to the second test platform, including:

[0076] The test data of function types in the first test data is migrated to the first storage area, and the test data of business types in the first test data is migrated to the second storage area.

[0077] Optionally, in this embodiment, the first storage area (function layer) and the second storage area (logic layer) are two logical storage areas created within the second test platform, used to classify and store different types of operation instructions and their related data. This type-separated storage strategy helps improve data organization efficiency and retrieval speed, while also facilitating subsequent data processing and isolation between instruction types.

[0078] Optionally, in this embodiment, the operation instruction data of the function type refers to those operation instructions that are related to specific technical implementations, underlying logic, or API calls. They are usually not directly involved in business logic, but rather serve as basic components for building complex business operations.

[0079] Optionally, in this embodiment, the operation instruction data of the business type is relative to the operation instruction data of the function type. The operation instruction data of the business type is directly related to a specific business process or function, such as user login, order creation, data query, etc. These instructions typically include the processing of business logic and the dependency on specific business data.

[0080] Optionally, in this embodiment, before starting the data migration, it is necessary to first create a first storage area and a second storage area inside the second test platform. These two areas will be used to store different types of operation instruction data and their dependency information, respectively.

[0081] Optionally, in this embodiment, the data format, storage policy, and access permissions of the first and second storage areas are defined to ensure that they can efficiently store and manage different types of operation instruction data. The first and second storage areas, conforming to the design requirements, are created in the database or file system of the second test platform.

[0082] Next, according to the type of operation instruction, the test data from the first test platform will be migrated to the corresponding storage area of ​​the second test platform in steps. Function-type operation instruction data in the first test data will be identified and migrated to the first storage area of ​​the second test platform. This process requires storing not only the instructions themselves but also potential dependency information, such as function parameters and call order. Similarly, business-type operation instruction data and their dependencies will be migrated to the second storage area of ​​the second test platform. The migration of business-type data requires greater emphasis on the integrity of the business logic and the consistency of data processing.

[0083] For example, suppose the test data of the first test platform contains a large number of automated test scripts, including function-type operation instructions such as findElementByCSS() and waitForElementVisible(), as well as business-type operation instructions such as loginUser(username,password) and createOrder(productId).

[0084] In the second test platform, a first storage area and a second storage area were first created. During the data migration process, all function-type operation instruction data, such as findElementByCSS() and its dependent CSS selectors, were migrated to the first storage area; while business-type operation instruction data, such as loginUser() and its dependency information on the user database, were migrated to the second storage area.

[0085] For example, low-level function directives like `findElementByCSS()`, along with their CSS selectors, wait times, and other parameters, are categorized and stored in the first storage area, facilitating direct calls and execution by the underlying architecture of the second testing platform. Meanwhile, the business directive `loginUser()`, which involves user authentication logic, including its calls to the user database interface and its dependencies such as encryption algorithms, is stored in the second storage area, ensuring the continuity of the business process and the accuracy of the test scenarios.

[0086] The embodiments provided in this application optimize the data processing flow by reasonably classifying and storing operation instruction data, reducing the time consumption for data retrieval and parsing. Furthermore, by separating operation instructions of function type and business type, interference between different test stages and scenarios is reduced, and the readability and maintainability of test data are improved.

[0087] As an alternative, the data migration method described above for the testing platform can be applied to scenarios involving the continuous migration of strongly dependent data through reverse analysis. In this scenario, there may be, but is not limited to, multiple testing departments, each using the same testing platform or framework, but with different underlying implementation logic. After resource integration, only one testing platform is retained, and test data from other platforms needs to be synchronized to the new testing platform.

[0088] Optionally, in this scenario, a data migration device based on the data migration method of the aforementioned test platform can be applied, but is not limited to, through the following operation methods:

[0089] Resource Integration: By inputting the storage address of the software source code (e.g., git / svn address) on the device's page, the device can retrieve the source code for the corresponding platform (by downloading the source code package via path and parsing it into the device's local folder; one package appears for each test platform, with the source code retrieval address added under the package). By parsing the platform's backend source code, the automated implementation logic is obtained. This automated implementation logic can, but is not limited to, instructing the original test platform on the technology framework used (e.g., Python, Java, Go), and can also, but is not limited to, instructing what the implementation logic looks like on the original platform. For example, platform A might use test cases as the fine-grained unit for task execution, platform B on projects, and platform C on scenarios. The system records the smallest to the largest unit of execution, facilitating data migration later. The corresponding built-in functions and methods are retrieved and stored locally on the device. During automated execution, some interfaces require the natural date and time as parameters, so the platform must provide this method for normal logic execution. Other platforms require data encryption, necessitating specific handling for each platform. Changes to the corresponding source code are obtained, and by acquiring test case execution and user test case recording data, the original data content of the user on the original platform is determined. The execution records then provide the post-execution results, facilitating later migration to the new test platform for content modifications.

[0090] Data migration: The new test platform also parses the above resource integration steps to obtain the execution logic of the automated scripts (e.g., UI automation requires the use of corresponding drivers for execution, while interface automation requires initiating protocol requests; it is necessary to distinguish between the two types of execution logic and migrate different types of execution logic to the corresponding new test platform). Furthermore, a function layer is added to the new platform via a device (e.g., the old test platform has an MD5 encryption method, while the new test platform does not; when an interface parameter uses this method, the device will copy the corresponding MD5 encryption source code from the old test platform to the function layer, and then replace the interface method parameter of the old test platform with the function name named in the new test platform) and a receiving logic layer (in the automation platform, many interfaces are interconnected; for example, after a user logs in, they can obtain a token or other authentication content for subsequent interface authentication; or when purchasing goods, it is necessary to add the goods and then purchase them; the logic of recording the data here needs to be recorded for later restoration). This is used for real-time synchronization of the old test platform's content. After parsing, the data from the old test platform is migrated to the new test platform for operation. The parsing content in step 1 is used to understand the function processing logic of multiple platforms. The device automatically inserts function layers to parse this content, thereby ensuring that the migrated data runs normally in the new test platform.

[0091] Iterative Generation: After synchronizing data to the new platform, users can execute scripts previously written on the old test platform. When the new test platform is understaffed, but some departments need to expand their business and add functions, employees can continue to write source code on the old test platform. Once the test is passed and the source code log is updated, the device will automatically pull the new source code to add and update functions and methods, and search whether the corresponding data on the old test platform has also been updated. If it has been updated, the original data will be updated to achieve data consistency.

[0092] For example, a schematic diagram illustrating the application of a data migration device based on a test platform data migration method is shown below. Figure 2 As shown, the test platform retrieves the data parsed by the device. Specifically, the device parses the running logic, methods, functions, data, etc. from the three old test platforms A, B, and C respectively and stores them locally on the device for the test platform to retrieve.

[0093] Optionally, a schematic diagram of an optional data migration process is shown below. Figure 3As shown, after data parsing, the old testing platform obtains the corresponding functions, methods, and data. It then determines whether the corresponding functions, methods, and data exist in the new testing platform. If so, the data is directly migrated to the new testing platform for integration. If not, the functions, methods, and data are added to the new testing platform.

[0094] Optionally, a schematic diagram of an optional data migration process is shown below. Figure 4 As shown, if the old test platform is updated after data migration, such as adding a new function, it will determine whether the new test platform has the corresponding function. If it does, data migration will be performed to integrate the function; if it does not, the source code data of the old test platform will be copied to the new test platform.

[0095] Optionally, a schematic diagram of an optional data migration process is shown below. Figure 5 As shown, after the old test platform interface data is parsed and replaced, the corresponding MD5 and AES method source code is obtained. Then, the data is synchronized to the new test platform to obtain the new test platform interface data.

[0096] Optionally, an optional data migration process includes the following steps:

[0097] Step 1: Resource integration, which includes parsing data, functions, and methods on the old testing platform and the new testing platform, in order to analyze the data, functions, and methods of both platforms.

[0098] Step Two: Data Migration. Following the analysis of functions in the old and new testing platforms in Step One, replace the functions used in the test scripts of the old testing platform with the corresponding function methods in the new testing platform. Replace the execution logic of the test scripts in the old testing platform with the corresponding execution logic in the new testing platform. The new testing platform adds a function layer to handle functions from the old testing platform, eliminating the need for new test developers to manually write scripts.

[0099] Step 3: Add synchronization by monitoring for source code updates on the old test platform and synchronizing newly added methods / functions to the new test platform. Synchronize data from the old test platform and parse and synchronize newly added methods to incrementally synchronize methods and data.

[0100] Through the embodiments provided in this application, platform functions or methods of various test platforms are obtained, and the device is used to parse them into content corresponding to each platform, including but not limited to functions, calling logic, user input content, scheduled tasks, report styles, etc. After obtaining the data, the implementation logic of the new platform is parsed, thereby converting the old data content into new content and storing it in the new platform for execution.

[0101] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0102] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0103] According to another aspect of the embodiments of this application, a data migration apparatus for a test platform used to implement the data migration method of the above-described test platform is also provided. For example... Figure 6 As shown, the device includes:

[0104] Migration unit 602 is used to migrate the first test data corresponding to the first test platform to the second test platform, wherein the second test platform corresponds to the second test data;

[0105] The acquisition unit 604 is used to acquire a first test result obtained by the first test platform in response to at least one test request and execution of a first operation instruction, and to acquire a second test result obtained by the second test platform in response to at least one test request and execution of a second operation instruction, wherein the first test data includes the first operation instruction and the second test data includes the second operation instruction;

[0106] The correction unit 606 is used to correct the second operation instruction in the second test data based on the instruction difference information between the first operation instruction and the second operation instruction, and the result difference information between the first test result and the second test result.

[0107] As an optional solution, the device is also used for:

[0108] The first comparison module is used to perform a first instruction comparison on the first instruction data corresponding to the first operation instruction and the second instruction data corresponding to the second operation instruction in the second test data before correcting the second operation instruction, so as to obtain code difference information between the first operation instruction and the second operation instruction.

[0109] The second comparison module is used to perform a second instruction comparison on the first dependency relationship corresponding to the first operation instruction and the second dependency relationship corresponding to the second operation instruction in the second test data before the second operation instruction is corrected, so as to obtain the dependency difference information between the first operation instruction and the second operation instruction. The instruction difference information includes code difference information and dependency difference information.

[0110] As an optional solution, the correction unit 606 includes:

[0111] The first correction module is used to correct the second dependency relationship according to the first dependency relationship when the result difference information includes the first result difference sub-information that meets the first expected difference condition. The first expected difference condition is used to indicate that the first result difference sub-information is generated based on the dependency difference information, and the instruction difference information includes the dependency difference information.

[0112] As an optional solution, the correction unit 606 includes:

[0113] The second correction module is used to create a third operation instruction corresponding to the first operation instruction in the second test data when the result difference information includes second result difference sub-information that meets the second expected difference condition, according to the first operation instruction. The third operation instruction is used to replace the second operation instruction for execution when the second test platform responds to at least one test request. The second expected difference condition is used to indicate that the second result difference sub-information is generated based on code difference information. The instruction difference information includes code difference information.

[0114] As an optional solution, the device also includes:

[0115] The acquisition module is used to acquire newly added test data from the first test data corresponding to the first test platform after migrating the first test data to the second test platform. The newly added test data is the test result obtained by the first test platform in response to the new test request and by executing the operation instructions corresponding to the new test request.

[0116] The first migration module is used to migrate newly added test data to the second test data after migrating the first test data corresponding to the first test platform to the second test platform.

[0117] The third correction module is used to correct the fourth operation instruction in the second test data after migrating the first test data corresponding to the first test platform to the second test platform, based on the test results corresponding to the new test request on the first and second test platforms. The fourth operation instruction is the operation instruction executed on the second test platform in response to the new test request.

[0118] As an optional solution, the device also includes:

[0119] A creation module is used to create a first storage area and a second storage area on the second test platform before migrating the first test data corresponding to the first test platform to the second test platform. The first storage area is used to store operation instruction data of function type, and the second storage area is used to store operation instruction data of business type and the dependency relationship corresponding to the operation instruction.

[0120] Migration unit 602 includes:

[0121] The second migration module is used to migrate test data of function type in the first test data to the first storage area, and to migrate test data of business type in the first test data to the second storage area.

[0122] According to another aspect of the embodiments of this application, an electronic device for implementing the data migration method of the above-described test platform is also provided, further as follows: Figure 7 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps of any of the above method embodiments through the computer program.

[0123] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0124] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0125] S1, migrate the first test data corresponding to the first test platform to the second test platform, wherein the second test platform corresponds to the second test data;

[0126] S2, obtain the first test result obtained by executing the first operation instruction in response to at least one test request on the first test platform, and obtain the second test result obtained by executing the second operation instruction in response to at least one test request on the second test platform, wherein the first test data includes the first operation instruction, and the second test data includes the second operation instruction;

[0127] S3, based on the instruction difference information between the first and second operation instructions, and the result difference information between the first and second test results, the second operation instruction is corrected in the second test data. Optionally, as those skilled in the art will understand, Figure 7 The structure shown is for illustrative purposes only. Figure 7 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 7The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 7 The different configurations shown.

[0128] The memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data migration method and apparatus for the test platform in this embodiment. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, thereby realizing the aforementioned data migration method for the test platform. The memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include memory remotely located relative to the processor 704, and these remote memories can be connected to electronic devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 702 may be used, but is not limited to, to store instruction difference information, result difference information, and other information. As an example, such as... ​ As shown, the memory 702 may include, but is not limited to, the migration unit 602, the acquisition unit 604, and the correction unit 606 of the data migration device of the test platform. Furthermore, it may include, but is not limited to, other module units of the data migration device of the test platform, which will not be described in detail in this example.

[0129] Optionally, the transmission device 706 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 706 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 706 is a radio frequency (RF) module, used for wireless communication with the Internet.

[0130] In addition, the aforementioned electronic device also includes: a display 708 for displaying information such as instruction difference information and result difference information; and a connection bus 710 for connecting various module components in the aforementioned electronic device.

[0131] In other embodiments, the aforementioned client or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer network, and any form of computing device, such as a server, client, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0132] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions provided in embodiments of this application.

[0133] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0134] It should be noted that the computer system of the electronic device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0135] A computer system includes a Central Processing Unit (CPU), which performs various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) or loaded from RAM. ROM also stores various programs and data required for system operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output interfaces (I / O interfaces) are also connected to the bus.

[0136] The following components are connected to the input / output interface: input sections including keyboards, mice, etc.; output sections including cathode ray tubes (CRTs), liquid crystal displays (LCDs), and speakers; storage sections including hard drives; and communication sections including network interface cards such as LAN cards and modems. The communication section performs communication processing via a network such as the Internet. Drives are also connected to the input / output interface as needed. Removable media, such as disks, optical discs, magneto-optical discs, semiconductor memories, etc., are installed on the drive as needed so that computer programs read from them can be installed into the storage section as required.

[0137] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions defined in the system of this application.

[0138] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.

[0139] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store a computer program for performing the following steps:

[0140] S1, migrate the first test data corresponding to the first test platform to the second test platform, wherein the second test platform corresponds to the second test data;

[0141] S2, obtain the first test result obtained by executing the first operation instruction in response to at least one test request on the first test platform, and obtain the second test result obtained by executing the second operation instruction in response to at least one test request on the second test platform, wherein the first test data includes the first operation instruction, and the second test data includes the second operation instruction;

[0142] S3, based on the instruction difference information between the first operation instruction and the second operation instruction, and the result difference information between the first test result and the second test result, the second operation instruction is corrected in the second test data. Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware of the electronic device. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0143] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0144] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.

[0145] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0146] In the several embodiments provided in this application, it should be understood that the recorded client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0147] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0148] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0149] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A data migration method for a test platform, characterized in that, include: The first test data corresponding to the first test platform is migrated to the second test platform, wherein the second test platform corresponds to the second test data; The system obtains a first test result obtained by executing a first operation instruction in response to at least one test request on the first test platform, and a second test result obtained by executing a second operation instruction in response to the at least one test request on the second test platform, wherein the first test data includes the first operation instruction, and the second test data includes the second operation instruction; Based on the instruction difference information between the first operation instruction and the second operation instruction, and the result difference information between the first test result and the second test result, the second operation instruction is corrected in the second test data.

2. The method according to claim 1, characterized in that, Before modifying the second operation instruction in the second test data, the method further includes: A first instruction comparison is performed on the first instruction data corresponding to the first operation instruction and the second instruction data corresponding to the second operation instruction to obtain code difference information between the first operation instruction and the second operation instruction. A second instruction comparison is performed on the first dependency relationship corresponding to the first operation instruction and the second dependency relationship corresponding to the second operation instruction to obtain dependency difference information between the first operation instruction and the second operation instruction. The instruction difference information includes the code difference information and the dependency difference information.

3. The method according to claim 2, characterized in that, The step of correcting the second operation instruction in the second test data based on the instruction difference information and the result difference information includes: If the result difference information includes first result difference sub-information that meets the first expected difference condition, the second dependency relationship is modified according to the first dependency relationship, wherein the first expected difference condition is used to indicate that the first result difference sub-information is generated based on the dependency difference information.

4. The method according to claim 2, characterized in that, The step of correcting the second operation instruction in the second test data based on the instruction difference information and the result difference information includes: If the result difference information includes second result difference sub-information that meets the second expected difference condition, a third operation instruction corresponding to the first operation instruction is created in the second test data according to the first operation instruction. The third operation instruction is used to replace the second operation instruction for execution when the second test platform responds to the at least one test request. The second expected difference condition is used to indicate that the second result difference sub-information is generated based on the code difference information.

5. The method according to any one of claims 1 to 4, characterized in that, After migrating the first test data corresponding to the first test platform to the second test platform, the method further includes: Obtain newly added test data from the first test data corresponding to the first test platform, wherein the newly added test data is the test result obtained by the first test platform in response to a new test request and by executing the operation instruction corresponding to the new test request; Migrate the newly added test data to the second test data; Based on the test results corresponding to the new test request on the first test platform and the second test platform, the fourth operation instruction is modified in the second test data, wherein the fourth operation instruction is the operation instruction executed on the second test platform in response to the new test request.

6. The method according to any one of claims 1 to 4, characterized in that, Before migrating the first test data corresponding to the first test platform to the second test platform, the method further includes: A first storage area and a second storage area are created on the second test platform. The first storage area is used to store operation instruction data of function type, and the second storage area is used to store operation instruction data of business type and the dependency relationship corresponding to the operation instruction. The step of migrating the first test data corresponding to the first test platform to the second test platform includes: The test data of the function type in the first test data is migrated to the first storage area, and the test data of the business type in the first test data is migrated to the second storage area.

7. A data migration device for a test platform, characterized in that, include: The migration unit is used to migrate the first test data corresponding to the first test platform to the second test platform, wherein the second test platform corresponds to the second test data; The acquisition unit is used to acquire a first test result obtained by the first test platform responding to at least one test request and executing a first operation instruction, and to acquire a second test result obtained by the second test platform responding to at least one test request and executing a second operation instruction, wherein the first test data includes the first operation instruction and the second test data includes the second operation instruction; The correction unit is used to correct the second operation instruction in the second test data based on the instruction difference information between the first operation instruction and the second operation instruction, and the result difference information between the first test result and the second test result.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program is executed by an electronic device to perform the method according to any one of claims 1 to 6.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 6 through the computer program.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method of any one of claims 1 to 6.