Automatic external connection regression testing method, device and equipment and storage medium

By generating client-side interactive pages using JSP and automating data conversion, the problems of low accuracy and efficiency in traditional external regression testing methods are solved. This enables automated verification of the processing results of service components based on changes in external component interfaces, thereby improving test coverage and efficiency.

CN121501655APending Publication Date: 2026-02-10CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511542369.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Traditional external regression testing methods suffer from low accuracy and efficiency in client-server architecture systems, especially when the interfaces of external components change. Manual verification is labor-intensive and relies on historical data, leading to unreliable test results.

Method used

The system generates client-side interactive pages using JSP, automatically extracts historical external data, converts it into test sample data based on preset rules, simulates the data processing flow of external components, and automatically verifies the processing results of service components.

Benefits of technology

It has achieved automation and improved accuracy in external regression testing, reduced manual verification work, increased test coverage and efficiency, and can adapt to different testing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501655A_ABST
    Figure CN121501655A_ABST
Patent Text Reader

Abstract

The invention provides an automatic external connection regression testing method and device, equipment and a storage medium, and belongs to the field of computer software tests.The method comprises the steps that historical external data are extracted from an external connection database in batches based on an external connection regression testing request input by a client interaction page; converting the historical external data into basic test data according to a preset rule based on test demand information input by the client interaction page; updating the basic test data into test sample data matched with the current interface of the external connection component; calling a logic code of the external connection component based on the JSP, analyzing the test sample data and forwarding the test sample data to the service component; and comparing a business result generated by the service component with an expected result, and generating a test report. Through the method provided by the invention, the limitation of a traditional scheme can be overcome, and the efficiency and quality of external connection regression testing are improved in an automatic testing mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer software testing technology, specifically to an automated external regression testing method, an automated external regression testing device, a computer device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] In the fields of finance, retail, and government affairs, a centralized system architecture (referred to as CS architecture) is commonly used to build data processing systems. These systems typically contain one or more "external components" to receive external data from external parties (such as third-party data providers, trading platforms, regulatory systems, etc.). After being parsed and transformed by the external components, this external data is sent to the "service components" inside the system for subsequent business processing.

[0003] During system development and maintenance, when the interfaces of external components are added or changed, joint testing with the corresponding external parties is usually required to ensure that the external component interfaces and service components using the corresponding external data process correctly. After joint testing is completed, the external party typically withdraws its manpower, environment, and other related testing resources. However, in subsequent system iterations, if the service components undergo functional modifications due to internal requirements (e.g., adjustments to data processing logic or business rules), and the external component interfaces themselves have not changed, it is difficult to request the external party's assistance for regression testing again. In this situation, testers can only rely on the external data issued by the external components and retained during the joint testing period, manually re-entering it into the service components for verification.

[0004] Because client-server architecture systems typically have multiple external connections, and the business scenarios using external data are complex and diverse, any changes to the code in service components that involve external data processing will result in a large amount of repetitive manual verification work. Furthermore, the historical messages or files relied upon for manual verification often come from earlier testing activities, and their data formats, field contents, or semantics may be inconsistent with the actual implementation of the current external component interfaces, potentially leading to unreliable test results and a risk of misjudgment.

[0005] In summary, traditional external regression testing methods are no longer compatible with the current fast-paced development and testing iterations in terms of work efficiency and quality, and there is an urgent need to develop a testing solution that can improve efficiency and accuracy. Summary of the Invention

[0006] The purpose of this application is to provide an automated external regression testing method, apparatus, device, and storage medium to solve the technical problems of low accuracy and efficiency in traditional external regression testing methods in the prior art. This application provides an automated external regression testing method that can overcome the limitations of traditional solutions and improve the efficiency and quality of external regression testing through automated testing.

[0007] To achieve the above objectives, the first aspect of this application provides an automated external regression testing method. This method is applied to a client-server architecture system with external components and service components, and includes the following steps: Based on an external regression test request input on a client-side interactive page, batch extracting historical external data from an external database, wherein the external database stores historical external messages and / or historical external files from different external parties; the client-side interactive page is generated via JSP; based on test requirement information input on the client-side interactive page, converting the historical external data into basic test data according to preset rules, wherein the test requirement information includes at least: a target business scenario and a target test strategy scenario; updating the basic test data to test sample data adapted to the version of the external component; calling the logic code of the external component based on JSP, parsing the test sample data and forwarding it to the service component; comparing the business results generated by the service component with the expected results, and generating a test report.

[0008] Based on the aforementioned technical means, this application, on the one hand, uses JSP to set up client-side interactive pages and call data processing logic code of external components to completely simulate the end-to-end processing flow of external data from reception, parsing to forwarding to service components. Furthermore, by converting external data into test sample data that meets test requirements and is compatible with the version of the external components according to preset rules, it improves test coverage and relevance, resolving the problem of mismatch between historical external data and user test requirements, as well as the version of the external components. On the other hand, by actively querying the background processing results of the service components and comparing them with the expected results, it achieves automated verification of test results. Compared with existing technologies, this method achieves active simulation and automatic verification of the external regression process, improving the accuracy and efficiency of test results.

[0009] In an exemplary embodiment of this application, the step of converting historical external data into basic test data based on test requirement information input from the client interaction page may include: converting historical external data into target external data adapted to the target business scenario based on the mapping relationship between business scenario type and a first data transformation rule; and converting target external data into basic test data adapted to the target test scenario based on the mapping relationship between test scenario type and a second data transformation rule.

[0010] Based on the aforementioned technical methods, by establishing a mapping relationship between business scenario types, test scenario types, and data transformation rules, and matching the corresponding rules from the mapping relationship to perform data transformation according to the user's selected "target business scenario" and "target test scenario," data for different testing purposes can be flexibly generated. Compared with existing technologies, this method achieves automated generation of test data, improves the coverage and relevance of external regression testing, and can adapt to constantly changing testing needs.

[0011] In one exemplary embodiment of this application, updating the basic test data to test sample data adapted to the version of the external component may include: determining whether the basic test data input on the client interaction page matches the current interface of the external component; if they match, the basic test data is directly output as test sample data; if they do not match, the basic test data is updated to test sample data based on the specification parameters of the current interface.

[0012] Based on the above technical means, by determining whether the basic test data matches the current interface of the external component, and dynamically updating the basic test data according to the specification parameters of the current interface, the problem of outdated historical data is effectively solved, ensuring that the test input is synchronized with the current interface implementation and improving the accuracy of testing.

[0013] In an exemplary embodiment of this application, determining whether the basic test data input on the client interaction page matches the current interface of the external component may include: obtaining the specification parameters of the current interface based on the configuration file, logic code, or API documentation of the external component; parsing the basic test data input on the client interaction page to determine several matching degree evaluation indicators; determining whether each matching degree evaluation indicator conforms to the specification parameters of the current interface; if all matching degree evaluation indicators conform to the specification parameters of the current interface, then determining that the basic test data matches the current interface of the external component; if one or more matching degree evaluation indicators do not conform to the specification parameters of the current interface, then determining that the basic test data does not match the current interface of the external component.

[0014] Based on the above technical means, by parsing the specification parameters of the current interface and evaluating the matching degree of the input basic test data in multiple dimensions (such as fields, types, formats, etc.) based on these parameters, a quantifiable and automated matching degree evaluation mechanism is formed to ensure the objectivity and accuracy of data compatibility judgment.

[0015] In one exemplary embodiment of this application, updating the basic test data to test sample data based on the specification parameters of the current interface may include: generating a specification template based on the specification parameters of the current interface; for each matching degree evaluation index that does not conform to the specification parameters of the current interface, using the specification template to partially repair the basic test data, and outputting the repaired basic test data as test sample data; or, generating entirely new basic test data based on the business information in the basic test data using the specification template, and outputting the entirely new basic test data as test sample data.

[0016] Based on the above technical means, after determining that the basic test data does not match the current interface, two strategies for updating the basic test data are provided. The two strategies can be flexibly switched to adapt to different degrees of change and test requirements, thereby improving the adaptability and robustness of the solution.

[0017] In one exemplary embodiment of this application, the step of comparing the business results generated by the service component with the expected results to generate a test report may include: automatically querying the service component database after the service component generates business results to obtain the actual processing results of key fields; determining whether the actual processing results of key fields are consistent with the expected results; if the actual processing results of key fields are consistent with the expected results, generating a test report indicating that the test has passed; if the actual processing results of key fields are inconsistent with the expected results, generating a test report indicating that the test has failed, and automatically recording a failure log.

[0018] Based on the above technical means, after the product service component has been processed, the key fields in its database are automatically queried, and the actual processing results are compared with the expected results, thus realizing an automated closed loop for testing and verification, which can further improve testing efficiency and accuracy.

[0019] The second aspect of this application provides an automated external regression testing device. This device is applied to a client-server architecture system with external components and service components, comprising: a data acquisition module, a data conversion module, a data update module, a data processing module, and a result verification module. The data acquisition module is used to extract historical external data in batches from an external database based on an external regression test request input through a client-side interactive page. The external database stores historical external messages and / or historical external files from different external parties. The client-side interactive page is generated via JSP. The data conversion module is used to convert historical external data into basic test data according to preset rules based on test requirement information input through the client-side interactive page. The test requirement information includes at least: a target business scenario and a target test strategy scenario. The data update module is used to update the basic test data to test sample data adapted to the version of the external component. The data processing module is used to call the logic code of the external component based on JSP, parse the test sample data, and forward it to the service component. The result verification module is used to compare the business results generated by the service component with the expected results and generate a test report.

[0020] A third aspect of this application provides a computer device, including: a processor and a memory communicatively connected to the processor; the processor executes computer execution instructions stored in the memory to implement the external regression automated testing method as described above.

[0021] A fourth aspect of this application provides a machine-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the external regression automated testing method as described above.

[0022] The fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the external regression automated testing method as described above.

[0023] The technical solution provided in this application has at least the following technical effects: (1) On the one hand, this application sets up the client interaction page and calls the data processing logic code of the external component through JSP to fully simulate the end-to-end processing flow of external data from receiving, parsing to forwarding to the service component, which can verify the impact of changes in the interface of the external component on the processing result of the service component; on the other hand, by actively querying the background processing result of the service component and comparing it with the expected result, the test result verification without human intervention is realized. (2) Before calling the logic code of the external component through JSP, this application converts the historical external data into test sample data that meets the test requirements and is compatible with the version of the external component through rule-based transformation, which improves the coverage and targeting of the external regression test and can solve the problem of mismatch between historical external data and user test requirements and external component version; (3) Compared with the prior art, this application solves the problems of low efficiency, reliance on external parties and incomplete coverage of the original manual testing, and can significantly improve the accuracy and efficiency of test results; (4) This application is applicable to most CS architecture systems dominated by Java and with external components and service components. In such architecture systems, JSP can be directly integrated without additional deployment resources. Moreover, JSP runs on the server side, and test data will not be exposed on the network, thus avoiding the leakage of sensitive data (such as transaction messages and medical records).

[0024] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0025] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 The illustration schematically shows a logical diagram of a conventional external regression testing method according to an embodiment of this application; Figure 2 The illustration shows a logical diagram of an automated external regression testing method according to an embodiment of this application; Figure 3 The schematic diagram illustrates a flowchart of an automated external regression testing method according to an embodiment of this application; Figure 4 This illustration schematically shows an application environment diagram of the external regression automated testing method according to an embodiment of this application; Figure 5 This schematic diagram illustrates the structural block diagram of an automated external regression testing apparatus according to an embodiment of this application; Figure 6 The diagram illustrates the internal structure of a computer device according to an embodiment of this application.

[0026] Explanation of reference numerals in the attached figures 102-Terminal, 104-Server, 200-External Regression Automated Testing Device, 201-Data Acquisition Module, 202-Data Conversion Module, 203-Data Update Module, 204-Data Processing Module, 205-Result Verification Module, A01-Processor, A02-Network Interface, A03-Internal Memory, A04-Display Screen, A05-Input Device, A06-Non-Volatile Storage Medium, B01-Operating System, B02-Computer Program. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0028] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0029] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0030] The acquisition, transmission, storage, use, and processing of data in this application comply with relevant national laws and regulations. Furthermore, it should be noted that existing industry solutions such as software, components, and models may be mentioned in the embodiments of this application. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0031] like Figure 1As shown, the general process of traditional external regression testing is as follows: When an external organization sends external messages / files to an external component for joint testing, the converted external messages / files sent by the external component to the service component are actively retained and stored as historical messages / files. When the service component undergoes functional modifications due to internal requirements (e.g., adjustments to data processing logic or business rules), testers manually send the retained historical messages / files directly to the service component and verify the accuracy of the service component's processing results. This manual verification process results in low testing efficiency and lacks timeliness. Moreover, sending the retained historical messages / files directly to the service component for verification does not verify the process of the external component converting external files / messages. If the external component's interface changes (e.g., interface version upgrades, data format changes, business rule adjustments, etc.), the consistency between its processing results and the external party's expectations cannot be automatically verified, thus affecting the accuracy of the test results.

[0032] Considering the technical problems of low accuracy and efficiency in traditional external regression testing methods in the prior art, this application provides an automated external regression testing method, such as... Figure 2 As shown, this method, on the one hand, generates client-side interactive pages (such as client-side web pages) through JSP, and utilizes JSP to call the code of external components to parse external files and send them to product service components. This realizes the process of receiving messages / files from external organizations, parsing, converting, processing, and sending them to product service components through an automated page tool. On the other hand, it uses an automated tool to query the background processing results of product service components and compares them with the expected results, thus automating the verification of test results. Compared with traditional external regression testing methods in the prior art, this application can improve the efficiency and quality of external regression testing through automated testing. In specific implementation, the above method can be executed by a computer device, which can be a server, terminal, or other device with processing capabilities.

[0033] The technical solutions of this application will now be described in detail with reference to the accompanying drawings and embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0034] To achieve the above technical solution, the first aspect of this application provides an automated external regression testing method. Figure 3 A schematic diagram illustrating the flow of an automated external regression testing method according to an embodiment of this application is provided. Figure 3 As shown, this automated external regression testing method includes the following steps: Step S101: Based on the external regression test request input on the client interaction page, extract historical external data in batches from the external database.

[0035] Client-side interactive pages can be generated using JSP. A JSP file is a hybrid document containing static HTML for the interface structure and dynamic Java code for the logic. When a browser or tool accesses the JSP's URL, the server compiles the JSP into a Servlet (Java class), executes the Java code to generate an HTML response, and sends it back to the client, forming the client-side interactive page (such as a webpage). This process is similar to a template engine; the client-side interactive page is dynamically generated. After the user submits external input data, the browser or tool sends an HTTP request to the JSP's URL. The server then re-executes the Java script section in the JSP file to trigger the backend logic code that simulates the processing flow of external components.

[0036] The primary purpose of providing a client-side interactive page is to serve as an entry point for external data input, simulating the process of external parties sending external data to the client-server architecture system. When external support is available, the external party can proactively access the client-side interactive page and input external data. When external support is not possible, an external database can be set up to store historical external data (such as historical external messages and / or historical external files) from different external parties. Then, after testers issue external regression test requests through the client-side interactive page, automated testing tools retrieve batches of historical external data from the external database and send them to the client-side interactive page, thus simulating the external data input process. Furthermore, the automated testing tools can be configured to retrieve external data periodically and in batches to further automate the external regression testing process.

[0037] After obtaining a batch of historical external data, step S102 can be executed.

[0038] Step S102: Based on the test requirement information input on the client interaction page, convert historical external data into basic test data according to preset rules.

[0039] The test requirements information includes at least the target business scenario and the target test scenario. Considering that historical messages / files only represent a test scenario at a certain point in time, the testable scope is limited, and it cannot test new defects introduced by new code or those related to edge case handling. To solve this technical problem, this application customizes data transformation rules for different business and test scenarios before using JSP to call the logic code of external components. Through rule-based transformation, multiple types of test data can be derived from the same historical data, thereby improving test targeting and expanding the test scope.

[0040] After obtaining the basic test data, step S103 can be executed.

[0041] Step S103: Update the basic test data to test sample data that is compatible with the version of the external components.

[0042] When the external data input on the client-side interactive page is historical external messages or files retained during joint testing with external partners, incompatibility may arise between these historical external messages or files and the current interface of the external component due to changes in the external component's interface (e.g., interface version upgrades, data format changes, business rule updates, etc.). In this case, even if the automated test executes successfully, it may fail to accurately reflect the correctness of the current system due to outdated input data. To solve this technical problem, this application sets up a data adaptation layer in the client-server architecture system before using JSP to call the logic code of the external component. This layer is used to transform the basic test data according to the interface changes of the external component and dynamically generate test sample data adapted to the external interface.

[0043] After converting the basic test data into test sample data for external component interface adaptation, step S104 can be executed.

[0044] Step S104: Based on the logic code of calling external components via JSP, parse the test sample data and forward it to the service component.

[0045] JSP scripts can be deployed in the external component testing environment to directly call the actual logic code of the external component, realizing a full-process simulation of the external component parsing, transforming, and sending external data. The logic code of the external component includes: data parsing logic code (such as XML / JSON / FIX protocol parsing), data transformation logic code (such as format conversion and field mapping), and data sending logic code (such as sending via MQ / RPC / HTTP).

[0046] It's important to note that JSP script elements are Java code components in JavaServer Pages (JSP) used to dynamically generate web page content. They comprise three categories: declarations, scriptlets, and expressions. Their code is inserted into the `jspService` method when the JSP is converted to a Servlet, executing server-side logic and content output. Declaration elements, wrapped in `<script>` tags, define member variables and methods of the Servlet class, with a scope covering the entire page lifecycle. Scriptlets embed Java logic code, executing line by line as requests are processed, often including flow control or database operations. Expressions use syntax to convert Java calculation results into strings and directly output them to HTML; after compilation, they are equivalent to an `out.println` statement without the need for semicolons. These three types of elements respectively handle global definition, process control, and result rendering, forming the core mechanism of JSP dynamic web pages.

[0047] After simulating the entire process of external component parsing, processing, and forwarding external data, step S105 can be executed.

[0048] Step S105: Compare the business results generated by the service components with the expected results and generate a test report.

[0049] If the business results generated by the service component are consistent with the expected results, the test can be considered passed; if the business results generated by the service component are inconsistent with the expected results, the test can be considered failed.

[0050] Thus, this application, on the one hand, uses JSP to set up client-side interactive pages and call data processing logic code of external components, completely simulating the end-to-end processing flow of external data from reception, parsing to forwarding to the service component. Furthermore, by converting external data into test sample data adapted to the external component interface, changes in the external component's code are reflected in the data sent to the service component, verifying the impact of external component changes on the service component. On the other hand, by actively querying the service component's backend processing results and comparing them with the expected results, automated verification of test results is achieved. Compared with existing technologies, this method achieves active simulation and automatic verification of the external regression process, improving the accuracy and efficiency of test results.

[0051] It should be noted that the automated external regression testing method provided in this application can be applied to any CS architecture system with external components and service components. The above systems include, but are not limited to: hosting systems, financial transaction systems, supply chain management systems, government service systems, medical and health systems, industrial IoT platforms, telecommunications operation systems, retail management systems, cloud computing platforms, etc. These systems share common characteristics including: (1) external components need to interact with external parties (such as external institutions or external systems) for data, and the external data format may change (such as interface upgrades, policy adjustments, etc.); (2) service components need to process external data and generate business results (such as transactions, reports, decisions, etc.), and the business logic may depend on the format or content of the external data; (3) testing requirements include verifying the end-to-end process of external components and product components, and the testing resources of external parties are difficult to obtain continuously.

[0052] These systems are typically developed using Java and belong to the traditional Java EE system category. Compared to other types of input simulation tools (such as REST API Mock, gRPC Stub, MQ simulation, etc.), this application uses JSP to simulate the end-to-end processing flow of external data from reception, parsing to forwarding to service components, which will have the following core advantages: (1) JSP runs in existing Java Web containers (such as Tomcat and Jetty) without the need to deploy a separate Mock server or containerized environment. For example, the hosting system is usually deployed in the Java EE environment, and JSP can be directly integrated without additional resources. (2) JSP, as a Java server page, directly calls the Java methods of external components without the need for HTTP / gRPC / MQ protocol conversion, thus avoiding problems such as serialization / deserialization overhead, network latency, and protocol compatibility. (3) JSP runs on the server side, and the test data will not be exposed on the network (such as HTTP requests), which can avoid the leakage of sensitive data (such as transaction messages, medical records). (4) JSP errors can be viewed directly in the Web container logs (such as Tomcat's catalina.out), which makes it easier for testers to debug.

[0053] Furthermore, in one possible implementation, in step S102, the process of converting historical external data into basic test data based on the test requirement information input on the client interaction page may include, but is not limited to, the following sub-steps S1021 to S1022: Sub-step S1021: Based on the mapping relationship between business scenario type and first data transformation rule, convert historical external data into target external data that is compatible with the target business scenario; Sub-step S1022: Based on the mapping relationship between the test scenario type and the second data transformation rule, the target external data is converted into basic test data that is adapted to the target test scenario.

[0054] Specifically, taking the hosting system as an example, business scenario types may include receiving market opening quotes, processing large transaction orders, end-of-day clearing and reconciliation, and other custom scenarios. A set of data transformation rules can be defined for each business scenario type. For example, for receiving market opening quotes, the corresponding data transformation rule can be: select data records of the opening time from historical external data and adjust the timestamp to the current test time to maintain the rationality of the data; for processing large transaction orders, the corresponding data transformation rule can be: select transaction records from historical transaction data, modify the transaction amount to a value exceeding the threshold, and at the same time maintain the rationality of other fields (such as transaction time, transaction type, etc.); for end-of-day settlement and reconciliation, the corresponding data transformation rule can be: extract settlement and reconciliation data of multiple trading days from historical reconciliation data (such as transaction summary, fund settlement, etc.), and may adjust the date field to simulate reconciliation of consecutive trading days. Based on the above data transformation rules, external data can be transformed using a rule engine or a simple machine learning model. The transformation methods can include: (1) field value modification: for example, modifying the amount, quantity, timestamp, etc.; (2) data record filtering: only select historical data records that meet the conditions; (3) data record combination: combine multiple historical data records into a new test data set; (4) inserting abnormal data: insert error codes, abnormal states, etc. according to the scenario.

[0055] Test scenario types can include normal flow regression, anomaly and boundary testing, performance testing, etc. For simple test scenarios, a set of data transformation rules can be defined for each test scenario type, and external data can be transformed using a rule engine or a simple machine learning model based on these rules. For example, for boundary value testing, the corresponding data transformation rule could be: modify key fields to extreme values ​​(such as extremely long strings, extremely large / small numbers); for anomaly flow testing, the corresponding data transformation rule could be: destroy data format (such as missing required fields, incorrect field types); for performance testing, the corresponding data transformation rule could be: simulate incompatible upgrades of external data formats (such as unchanged interface protocols), simulate normal to peak loads (such as increased data volume), simulate extreme loads until system crash (such as increased sending frequency, increased packet size), simulate long-term stable loads (such as setting the number of concurrent connections), etc.

[0056] Furthermore, in one possible implementation, the process of updating the basic test data to test sample data adapted to the current interface of the external component in step S103 may include, but is not limited to, the following sub-steps S1031 to S1033: Sub-step S1031: Determine whether the basic test data input on the client interaction page matches the current interface of the external component; Sub-step S1032: If a match is found, the basic test data is directly output as the test sample data. Sub-step S1033: If there is a mismatch, update the basic test data to the test sample data based on the current interface specification parameters.

[0057] Furthermore, in one possible implementation, the process of determining whether the basic test data input on the client interaction page matches the current interface of the external component in sub-step S1031 may include, but is not limited to, the following sub-steps S10311 to S10315: Sub-step S10311: Obtain the specification parameters of the current interface based on the configuration file, logic code, or API documentation of the external component; Sub-step S10312: parse the basic test data input from the client interaction page and determine several matching degree evaluation indicators; Sub-step S10313: Determine whether each matching degree evaluation index meets the specification parameters of the current interface; Sub-step S10314: If all matching evaluation indicators meet the specification parameters of the current interface, then determine that the basic test data matches the current interface of the external component. Sub-step S10215: If one or more matching evaluation indicators do not meet the specification parameters of the current interface, then it is determined that the basic test data does not match the current interface of the external component.

[0058] For example, by analyzing the configuration file of the external component, specification parameters related to the current interface of the external component can be extracted, such as required fields, data types, format constraints, and interface version types. Then, by parsing the basic test data, several matching evaluation indicators can be extracted, such as field existence, field type, field default value, field format, and version compatibility. Finally, each matching evaluation indicator is compared with the corresponding specification parameters. If all indicators are consistent with the specification parameters, the basic test data is considered to match the current interface of the external component. If at least one indicator is inconsistent with the specification parameters, the basic test data is considered to be inconsistent with the current interface of the external component.

[0059] Furthermore, in one possible implementation, in sub-step S1033, the process of updating the basic test data to test sample data based on the current interface specification parameters may include, but is not limited to, the following sub-steps S1033A1 to S1033A2: Sub-step S1033A1: Generate a specification template based on the specification parameters of the current interface; Sub-step S1033A2 involves using a specification template to partially repair the basic test data for each matching evaluation index that does not conform to the current interface specification parameters, and then outputting the repaired basic test data as test sample data.

[0060] For example, based on the matching evaluation index for each specification parameter that does not conform to the current interface, the mismatch type between the basic test data and the external component interface can be determined, and a corresponding data update strategy can be generated. If the mismatch type is "missing required field", the missing field is filled in by obtaining the default value from the interface definition; if the mismatch type is "format type mismatch", the format is updated by converting the target type or reformatting; if the mismatch type is "version incompatibility", the data version is upgraded by adding new fields, adjusting the structure, etc.

[0061] Furthermore, in another possible implementation, the process of updating the basic test data to test sample data based on the current interface specification parameters in sub-step S1033 may also include, but is not limited to, the following sub-steps S1033B1 to S1033B2: Sub-step S1033B1: Generate a specification template based on the specification parameters of the current interface; Sub-step S1033B2: Based on the business information in the basic test data, generate new basic test data using the specification template, and output the new basic test data as test sample data.

[0062] For example, when the historical base test data does not match the current external component interface specification to a significant degree (e.g., there are multiple matching evaluation metrics that do not conform to the current interface specification parameters), the historical data can be discarded, and entirely new test sample data can be created based on a predefined specification template (such as an empty JSON / XML framework). The new base test data should strictly adhere to the current interface specification, should contain all required fields, correct types or formats, and be populated with default, random, or calculated values ​​to ensure that the JSP simulation process can execute smoothly.

[0063] Furthermore, in practical applications, to make newly generated test samples closer to real-world scenarios, the basic test data can be updated by referencing information related to business semantics from historical basic test data. In this way, the generated test sample data is both compatible with the current interface and contains the actual business values ​​from historical basic test data, avoiding test bias caused by complete randomness.

[0064] Furthermore, in one possible implementation, in step S105, the process of comparing the business results generated by the service component with the expected results to generate a test report may include, but is not limited to, the following sub-steps S1051 to S1054: Sub-step S1051: After the service component generates the business result, automatically query the service component database to obtain the actual processing result of the key fields; Sub-step S1052: Determine whether the actual processing result of the key field is consistent with the expected result; Sub-step S1053: If the actual processing result of the key field is consistent with the expected result, then generate a test report indicating that the test has passed. Sub-step S1054: If the actual processing result of the key field is inconsistent with the expected result, a test report of test failure is generated and a failure log is automatically recorded.

[0065] For example, automated testing tools can be used to proactively query the backend database of service components to obtain the processing results of service components (such as transaction records, market data, etc.), and focus on the key fields of relevant tables (such as transaction status, amount, timestamp, etc.). Then, a script can automatically compare the retrieved key field content with predefined expected results (such as a field should be equal to the X value in the message, the status should be "processed", etc.) to determine whether the key field content matches the preset field rules. If the key field content is found to match the preset field rules, the test is marked as passed; otherwise, a failure log (including input messages, actual output, expected output, etc.) is automatically recorded, and testers are notified via email, SMS, etc.

[0066] To verify the effectiveness and practicality of the automated external regression testing method of this application, taking a hosted system as an example, the automated external regression testing method proposed in this application is further explained. An automated external regression testing method for a hosted system can be implemented through the following steps: Step 1, JSP script deployment and integration with external components, aims to simulate the entire process (parsing + conversion + sending) of external components receiving external data (such as messages and files).

[0067] Deploy JSP scripts in the external component test environment. These scripts directly call the core code of the external component (consistent with the production environment), including: message parsing logic (such as XML / JSON / FIX protocol parsing), data conversion logic (such as format conversion and field mapping), and sending logic (sending the converted data to the service component, such as via MQ / RPC / HTTP).

[0068] The JSP script also generates a client-side web interface for testers or automation tools to input messages / files. This client-side web interface can be designed as a form that provides file uploads or message text input, and supports multiple data formats (such as CSV, XML, JSON, and FIX).

[0069] JSP scripts reuse the actual code of external components, ensuring consistency between the test environment and the production environment.

[0070] End-to-end simulation is achieved by calling the parsing and sending methods of external components through JSP.

[0071] Step two: The page automation tool triggers tests in batches to replace manual input and achieve automated, batch test execution.

[0072] First, use a page automation tool (or something like Selenium or Playwright) to configure the following actions: open the client-side web page interface generated by JSP; read external data from a pre-prepared test dataset and automatically input it into the client-side web page interface; finally, submit the form to trigger the JSP to call the external component processing flow.

[0073] This page automation tool supports parametric testing, reading multiple sets of test data from Excel / database or JSON files. Furthermore, the tool can be configured with scheduled tasks (such as running regression tests nightly).

[0074] Step 3, automated result verification, aims to automatically compare the processing results of service components with the expected values.

[0075] Automated tools or standalone scripts query the service component database to obtain processing results (such as transaction records and market data). Then, according to predefined expected result rules (such as a field should equal the X value in the message, or the status should be "processed"), the actual results are compared with the expected results to generate a test report (such as test passed, test failed, test anomaly). If the results do not match, a failure log is automatically recorded (including input messages, actual output, and expected output). In addition, test results can be notified to testers via email or SMS.

[0076] It should be noted that, Figure 3 These are schematic diagrams illustrating the automated external regression testing method in one embodiment. It should be understood that, although... Figure 3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 3 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0077] The external regression automated testing method provided in this application can be applied to, for example... Figure 4 In the application environment shown, terminal 102 communicates with server 104 via a network. Terminal 102 can send an external regression test request to server 104 via the network under user operation. Upon receiving the external regression test request from the client's interactive page, server 104 responds by retrieving a batch of historical external data from the external database, updating the historical external data according to preset rules to test sample data that meets the test requirements and is compatible with the external component version. Then, based on JSP, it simulates the entire process of external component parsing, converting, and sending test sample data. Finally, it compares the processing results of the business service component with the expected results and generates a test report. After the test report is generated, server 104 can also send the generated test report to terminal 102 via network, cloud, or external storage media. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers. Server 104 can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0078] A second aspect of this application provides an automated external regression testing apparatus. In one embodiment, such as... Figure 5 As shown, an automated external regression testing device 200 is provided, including a data acquisition module 201, a data conversion module 202, a data update module 203, a data processing module 204, and a result verification module 205.

[0079] The data acquisition module 201 is used to extract historical external data in batches from the external database based on the external regression test request input by the client interaction page. The external database stores historical external messages and / or historical external files from different external parties. The client interaction page is generated by JSP.

[0080] The data conversion module 202 is used to convert historical external data into basic test data based on the test requirement information input on the client interaction page and according to preset rules. The test requirement information includes at least: target business scenario and target test scenario.

[0081] The data update module 203 is used to update the basic test data to test sample data that is compatible with the version of the external components.

[0082] The data processing module 204 is used to parse test sample data and forward it to the service component based on the logic code of calling external components via JSP.

[0083] The result verification module 205 is used to compare the business results generated by the service components with the expected results and generate a test report.

[0084] The external regression automated testing device includes a processor and a memory. The aforementioned data acquisition module, data conversion module, data update module, data processing module, and result verification module are all stored as program units in the memory. The processor executes the aforementioned program modules stored in the memory to implement the corresponding functions.

[0085] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters enables automated regression testing methods.

[0086] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0087] The external regression automated testing device provided in this application embodiment can be used to execute the technical solution of the external regression automated testing method in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0088] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing elements; they can be fully implemented in hardware; or some modules can be implemented by processing elements calling software, while others are implemented in hardware. For example, the data update module and data processing module can be separate processing elements, or they can be integrated into a chip in the above device. Alternatively, they can be stored as program code in the memory of the above device, and called and executed by a processing element of the device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0089] In a third aspect, this application provides a computer device, which may be a terminal, and its internal structure diagram may be as shown below. Figure 6 As shown in the figure, the computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05, and a memory (not shown) connected via a system bus. The processor A01 provides computing and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A06. The network interface A02 is used for communication with external terminals via a network connection. When the computer program is executed by the processor A01, it implements an external regression automated testing method. The display screen A04 can be a liquid crystal display (LCD) or an e-ink display. The input device A05 can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0090] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0091] In one embodiment, the external regression automated testing device provided in this application can be implemented as a computer program, which can be implemented in the form of, for example... Figure 6 The computer device shown runs on this device. The computer device's memory can store the various program modules that make up this external regression automated testing apparatus, for example... Figure 5 The diagram shows a data acquisition module, a data conversion module, a data update module, a data processing module, and a result verification module. The computer program comprised of these modules causes the processor to execute the steps in the external regression automated testing methods of the various embodiments of this application described in this specification.

[0092] The fourth aspect of this application provides a storage medium on which a program is stored, which, when executed by a processor, implements the above-described external regression automated testing method.

[0093] The fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described external regression automated testing method. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0094] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0096] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0097] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0098] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0099] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0100] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0101] The preferred embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solution of this application, and these simple modifications all fall within the protection scope of this application.

[0102] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not describe the various possible combinations separately.

[0103] Furthermore, various different implementations of this application can be combined in any way, as long as they do not violate the spirit of this application, they should also be regarded as the content disclosed in this application.

Claims

1. An automated external regression testing method, characterized in that, The automated testing method, applied to client-server architecture systems with external components and service components, includes: Based on the external regression test request input on the client interaction page, historical external data is extracted in batches from the external database. The external database stores historical external messages and / or historical external files from different external parties. The client interaction page is generated by JSP. Based on the test requirement information input on the client interaction page, historical external data is converted into basic test data according to preset rules. The test requirement information includes at least: target business scenario and target test scenario. Update the basic test data to test sample data that is compatible with the version of the external components; Based on the logic code of JSP calling external components, the test sample data is parsed and forwarded to the service component; The business results generated by the service components are compared with the expected results to generate a test report.

2. The automated external regression testing method according to claim 1, characterized in that, The test requirement information based on the client-side interactive page converts historical external data into basic test data, including: Based on the mapping relationship between business scenario types and the first data transformation rule, historical external data is transformed into target external data that is adapted to the target business scenario; Based on the mapping relationship between the test scenario type and the second data transformation rule, the target external data is transformed into basic test data that is adapted to the target test scenario.

3. The automated external regression testing method according to claim 1, characterized in that, The process of updating the basic test data to test sample data adapted to the external component version includes: Determine whether the basic test data matches the current interface of the external component; If a match is found, the basic test data will be output directly as the test sample data. If there is a mismatch, the basic test data will be updated to test sample data based on the current interface specification parameters.

4. The automated external regression testing method according to claim 3, characterized in that, The determination of whether the basic test data matches the current interface of the external component includes: Based on the configuration files, logic code, or API documentation of external components, obtain the specification parameters of the current interface; Analyze the basic test data and determine several matching evaluation indicators; Determine whether each matching evaluation metric meets the specification parameters of the current interface; If all matching evaluation indicators meet the specifications of the current interface, then the basic test data is determined to match the current interface of the external component. If one or more matching evaluation metrics do not meet the specification parameters of the current interface, then it is determined that the basic test data does not match the current interface of the external component.

5. The automated external regression testing method according to claim 4, characterized in that, The process of updating the basic test data to test sample data based on the current interface specification parameters includes: Generate a specification template based on the specification parameters of the current interface; For each matching evaluation index that does not conform to the specification parameters of the current interface, the basic test data is partially repaired using a specification template, and the repaired basic test data is output as test sample data. Alternatively, based on the business information in the basic test data, new test data can be generated using a specification template, and the new test data can be output as test sample data.

6. The automated external regression testing method according to claim 1, characterized in that, The step of comparing the business results generated by the service components with the expected results and generating a test report includes: After the service component generates the business result, it automatically queries the service component database to obtain the actual processing result of the key fields; Determine whether the actual processing result of the key fields matches the expected result; If the actual processing result of the key fields is consistent with the expected result, a test report indicating that the test has passed will be generated. If the actual processing result of the key field is inconsistent with the expected result, a test report of test failure will be generated and a failure log will be automatically recorded.

7. An automated external regression testing device, characterized in that, The automated testing device, applicable to client-server (CS) architecture systems with external components and service components, includes: The data acquisition module is used to extract historical external data in batches from the external database based on the external regression test request input by the client interaction page. The external database stores historical external messages and / or historical external files from different external parties. The client interaction page is generated by JSP. The data conversion module is used to convert historical external data into basic test data based on the test requirement information input on the client interaction page and according to preset rules. The test requirement information includes at least: target business scenario and target test scenario. The data update module is used to update the basic test data to test sample data that is compatible with the version of the external components; The data processing module is used for the logic code that calls external components based on JSP, parses test sample data, and forwards it to the service component; The results verification module is used to compare the business results generated by the service components with the expected results and generate a test report.

8. A computer device, characterized in that, include: A processor and a memory communicatively connected to the processor; The processor executes computer execution instructions stored in the memory to implement the external regression automated testing method according to any one of claims 1 to 6.

9. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by the processor, this instruction causes the processor to be configured to perform the external regression automated testing method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the external regression automated testing method according to any one of claims 1 to 6.