Test method and device, equipment and storage medium

By intercepting and generating update processing requests through the proxy server, the problem of low testing efficiency and low accuracy of new service components during service reconstruction in the prior art is solved, and an efficient and automated testing process is achieved.

CN119645819APending Publication Date: 2025-03-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311183302.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When performing service reconstruction in the prior art, the functional testing of new service components is inefficient and subjective, resulting in low testing accuracy.

Method used

The processing request sent by the terminal device to the first server is intercepted through the proxy server, an update processing request is generated, and sent to the first server and the second server. The two servers receive the response message returned by the update processing request, test the validity of the second service component, and send the first response message to the terminal device.

Benefits of technology

It improves testing efficiency and accuracy, realizes automated testing of new service components without manual participation, and the testing process is insensitive to terminal devices and does not interfere with users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645819A_ABST
    Figure CN119645819A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test method, device and equipment and a storage medium, and is applied to scenes such as cloud technology, artificial intelligence, intelligent traffic and auxiliary driving. The method comprises the following steps: if a processing request about a first service component sent by terminal equipment to a first server is detected, sending the first service component to the first server; if yes, acquiring first equipment information of a proxy server associated with the first server; performing redirection processing on the processing request according to the first equipment information to obtain an update processing request; sending the update processing request to a first server and a second server; receiving a first response message returned by the first server based on the equipment information in the update processing request, and receiving a second response message returned by the second server based on the equipment information in the update processing request; and testing the validity of the second service component according to the first response message and the second response message, and sending the first response message to the terminal equipment. According to the invention, the test efficiency and the test accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to fields such as computer technology, and in particular to a testing method, device, equipment and storage medium. Background Art

[0002] With the advancement of computer technology, service reconstruction technology is used more and more frequently. Service reconstruction technology improves the quality and performance of software by adjusting program code, making the design mode and architecture of the program more reasonable, and improving the scalability and maintainability of the software. Therefore, when reconstructing services, in order to ensure the quality and stability of new service components, it is necessary to test the functions of new service components. At present, the functions of new service components are mainly tested manually. This test method has low test efficiency and is subjective, resulting in low test accuracy. Summary of the invention

[0003] The embodiments of the present application provide a testing method, apparatus, device and storage medium to improve testing efficiency and testing accuracy.

[0004] An embodiment of the present application provides a testing method, including:

[0005] If a processing request for a first service component sent by a terminal device to a first server is detected, first device information of a proxy server associated with the first server is obtained;

[0006] According to the first device information, the processing request is redirected to obtain an update processing request;

[0007] Sending the update processing request to the first server and the second server; the second server is a server that provides a second service component, and the second service component is obtained by updating the first service component;

[0008] Receiving a first response message returned by the first server based on the device information in the update processing request, and receiving a second response message returned by the second server based on the device information in the update processing request; the first response message is generated by the first server calling the first service component based on the update processing request; the second response message is generated by the second server calling the second service component based on the update processing request;

[0009] According to the first response message and the second response message, the validity of the second service component is tested, and the first response message is sent to the terminal device.

[0010] Optionally, testing the validity of the second service component according to the first response message and the second response message includes:

[0011] Determining a first similarity between the first response message and the second response message;

[0012] If the first similarity is less than or equal to the first similarity threshold, it is determined that the second service component is not valid.

[0013] Optionally, testing the validity of the second service component according to the first response message and the second response message includes:

[0014] Obtaining a test case for testing the first service component;

[0015] Sending the test case to the first server and the second server; the first server is used to test the first service component based on the test case to obtain a first test result; the second server is used to test the second service component based on the test case to obtain a second test result;

[0016] Receiving the first test result returned by the first server and the second test result returned by the second server;

[0017] The validity of the second service component is tested based on the first test result, the second test result, the first response message and the second response message.

[0018] Optionally, testing the validity of the second service component according to the first test result, the second test result, the first response message, the first response message, and the second response message includes:

[0019] Determining a first similarity between the first response message and the second response message;

[0020] Determining a second similarity between the first test result and the second test result;

[0021] Optionally, testing the validity of the second service component according to the first response message and the second response message includes:

[0022] Obtaining static data and running data of the second service component in the second server;

[0023] Parsing the static data to obtain a configuration file of the second service component;

[0024] Parsing the operation data to obtain the operation status of the second service component;

[0025] The validity of the second service component is tested according to the configuration file, the running status, the first response message and the second response message.

[0026] Optionally, testing the validity of the second service component according to the configuration file, the running state, the first response message, and the second response message includes:

[0027] Determining a first similarity between the first response message and the second response message;

[0028] determining a third similarity between the configuration file and a standard configuration file of the second service component;

[0029] If the first similarity is less than or equal to the first similarity threshold, or the third similarity is less than or equal to the third similarity threshold, or the operating state of the second service component is abnormal, it is determined that the second service component is not valid.

[0030] Optionally, testing the validity of the second service component according to the first response message and the second response message includes:

[0031] The first response message and the second response message are sent to a test server, and the test server is used to test the validity of the second service component according to the first response message and the second response message, and generate a test report on the second service component.

[0032] Optionally, the processing request includes the second device information of the terminal device, and the processing request is processed according to the first device information to obtain an update processing request, including:

[0033] The second device information in the processing request is replaced with the first device information to obtain an updated processing request.

[0034] An embodiment of the present application provides a testing device, including:

[0035] If a processing request regarding a first service component sent by a terminal device to a first server is detected, an acquisition module is used to acquire first device information of a proxy server associated with the first server;

[0036] A redirection module, used for redirecting the processing request according to the first device information to obtain an update processing request;

[0037] A sending module, used for sending the update processing request to the first server and the second server; the second server is a server providing a second service component, and the second service component is obtained by updating the first service component;

[0038] A receiving module, configured to receive a first response message returned by the first server based on the device information in the update processing request, and to receive a second response message returned by the second server based on the device information in the update processing request; the first response message is generated by the first server calling the first service component based on the update processing request; the second response message is generated by the second server calling the second service component based on the update processing request;

[0039] A testing module, used to test the validity of the second service component according to the first response message and the second response message;

[0040] The sending module is also used to send the first response message to the terminal device.

[0041] On one hand, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0042] On one hand, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are executed.

[0043] In this application, when the terminal device sends a processing request to the server (i.e., the first server) corresponding to the old service component (i.e., the first service component), the sending request is intercepted by the proxy server to generate an update processing request, and the update processing request is sent to the servers corresponding to the new and old service components. The response messages returned by the servers corresponding to the new and old service components are received based on the update processing request, and the validity of the new service component (i.e., the second service component) is tested based on the response messages returned by the two servers, and the response message returned by the server corresponding to the old service component is sent to the terminal device. The response message is the information returned by the servers corresponding to the new and old service components based on the real processing request. Therefore, the new service component is tested through the response message, so that the test process is closer to the real use scenario of the new service component, and the test accuracy is improved; the test process does not require manual participation, and the automatic test of the new service component can be realized, thereby improving the test efficiency. In addition, during the test process, there is no need to interrupt the processing request of the terminal device, that is, normal services can be provided to the terminal device, and the test process is imperceptible to the terminal device. In other words, the test process does not need to interfere with the user, thereby improving the test experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 is an architectural diagram of a test system provided by this application;

[0046] Figure 2 It is a flow chart of a testing method provided by the present application;

[0047] Figure 3 It is a flow chart of another testing method provided by the present application;

[0048] Figure 4 It is a flow chart of another testing method provided by the present application;

[0049] Figure 5 It is a structural schematic diagram of a testing device provided by the present application;

[0050] Figure 6 It is a structural schematic diagram of a computer device provided by this application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] Service refactoring means optimizing services, modifying design deficiencies, and improving code quality by using design ideas, principles, patterns, coding standards, and other theories, while ensuring that the functions of old service components remain unchanged, so as to obtain new service components. Refactoring can be roughly divided into large-scale high-level refactoring and small-scale low-level refactoring. Large-scale high-level refactoring includes code layering, modularization, decoupling, combing the interaction between classes, abstract reuse components, etc. Small-scale low-level refactoring includes standardized naming, annotations, correcting excessive function parameters, eliminating super-large classes, extracting duplicate code, etc., which become details.

[0053] See also Figure 1 , Figure 1is an architecture diagram of a test system provided in an embodiment of the present application, and the test system can be used to implement the test method in the present application. Figure 1 As shown, the architecture diagram of the testing method includes a testing server 102 , a proxy server 103 , a first server 104 , and a second server 105 .

[0054] Among them, the first server 104 includes a first service component, and the second server 105 includes a second service component. The second service component is obtained by updating the first service component, that is, the first service component can be called an old service component, and the second service component can be called a new service component. The first service component and the second service component can be used to provide the same service for the terminal device. For example, the first service component and the second service component can both provide registration services, login verification services, etc. for the terminal device. Therefore, the first server 104, the second server 105 and the proxy server 103 can also be called service registration centers. Alternatively, the first service component and the second service component can both provide image rendering services, audio and video loading services, etc. for the terminal device. Usually, the performance of the second service component is better, for example, the second service component is more stable, the second service component responds to requests faster, etc.

[0055] Among them, the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc., that is, the first service component and the second service component may refer to functional modules for realizing cloud technology, artificial intelligence, smart transportation, assisted driving, etc. For example, in the assisted driving scenario, the first service component and the second service component may refer to functional modules for road detection, pedestrian detection, and path planning.

[0056] In the testing phase of the second service component, the proxy server 103 is used to detect whether there is a terminal device sending a processing request to the first server 104 corresponding to the first service component. When it is detected that there is a terminal device sending a processing request to the first server 104, the processing request is intercepted and processed to generate an update processing request, and the update processing request is sent to the first server 104 and the second server 105. The update processing request is used to instruct the first server 104 and the second server 105 to return a response message to the proxy server 103. In the testing phase of the second service component, the first server 104 is used to receive the update processing request sent by the proxy server 103, generate a first response message according to the update processing request through the first service component, and send the first response message to the proxy server 103. The second server 105 is used to receive the update processing request sent by the proxy server 103, generate a second response message according to the update processing request through the second service component, and send the second response message to the proxy server 103.

[0057] In one embodiment, during the testing phase of the second service component, the proxy server 103 may also be used to test the validity of the second service component based on the first response message and the second response message, and forward the first response message to the terminal device.

[0058] In one embodiment, during the test phase of the second service component, the proxy server 103 may also be used to send the first response message and the second response message to the test server 102, and the test server 102 may be used to send the test case 101 about the first service component to the proxy server 103, and the proxy server 103 sends the test case 101 to the first server 104 and the second server 105. The first server 104 uses the test case 101 to test the first service component and obtain a first test result, and the second server 105 uses the test case 101 to test the second service component and obtain a second test result. The second test result and the first test result are sent to the proxy server 103. The proxy server 103 may be used to generate a test report 106 about the second service component based on the first test result, the second test result, the first response message and the second response message. The test report 106 is used to display the test results and analyze the test data.

[0059] It should be noted that the test shows that the second service component is effective, that is, when the second service component can provide services to the terminal device normally, all the services that the first service component needs to handle can be switched to the second service component, and the second service component replaces the first service component to perform the corresponding services. Alternatively, when the second service component can provide services to the terminal device normally, part of the services that the first service component needs to handle can be switched to the second service component through the proxy server to achieve load balancing.

[0060] It should be noted that the test case 101 can be written by a user; the user may include a person who uses the technology of the present application, such as a developer or a tester; the test case 101 is used to test whether the functions and behaviors of the first service component and the second service component are consistent. The test server 102 includes an automated testing tool, which can be used to execute the test case and collect test results.

[0061] It should be noted that the above-mentioned proxy server, test server, first server, and second server can be an independent physical server, or a server cluster or distributed system composed of at least two physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The terminal device can specifically refer to a vehicle-mounted terminal, a smart phone, a tablet computer, a laptop, a desktop computer, a smart speaker, a screen speaker, a smart watch, etc., but is not limited thereto.

[0062] For further information, see Figure 2 , is a flow chart of a test method provided in an embodiment of the present application. Figure 2 As shown, the method can be executed by a proxy server, which can be Figure 1 The proxy server 103 shown. The method may include the following steps:

[0063] S201. If a processing request sent by a terminal device to a first service component is detected, first device information of a proxy server associated with the first server is obtained.

[0064] It should be noted that the processing request may include component information of the first service component, second device information of the terminal device, and device information of the first server; the component information includes the component identification, name, number, etc. of the first service component; the second device information includes at least one of the Internet Protocol (IP) address, MAC address, device number, etc. of the terminal device; the device information of the first server includes at least one of the IP address, MAC address, device number, etc. of the first server. Specifically, the processing request may refer to a registration request or a verification request for the first service component. When the processing request is a registration request, the processing request may also include user information of the registered user; when the processing request is a verification request, the processing request also includes user information of the user to be verified, account number and password for logging into the first service component, and other information.

[0065] The first server includes a first service component, which is a functional module for registering and logging in users; the first device information may include device information such as the IP address and MAC address of the proxy server.

[0066] It is understandable that the proxy server can detect whether there is a terminal device sending a processing request to the first service component. When the proxy server detects that the terminal device sends a processing request to the first service component, the first device information of the proxy server is obtained. The proxy server is associated with the first server, that is, the proxy server is a server connected to the first server. Therefore, the proxy server can intercept the processing request without affecting the original service.

[0067] S202: redirect the processing request according to the first device information to obtain an update processing request.

[0068] In the present application, after the proxy server receives the processing request, it can intercept the processing request, that is, redirect the processing request according to the first device information to obtain an update processing request, which is used to indicate the transmission path of the response message regarding the update processing request: from the original first server directly sending to the terminal device, to the first server first sending to the proxy server, and then forwarding to the terminal device by the proxy server.

[0069] Optionally, the processing request includes second device information of the terminal device, and the above step S202 includes: the proxy server can use the first device information to replace the second device information in the processing request to obtain an updated processing request, so as to instruct the recipient of the updated processing request to send a response message to the proxy server.

[0070] S203: Send the update processing request to the first server and the second server.

[0071] It should be noted that the second server is a server that provides a second service component, and the second service component is obtained by updating the first service component; the update may include improving code quality and optimizing services, that is, the second service component can provide the same service as the first service component, the second service component can be called a new service component, and the first service component can be called an old service component; the description of the first service component and the second service component can be the same as that of the above description of the first service component and the second service component. Figure 1 Description.

[0072] It is understandable that the proxy server sends the above update processing request to the first server and the second server, so that both the first server and the second server can reflect the response message about the update processing request.

[0073] S204: Receive a first response message returned by the first server based on the device information in the update processing request, and receive a second response message returned by the second server based on the device information in the update processing request.

[0074] It should be noted that the first response message is generated by the first server calling the first service component based on the update processing request, and the second response message is generated by the second server calling the second service component based on the update processing request.

[0075] For example, if the processing request is a registration request, the first server may call the first service component to verify whether the user meets the registration conditions based on the user information in the registration request. If the registration conditions are met, the first service component generates a first response message indicating that the user meets the registration conditions; if the registration conditions are not met, the first service component generates a first response message indicating that the user does not meet the registration conditions. Similarly, the second server may call the second service component to verify whether the user meets the registration conditions based on the user information in the registration request. If the registration conditions are met, the second service component generates a second response message indicating that the user meets the registration conditions; if the registration conditions are not met, the second service component generates a second response message indicating that the user does not meet the registration conditions.

[0076] For another example, when the processing request is a verification request, the first server may call the first service component to verify whether the user meets the login condition based on the user information of the user to be verified in the verification request. If the login condition is met, the first service component generates a first response message indicating that the user meets the login condition; if the login condition is not met, the first service component generates a first response message indicating that the user does not meet the login condition. Similarly, the second server may call the second service component to verify whether the user meets the login condition based on the user information of the user to be verified in the verification request. If the login condition is met, the second service component generates a second response message indicating that the user meets the login condition; if the login condition is not met, the second service component generates a second response message indicating that the user does not meet the login condition.

[0077] It is understandable that the first server and the second server can respectively generate the first response message and the second response message based on the above-mentioned update processing request, and then send the first response message and the second response message to the proxy server respectively, and the proxy server receives the first response message and the second response message. The response messages of the new and old service components are collected through the proxy server. In order to determine whether the behaviors exposed to the outside by the new and old service components (that is, the functions or services provided to the outside) are consistent based on the response messages, so as to determine the quality and stability of the new service components. For example, when it is determined that the services provided to the outside by the new and old services are consistent, it is determined that the quality of the new service component is good and the stability is high; conversely, when it is determined that the services provided to the outside by the new and old services are not consistent, it is determined that the quality of the new service component is poor and the stability is low.

[0078] S205. Test the validity of the second service component according to the first response message and the second response message, and send the first response message to the terminal device.

[0079] It is understandable that the proxy server can test the validity of the second service component according to the first response message and the second response message, and obtain the test result, which reflects that the second service component is valid or the second service component is not valid. The validity of the second service component means that the second service component can provide the same service as the first service component, and the second service component is not valid. It means that the second service component cannot provide the same service as the first service component; the automatic test of the second service component is realized by the first response message and the second response message, and no additional test cases need to be written, thereby improving the test efficiency and test cost. The response message is the information returned by the server corresponding to the new and old service components based on the real processing request. Therefore, the new service component is tested through the response message, so that the test process is closer to the real use scenario of the new service component and the test accuracy is improved. In addition, the first response message is forwarded to the terminal device by the proxy server, and there is no need to interrupt the processing request of the terminal device, that is, normal service can be provided to the terminal device, and the test process is not sensed by the terminal device. In other words, the test process does not need to interfere with the user, thereby improving the test experience.

[0080] Optionally, the above step S205 may include: determining a first similarity between the first response message and the second response message; if the first similarity is greater than a first similarity threshold, determining that the second service component is valid; if the first similarity is less than or equal to the first similarity threshold, determining that the second service component is not valid.

[0081] It is understandable that the proxy server can use a similarity algorithm to determine the first similarity between the first response message and the second response message. The similarity algorithm can refer to an automated message comparison method, which includes message structure comparison, field comparison, and value comparison. The message here refers to the first response message and the second response message. The similarity algorithm specifically includes cosine similarity, Jaccard similarity coefficient, and Euclidean distance; if the first similarity is greater than the first similarity threshold, it indicates that the second service component is consistent with the behavior exposed to the outside by the first service component, that is, the second service component can provide the same service as the first service component, then the second service component is determined to be valid; if the first similarity is less than or equal to the first similarity threshold, it indicates that the second service component is inconsistent with the behavior exposed to the outside by the first service component, and the second service component cannot provide the same service as the first service component, then the second service component is determined to be invalid. The above-mentioned automated message comparison method reduces the influence of human factors, improves the reliability of the test results, and improves the accuracy of the test results.

[0082] For example, if the first similarity threshold is 90% and the first similarity is 91%, since the first similarity is greater than the first similarity threshold, the second service component and the first service component have the same behavior as those exposed to the outside, and the second service component is determined to be valid. In this way, the validity result of the second service component of the second server can be obtained, thereby ensuring the quality and stability of the second server.

[0083] Optionally, the above step S205 may include: sending the above first response message and the above second response message to a test server, the above test server being used to test the validity of the above second service component according to the above first response message and the above second response message, and generating a test report on the above second service component.

[0084] It is understandable that the test server can receive the first response message and the second response message, and compare the first response message and the second response message according to the first response message and the second response message, and test the validity of the second service component according to the comparison result, and generate a test report on the second service component. The test report is used to display the test results and analyze the test data. The test result refers to.

[0085] Test data refers to:

[0086] In this application, when the terminal device sends a processing request to the server (i.e., the first server) corresponding to the old service component (i.e., the first service component), the sending request is intercepted by the proxy server to generate an update processing request, and the update processing request is sent to the servers corresponding to the new and old service components. The response messages returned by the servers corresponding to the new and old service components are received based on the update processing request, and the validity of the new service component (i.e., the second service component) is tested based on the response messages returned by the two servers, and the response message returned by the server corresponding to the old service component is sent to the terminal device. The response message is the information returned by the servers corresponding to the new and old service components based on the real processing request. Therefore, the new service component is tested through the response message, so that the test process is closer to the real use scenario of the new service component, and the test accuracy is improved; the test process does not require manual participation, and the automatic test of the new service component can be realized, thereby improving the test efficiency. In addition, during the test process, there is no need to interrupt the processing request of the terminal device, that is, normal services can be provided to the terminal device, and the test process is imperceptible to the terminal device. In other words, the test process does not need to interfere with the user, thereby improving the test experience.

[0087] Combination Figure 1 For the architecture diagram shown, see Figure 3 , Figure 3 : is a flow chart of another test method provided in the embodiment of the present application. The test method includes but is not limited to the following steps:

[0088] S301: If a processing request regarding a first service component sent by a terminal device to a first server is detected, first device information of a proxy server associated with the first server is obtained.

[0089] S302: redirect the processing request according to the first device information to obtain an update processing request.

[0090] S303: Send the update processing request to the first server and the second server.

[0091] S304: Receive a first response message returned by the first server based on the device information in the update processing request, and receive a second response message returned by the second server based on the device information in the update processing request.

[0092] S305: Obtain a test case for testing the first service component.

[0093] It should be noted that the test case may include a complete automated case of the first service component, such as a test case for testing the function, response speed, stability, etc. of the first service component; the test case may also be used to test the effectiveness of the second service component; the test case exists in the test server. Since the test case is a complete automated case of the first service component, the test case can cover all service scenarios, thereby improving the test coverage.

[0094] It is understandable that the proxy server can obtain test cases for testing the first service component from the test server, and there is no need to write test cases separately for the second service component again, which can improve the utilization of test cases, reduce testing costs, and improve testing efficiency.

[0095] S306: Send the test case to the first server and the second server.

[0096] It can be explained that the proxy server forwards the acquired test case to the first server and the second server respectively.

[0097] S307: Receive a first test result returned by the first server and a second test result returned by the second server.

[0098] It can be explained that the first server can test the first service component in a simulation scenario based on the above test case to obtain a first test result; the second server can test the second service component in a simulation scenario based on the above test case to obtain a second test result; the simulation scenario refers to the test scenario corresponding to the test case. The first server and the second server can send the first test result and the second test result to the proxy server respectively, and the proxy server can receive the first test result and the second test result.

[0099] S308. Test the validity of the second service component according to the first test result, the second test result, the first response message, and the second response message.

[0100] Optionally, the step S308 includes: determining a first similarity between the first response message and the second response message; determining a second similarity between the first test result and the second test result. If the first similarity is greater than a first similarity threshold, and the second similarity is greater than a second similarity threshold, then the second service component is determined to be valid; if the first similarity is less than or equal to the first similarity threshold, or the second similarity is less than or equal to the second similarity threshold, then the second service component is determined to be invalid.

[0101] It is understandable that the proxy server can determine the first similarity between the first response message and the second response message based on the first response message and the second response message; the first similarity is greater than the first similarity threshold, indicating that the second service component is effective in the real scenario; if the first similarity is less than or equal to the first similarity threshold, it indicates that the second service component is not effective in the real scenario. The proxy server can perform an automated message comparison between the first test result and the second test result to determine the second similarity between the first test result and the second test result; the second similarity is greater than the second similarity threshold, indicating that the second service component is effective in the simulated scenario; if the second similarity is less than or equal to the second similarity threshold, it indicates that the second service component is not effective in the simulated scenario. Therefore, if the first similarity is greater than the first similarity threshold and the second similarity is greater than the second similarity threshold, it is determined that the second service component is effective; if the first similarity is less than or equal to the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, it is determined that the second service component is not effective.

[0102] For example: the first similarity threshold is 90%, the first similarity is 91%, the second similarity threshold is 95%, and the second similarity is 97%. Since the first similarity is greater than the first similarity threshold and the second similarity is greater than the second similarity threshold, the behavior exposed to the outside by the second service component is consistent with that of the first service component, and the second service component is determined to be effective, thereby ensuring the quality and stability of the second server.

[0103] In the present application, the proxy server can test the validity of the second service component according to the first test result and the second test result, and obtain the test result of the second service component in the simulated scenario, and the test result of the second service component in the simulated scenario reflects whether the second service component is valid or not in the simulated scenario. The validity of the second service component can be tested according to the first response message and the second response message, and the test result of the second service component in the real scenario is obtained, and the test result of the second service component in the real scenario reflects whether the second service component is valid or not in the real scenario. According to the test result of the second service component in the simulated scenario and the test result in the real scenario, the validity of the second service component is determined, such as when the second service component is valid in both the simulated scenario and the real scenario, the second service component is determined to be valid, and when the second service component is not valid in the simulated scenario and / or the real scenario, the second service component is determined to be not valid. By determining the validity of the second service component according to the test result of the second service component in the simulated scenario and the test result in the real scenario, it is conducive to improving the comprehensiveness of the test of the second service component and improving the accuracy of the test.

[0104] Figure 4 : is a flow chart of another test method provided in the embodiment of the present application. The test method includes but is not limited to the following steps:

[0105] S401: If a processing request regarding a first service component sent by a terminal device to a first server is detected, first device information of a proxy server associated with the first server is obtained.

[0106] S402: redirect the processing request according to the first device information to obtain an update processing request.

[0107] S403: Send the update processing request to the first server and the second server.

[0108] S404: Receive a first response message returned by the first server based on the device information in the update processing request, and receive a second response message returned by the second server based on the device information in the update processing request.

[0109] S405: Obtain static data and operation data of the second service component in the second server.

[0110] It should be noted that the static data may include the code in the second service component; the running data may include running information for detecting the second service component. For example, the update processing request is a registration request, and the running information may be that after the second server receives the registration request, the second server calls the second service component to verify S406 based on the user information in the registration request, and parses the static data to obtain the configuration file of the second service component.

[0111] It is understandable that the configuration file of the second service component can be obtained by disassembling and analyzing the above-mentioned static data through static analysis. Static analysis includes analyzing code and configuration files. The above-mentioned static analysis tool is used to detect possible problems in the service reconstruction process by analyzing code and configuration files, such as: interface incompatibility and configuration errors.

[0112] S407: Analyze the operation data to obtain the operation status of the second service component.

[0113] It is understandable that the operation status of the second service component can be obtained by disassembling and analyzing the above operation data through dynamic analysis. For example, after the second server receives the registration request, the second server calls the second service component to verify according to the user information in the registration request, so the operation status of the second service component is normal operation. The above dynamic analysis is used to detect possible problems in the service reconstruction process, such as performance problems and security problems, by detecting the operation information of the service.

[0114] S408. Test the validity of the second service component according to the configuration file, the running status, the first response message and the second response message.

[0115] Optionally, the step S408 includes: determining a first similarity between the first response message and the second response message; determining a third similarity between the configuration file and a standard configuration file of the second service component; if the first similarity is greater than a first similarity threshold, and the third similarity is greater than a third similarity threshold, and the running state of the second service component is normal, then determining that the second service component is valid; if the first similarity is less than or equal to the first similarity threshold, or the third similarity is less than or equal to the third similarity threshold, or the running state of the second service component is abnormal, then determining that the second service component is not valid.

[0116] It should be noted that the standard configuration file is used to indicate the configuration information that the second service component should have in the simulation state, for example: the interface information of the second service component in the simulation state.

[0117] It is understandable that the proxy server can determine the first similarity between the first response message and the second response message according to the first response message and the second response message; the first similarity is greater than the first similarity threshold, indicating that the second service component is effective in the real scenario; if the first similarity is less than or equal to the first similarity threshold, it indicates that the second service component is not effective in the real scenario. The proxy server can compare the configuration file with the standard configuration file of the second service component to determine the third similarity between the configuration file and the standard configuration file of the second service component. The third similarity is greater than the third similarity threshold, indicating that the second service component is effective in the static analysis scenario; if the third similarity is less than or equal to the third similarity threshold, it indicates that the second service component is not effective in the static analysis scenario. According to the running state, the proxy server tests the effectiveness of the second service component; the running state of the second service component is normal, indicating that the second service component is effective in the dynamic analysis scenario; if the running state of the second service component is abnormal, it indicates that the second service component is not effective in the dynamic analysis scenario. Therefore, the proxy server can determine the effectiveness of the second service component according to the first similarity, the third similarity and the running state of the second service component. For example: the first similarity threshold is 90%, the first similarity is 91%, the third similarity threshold is 90%, the third similarity is 93%, and the running state of the second service component is normal. Since the first similarity is greater than the first similarity threshold, the third similarity is greater than the third similarity threshold, and the running state of the second service component is normal, it is determined that the second service component is valid, thereby ensuring the quality and stability of the second server.

[0118] In the present application, the proxy server can test the validity of the second service component according to the configuration file and the standard configuration file of the second service component, and obtain the test result of the second service component in the static analysis scenario, and the test result of the second service component in the static analysis scenario reflects the validity or ineffectiveness of the second service component in the static analysis scenario. The validity of the second service component can be tested according to the running status of the second service component, and the test result of the second service component in the dynamic analysis scenario can be obtained, and the test result of the second service component in the dynamic analysis scenario can reflect the validity or ineffectiveness of the second service component in the dynamic analysis scenario. The validity of the second service component can be tested according to the first response message and the second response message, and the test result of the second service component in the real scenario can be obtained, and the test result of the second service component in the real scenario reflects the validity or ineffectiveness of the second service component in the real scenario. The validity of the second service component is determined based on the test results of the second service component in the static analysis scenario, the test results in the dynamic analysis scenario, and the test results in the real scenario. For example, when the second service component is valid in the static analysis scenario, the dynamic analysis scenario, and the real scenario, the second service component is determined to be valid. When the second service component is not valid in the static analysis scenario and / or in the dynamic analysis scenario and / or in the real scenario, the second service component is determined to be not valid. By determining the validity of the second service component based on the test results of the second service component in the static analysis scenario, the test results in the dynamic analysis scenario, and the test results in the real scenario, it is beneficial to improve the comprehensiveness of the test of the second service component and improve the test accuracy.

[0119] See also Figure 5 , is a schematic diagram of the structure of a test device provided in an embodiment of the present application. Figure 5 As shown, the test device may include:

[0120] If a processing request for a first service component sent by a terminal device to a first server is detected, an acquisition module 511 is used to acquire first device information of a proxy server associated with the first server;

[0121] A redirection module 512, configured to redirect the processing request according to the first device information to obtain an update processing request;

[0122] The sending module 513 is used to send the update processing request to the first server and the second server; the second server is a server that provides a second service component, and the second service component is obtained by updating the first service component;

[0123] The receiving module 514 is used to receive a first response message returned by the first server based on the device information in the update processing request, and to receive a second response message returned by the second server based on the device information in the update processing request; the first response message is generated by the first server calling the first service component based on the update processing request; the second response message is generated by the second server calling the second service component based on the update processing request;

[0124] A testing module 515, configured to test the validity of the second service component according to the first response message and the second response message;

[0125] The sending module 513 is further configured to send the first response message to the terminal device.

[0126] Optionally, the testing module 515 tests the validity of the second service component according to the first response message and the second response message, including:

[0127] The testing module 515 determines a first similarity between the first response message and the second response message;

[0128] If the first similarity is less than or equal to the first similarity threshold, the testing module 515 determines that the second service component is not valid.

[0129] Optionally, the testing module 515 tests the validity of the second service component according to the first response message and the second response message, including:

[0130] The acquisition module 511 acquires a test case for testing the first service component;

[0131] The sending module 513 sends the test case to the first server and the second server; the first server is used to test the first service component based on the test case to obtain a first test result; the second server is used to test the second service component based on the test case to obtain a second test result;

[0132] The receiving module 514 receives the first test result returned by the first server and the second test result returned by the second server;

[0133] The testing module 515 tests the validity of the second service component according to the first test result, the second test result, the first response message and the second response message.

[0134] Optionally, the testing module 515 tests the validity of the second service component according to the first test result, the second test result, the first response message, and the second response message, including:

[0135] The testing module 515 determines a first similarity between the first response message and the second response message;

[0136] The testing module 515 determines a second similarity between the first test result and the second test result;

[0137] If the first similarity is less than or equal to the first similarity threshold, or the second similarity is less than or equal to the second similarity threshold, the testing module 515 determines that the second service component is not valid.

[0138] Optionally, the testing module 515 tests the validity of the second service component according to the first response message and the second response message, including:

[0139] The acquisition module 511 acquires static data and operation data of the second service component in the second server;

[0140] The testing module 515 parses the static data to obtain a configuration file of the second service component;

[0141] The testing module 515 analyzes the operation data to obtain the operation status of the second service component;

[0142] The testing module 515 tests the validity of the second service component according to the configuration file, the running status, the first response message and the second response message.

[0143] Optionally, the testing module 515 tests the validity of the second service component according to the configuration file, the running status, the first response message and the second response message, including:

[0144] The testing module 515 determines a first similarity between the first response message and the second response message;

[0145] The testing module 515 determines a third similarity between the configuration file and a standard configuration file of the second service component;

[0146] If the first similarity is less than or equal to the first similarity threshold, or the third similarity is less than or equal to the third similarity threshold, or the operating state of the second service component is abnormal, the test module 515 determines that the second service component is not valid.

[0147] Optionally, the testing module 515 tests the validity of the second service component according to the first response message and the second response message, including:

[0148] The sending module 513 sends the first response message and the second response message to the test server, and the test server is used to test the validity of the second service component according to the first response message and the second response message, and generate a test report on the second service component.

[0149] Optionally, the processing request includes the second device information of the terminal device, and the redirection module 512 redirects the processing request according to the first device information to obtain an update processing request, including:

[0150] The redirection module 512 replaces the second device information in the processing request with the first device information to obtain an update processing request.

[0151] On one hand, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are executed.

[0152] In this application, when the terminal device sends a processing request to the server (i.e., the first server) corresponding to the old service component (i.e., the first service component), the sending request is intercepted by the proxy server to generate an update processing request, and the update processing request is sent to the servers corresponding to the new and old service components. The response messages returned by the servers corresponding to the new and old service components are received based on the update processing request, and the validity of the new service component (i.e., the second service component) is tested based on the response messages returned by the two servers, and the response message returned by the server corresponding to the old service component is sent to the terminal device. The response message is the information returned by the servers corresponding to the new and old service components based on the real processing request. Therefore, the new service component is tested through the response message, so that the test process is closer to the real use scenario of the new service component, and the test accuracy is improved; the test process does not require manual participation, and the automatic test of the new service component can be realized, thereby improving the test efficiency. In addition, during the test process, there is no need to interrupt the processing request of the terminal device, that is, normal services can be provided to the terminal device, and the test process is imperceptible to the terminal device. In other words, the test process does not need to interfere with the user, thereby improving the test experience.

[0153] See also Figure 6 , is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 6As shown, the above-mentioned computer device 600 may refer to a server or a terminal, including: a processor 601, a network interface 604 and a memory 605. In addition, the above-mentioned computer device 600 may also include: a user interface 603, and at least one communication bus 602. Among them, the communication bus 602 is used to realize the connection and communication between these components. Among them, in some embodiments, the user interface 603 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 603 may also include a standard wired interface and a wireless interface. The network interface 604 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 605 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile Memory), such as at least one disk storage. The memory 605 may optionally also be at least one storage device away from the aforementioned processor 601. As Figure 6 As shown, the memory 605 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a computer program.

[0154] exist Figure 6 In the computer device 600 shown, the network interface 604 can provide a network communication function; the user interface 603 is mainly used to provide an input interface; and the processor 601 can be used to call a computer program stored in the memory 605 to execute:

[0155] If a processing request for a first service component sent by a terminal device to a first server is detected, first device information of a proxy server associated with the first server is obtained;

[0156] According to the first device information, the processing request is redirected to obtain an update processing request;

[0157] Sending the update processing request to the first server and the second server; the second server is a server that provides a second service component, and the second service component is obtained by updating the first service component;

[0158] Receiving a first response message returned by the first server based on the device information in the update processing request, and receiving a second response message returned by the second server based on the device information in the update processing request; the first response message is generated by the first server calling the first service component based on the update processing request; the second response message is generated by the second server calling the second service component based on the update processing request;

[0159] According to the first response message and the second response message, the validity of the second service component is tested, and the first response message is sent to the terminal device.

[0160] Optionally, the processor 601 may be configured to call a computer program stored in the memory 605 to execute, according to the first response message and the second response message, testing the validity of the second service component, including:

[0161] Determining a first similarity between the first response message and the second response message;

[0162] If the first similarity is less than or equal to the first similarity threshold, it is determined that the second service component is not valid.

[0163] Optionally, the processor 601 may be configured to call a computer program stored in the memory 605 to execute, according to the first response message and the second response message, testing the validity of the second service component, including:

[0164] Obtaining a test case for testing the first service component;

[0165] Sending the test case to the first server and the second server; the first server is used to test the first service component based on the test case to obtain a first test result; the second server is used to test the second service component based on the test case to obtain a second test result;

[0166] Receiving the first test result returned by the first server and the second test result returned by the second server;

[0167] The validity of the second service component is tested based on the first test result, the second test result, the first response message and the second response message.

[0168] Optionally, the processor 601 may be configured to call a computer program stored in the memory 605 to execute, according to the first test result, the second test result, the first response message, and the second response message, testing the validity of the second service component, including:

[0169] Determining a first similarity between the first response message and the second response message;

[0170] Determining a second similarity between the first test result and the second test result;

[0171] If the first similarity is less than or equal to the first similarity threshold, or the second similarity is less than or equal to the second similarity threshold, it is determined that the second service component is not valid.

[0172] Optionally, the processor 601 may be configured to call a computer program stored in the memory 605 to execute, according to the first response message and the second response message, testing the validity of the second service component, including:

[0173] Obtaining static data and running data of the second service component in the second server;

[0174] Parsing the static data to obtain a configuration file of the second service component;

[0175] Parsing the operation data to obtain the operation status of the second service component;

[0176] The validity of the second service component is tested according to the configuration file, the running status, the first response message and the second response message.

[0177] Optionally, the processor 601 may be configured to call a computer program stored in the memory 605 to execute, according to the configuration file, the running state, the first response message, and the second response message, testing the validity of the second service component, including:

[0178] Determining a first similarity between the first response message and the second response message;

[0179] determining a third similarity between the configuration file and a standard configuration file of the second service component;

[0180] If the first similarity is less than or equal to the first similarity threshold, or the third similarity is less than or equal to the third similarity threshold, or the operating state of the second service component is abnormal, it is determined that the second service component is not valid.

[0181] Optionally, the processor 601 may be configured to call a computer program stored in the memory 605 to execute, according to the first response message and the second response message, testing the validity of the second service component, including:

[0182] The first response message and the second response message are sent to a test server, and the test server is used to test the validity of the second service component according to the first response message and the second response message, and generate a test report on the second service component.

[0183] Optionally, the processing request includes the second device information of the terminal device, and the processor 601 may be used to call a computer program stored in the memory 605 to execute redirection processing on the processing request according to the first device information to obtain an update processing request, including:

[0184] The second device information in the processing request is replaced with the first device information to obtain an updated processing request.

[0185] On the one hand, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are executed. In the present application, when a terminal device sends a processing request to a server (i.e., a first server) corresponding to an old service component (i.e., a first service component), the sending request is intercepted by a proxy server to generate an update processing request, and the update processing request is sent to the servers corresponding to the new and old service components, respectively. The response message returned by the servers corresponding to the new and old service components based on the update processing request is received, and based on the response messages returned by the two servers, the validity of the new service component (i.e., the second service component) is tested, and the response message returned by the server corresponding to the old service component is sent to the terminal device. The response message is the information returned by the servers corresponding to the new and old service components based on the real processing request. Therefore, the new service component is tested through the response message, so that the test process is closer to the real use scenario of the new service component, and the test accuracy is improved; the test process does not require manual participation, and the automated test of the new service component can be realized, thereby improving the test efficiency. In addition, during the test process, there is no need to interrupt the processing request of the terminal device, that is, normal services can be provided to the terminal device, and the test process is imperceptible to the terminal device. In other words, the test process does not need to interfere with the user, thereby improving the test experience.

[0186] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the description of the data processing method in the corresponding embodiment above, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0187] As an example, the above program instructions may be deployed on a computer device for execution, or deployed on at least two computer devices at one location for execution, or executed on at least two computer devices distributed at at least two locations and interconnected through a communication network. At least two computer devices distributed at at least two locations and interconnected through a communication network may constitute a blockchain network.

[0188] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the central storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMART Media card, SMC), a secure digital (Secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the central storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0189] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish between contents in different media, rather than to describe a specific order. In addition, the terms "including" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other step units inherent to these processes, methods, devices, products, or equipment.

[0190] The data collection and processing in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0191] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the description of the above-mentioned data processing method and decoding method in the corresponding embodiment above, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the embodiment of the computer program product involved in the present application, please refer to the description of the method embodiment of the present application.

[0192] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0193] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable network connection device to generate a machine, so that the instructions executed by the processor of the computer or other programmable network connection device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable network-connected device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable network connected device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.

[0194] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A testing method, characterized in that: include: If a processing request regarding a first service component sent by a terminal device to a first server is detected, first device information of a proxy server associated with the first server is obtained; redirecting the processing request according to the first device information to obtain an update processing request; sending the update processing request to the first server and the second server; The second server is a server that provides a second service component, and the second service component is obtained by updating the first service component; receiving a first response message returned by the first server based on the device information in the update processing request, and receiving a second response message returned by the second server based on the device information in the update processing request; The first response message is generated by the first server calling the first service component based on the update processing request; The second response message is generated by the second server calling the second service component based on the update processing request; The validity of the second service component is tested according to the first response message and the second response message, and the first response message is sent to the terminal device.

2. The method according to claim 1, characterized in that The testing the validity of the second service component according to the first response message and the second response message includes: determining a first similarity between the first response message and the second response message; If the first similarity is less than or equal to the first similarity threshold, it is determined that the second service component is not valid.

3. The method according to claim 1, characterized in that The testing the validity of the second service component according to the first response message and the second response message includes: Obtaining a test case for testing the first service component; Sending the test case to the first server and the second server; the first server is used to test the first service component based on the test case to obtain a first test result; the second server is used to test the second service component based on the test case to obtain a second test result; receiving the first test result returned by the first server and the second test result returned by the second server; The validity of the second service component is tested based on the first test result, the second test result, the first response message, and the second response message.

4. The method according to claim 3, characterized in that The testing the validity of the second service component according to the first test result, the second test result, the first response message, and the second response message includes: determining a first similarity between the first response message and the second response message; determining a second similarity between the first test result and the second test result; If the first similarity is less than or equal to the first similarity threshold, or the second similarity is less than or equal to the second similarity threshold, it is determined that the second service component is not valid.

5. The method according to claim 1, characterized in that: The testing the validity of the second service component according to the first response message and the second response message includes: Acquire static data and running data of the second service component in the second server; Parsing the static data to obtain a configuration file of the second service component; Parsing the operation data to obtain the operation status of the second service component; The validity of the second service component is tested according to the configuration file, the running status, the first response message and the second response message.

6. The method according to claim 5, characterized in that The testing the validity of the second service component according to the configuration file, the running state, the first response message and the second response message includes: determining a first similarity between the first response message and the second response message; determining a third similarity between the configuration file and a standard configuration file of the second service component; If the first similarity is less than or equal to the first similarity threshold, or the third similarity is less than or equal to the third similarity threshold, or the operating state of the second service component is abnormal, it is determined that the second service component is not valid.

7. The method according to claim 1, characterized in that The testing the validity of the second service component according to the first response message and the second response message includes: The first response message and the second response message are sent to a test server, and the test server is used to test the validity of the second service component according to the first response message and the second response message, and generate a test report on the second service component.

8. The method according to claim 1, characterized in that: The processing request includes the second device information of the terminal device, and the redirecting process of the processing request according to the first device information to obtain the update processing request includes: The second device information in the processing request is replaced with the first device information to obtain an updated processing request.

9. A testing device, characterized in that: include: If a processing request regarding a first service component sent by a terminal device to a first server is detected, an acquisition module is used to acquire first device information of a proxy server associated with the first server; A redirection module, used for redirecting the processing request according to the first device information to obtain an update processing request; A sending module, used for sending the update processing request to the first server and the second server; The second server is a server that provides a second service component, and the second service component is obtained by updating the first service component; a receiving module, configured to receive a first response message returned by the first server based on the device information in the update processing request, and to receive a second response message returned by the second server based on the device information in the update processing request; The first response message is generated by the first server calling the first service component based on the update processing request; The second response message is generated by the second server calling the second service component based on the update processing request; A testing module, configured to test the validity of the second service component according to the first response message and the second response message; The sending module is further used to send the first response message to the terminal device.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are performed.