Parallel test method and device, equipment, storage medium and program product

Through the parallel testing method, the sliding window technology is used to adjust the interactive data transmission rate in real time to realize the automation of online transaction testing, solve the problem of low manual testing efficiency, and improve the testing efficiency and the stability of the production server.

CN118779240APending Publication Date: 2024-10-15CHINA UNIONPAY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410989719.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing online transaction testing is mainly performed manually, resulting in high labor costs and low testing efficiency, and cannot meet the strict requirements for functional integrity and availability of the upgraded device.

Method used

Provide a parallel testing method that obtains interaction information from the production server by responding to test requests, determines the sliding window size based on the interaction information, obtains interaction data and performs automatic testing, adjusts the sliding window size in real time to synchronize data transmission, and realizes production server and test server real-time synchronization between

Benefits of technology

It improves testing efficiency, ensures the stability and accuracy of the production server's business response, reduces the need for manual intervention, and reduces upgrade risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779240A_ABST
    Figure CN118779240A_ABST
Patent Text Reader

Abstract

The invention provides a parallel test method and device, equipment, a storage medium and a program product, and relates to the technical field of computers, and the parallel method comprises the steps: obtaining interaction information from a production server in response to a test request; under the constraint of the available cache space, determining the window size of the sliding window based on the interaction information; obtaining interaction data received by the production server from the production server by adopting a sliding window, and storing the interaction data as to-be-tested data in an available cache space; and obtaining a parallel test result based on the to-be-tested data. According to the invention, real-time synchronization of receiving the interaction data by the production server and acquiring the to-be-tested data by the test server can be realized; the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a parallel testing method, apparatus, device, storage medium and program product. Background Art

[0002] In order to meet the stringent requirements for the stability and reliability of online trading devices, reduce the potential risks brought by device upgrades, and ensure the functional integrity and availability of upgraded devices, the standard practice is to implement online parallel testing before upgrading.

[0003] However, online transaction testing is usually performed manually, which results in high labor costs and low testing efficiency. Summary of the invention

[0004] The present application provides a parallel testing method, apparatus, device, storage medium and program product to solve the problem of low testing efficiency in the prior art.

[0005] In a first aspect, the present application provides a parallel testing method, applied to a testing server, the method comprising:

[0006] Responding to the test request, obtaining interaction information from the production server;

[0007] Under the constraint of available cache space, determining a window size of the sliding window based on the interaction information;

[0008] The sliding window is used to obtain the interaction data received by the production server from the production server, and the interaction data is stored in the available cache space as the data to be tested;

[0009] Based on the data to be tested, a parallel test result is obtained.

[0010] In one of the embodiments, the sliding window includes an initial sliding window and an adjustment sliding window;

[0011] The determining the window size of the sliding window based on the interaction information includes:

[0012] Based on the interaction information obtained for the first time, adjusting the window size of the initial sliding window to obtain the adjusted sliding window;

[0013] Based on the interaction information obtained for the nth time, the window size of the adjustment sliding window determined based on the interaction information obtained for the (n-1)th time is adjusted to obtain a new adjustment sliding window.

[0014] In one of the embodiments, determining the window size of the sliding window based on the interaction information includes:

[0015] Matching a target flow range corresponding to the interaction information from at least one pre-set flow range;

[0016] Based on the target flow range, a window size of the sliding window is determined.

[0017] In one of the embodiments, before determining the window size of the sliding window based on the interaction information under the constraint of the available cache space, the method further includes:

[0018] Get the usage status information of the cache;

[0019] When the usage status information indicates that the usage rate of the cache reaches a preset threshold, acquiring the extended cache space, and determining the available cache space based on the extended cache space and the remaining space of the cache;

[0020] When the usage status information indicates that the usage rate of the cache has not reached a preset threshold, the available cache space is determined based on the remaining space of the cache.

[0021] In one embodiment, the method further comprises:

[0022] Obtaining a response result generated by the production server for the interaction data;

[0023] The obtaining of parallel test results based on the data to be tested includes:

[0024] Processing the data to be tested in the available cache space based on a preset test script to obtain at least one test case sorted in sequence;

[0025] Execute the test cases in sequence and obtain the test results corresponding to each test case;

[0026] Comparing the test result with the response result to obtain a comparison result;

[0027] The comparison result and the test result are used as the parallel test result.

[0028] In one embodiment, after obtaining the test results corresponding to each of the test cases, the method further includes:

[0029] The test case corresponding to the test result in the available cache space is deleted to update the remaining space of the cache.

[0030] In one embodiment, the method further comprises:

[0031] Obtain operation status information according to the preset detection frequency;

[0032] When the running status information indicates that the test status is abnormal, the online status is switched to the offline status; and the acquisition of the interaction data from the production server is stopped.

[0033] In one embodiment, after switching from the online state to the offline state, the method further includes:

[0034] When the running status information indicates that the test status is normal, the offline status is switched to the online status; and the acquisition of the interaction data from the production server is resumed.

[0035] In one embodiment, after switching from the online state to the offline state, the method further includes:

[0036] Determine the test cases to be recovered in the available cache space;

[0037] After switching from the offline state to the online state, the method further includes:

[0038] Continue to execute the test case to be recovered.

[0039] In one embodiment, the step of obtaining the interaction data received by the production server from the production server and storing the interaction data as the test data in the available cache space further includes:

[0040] Using a preset dot rule, at least one counting point is set in the data to be tested in a sequential order;

[0041] The step of determining the test cases to be recovered in the available cache space includes:

[0042] The test case at the counting point that is ranked the highest in the available cache space is used as the test case to be recovered;

[0043] The continuing to execute the test case to be recovered includes:

[0044] Using the unexecuted counting points in the test case to be recovered as positioning counting points;

[0045] Taking the counting point before the positioning counting point as the starting point, continue to execute the test case to be recovered.

[0046] In a second aspect, the present application also provides a parallel testing device, comprising:

[0047] A response module, used to obtain interaction information from a production server in response to a test request;

[0048] A determination module, configured to determine a window size of a sliding window based on the interaction information under the constraint of available cache space;

[0049] A storage module, used to use the sliding window to obtain the interaction data received by the production server from the production server, and store it in the available cache space as data to be tested;

[0050] The acquisition module is used to acquire the parallel test results based on the data to be tested.

[0051] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the parallel testing method described in any of the above embodiments is implemented.

[0052] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the parallel testing method described in any of the above embodiments.

[0053] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program product is executed by a processor, implements the parallel testing method described in any of the above embodiments.

[0054] The above-mentioned parallel testing method, apparatus, equipment, storage medium and program product can monitor the interaction-related information of the production server when receiving a test request, and adjust the size of the sliding window in real time based on the interaction-related information of the production server and the available space cached in the test server, thereby being able to adjust the rate of obtaining interaction data from the production server in real time, realizing real-time synchronization of the production server receiving interaction data and the test server obtaining data to be tested, and through joint automatic testing of the production side and the test side, improving the test efficiency and ensuring the stability and accuracy of the business response of the production server. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0056] Figure 1 An application environment diagram of a parallel testing method in an embodiment;

[0057] Figure 2 A schematic diagram of a parallel testing method in one embodiment;

[0058] Figure 3 A schematic diagram of a parallel testing method according to another embodiment;

[0059] Figure 4 is a flow chart of a parallel testing method in yet another embodiment;

[0060] Figure 5 A schematic diagram of the structure of a parallel testing device in one embodiment;

[0061] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment.

[0062] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0063] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0064] The parallel testing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the production server 102 and the test server 104 can communicate through the network.

[0065] For example, the parallel testing method is applied to the test server 104, and the test server 104 can receive the test request through the external terminal, and obtain the interaction information from the production server 102 based on the test request; then the test server 104 determines the window size of the sliding window based on the interaction information under the constraint of the available cache space; further adopts the sliding window to obtain the interaction data received by the production server 102 from the production server 102, and stores it in the available cache space as the data to be tested; finally, based on the data to be tested, the parallel test results are obtained. The production server 102 and the test server 104 can be directly or indirectly connected through wired or wireless communication, such as through a network connection.

[0066] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0067] In one embodiment, a parallel testing method is provided. This embodiment uses the parallel testing method applied to the test server 104 as an example for illustration. It is understandable that the parallel testing method can also be applied to an additional server and implemented through the interaction between the server and the production server 102 and the test server 104. Figure 2 As shown, the parallel testing method includes:

[0068] Step 202: In response to the test request, obtain interaction information from the production server.

[0069] A test request is a request for online parallel testing of a specific application.

[0070] As an example, the test request may be issued by a tester through a fixed component on a human-computer interaction interface of a terminal connected to a production server, wherein the fixed component may refer to a pre-built page or applet.

[0071] The test server may be pre-communicated with at least one server to be tested. Accordingly, the test request may carry an identity tag, for example. The identity tag may be composed of at least one of letters, characters or numbers. The identity tag is used to uniquely refer to a server. After receiving the test request, the test server may obtain a mapping relationship between a pre-stored identity tag and at least one server from a data storage system. Alternatively, the test server may obtain a mapping relationship between a pre-stored identity tag and at least one server from a data storage system according to a preset update frequency and store the mapping relationship in a cache of the test server.

[0072] It is understandable that the data storage system may be an independent storage device, or the data storage system may be located on the test server, or the data storage system may be located on another server that is communicatively connected to the test server.

[0073] After receiving the test request, the test server can match the corresponding server as the production server from the mapping relationship based on the identity tag carried in the test request.

[0074] Alternatively, the test server is connected to only one server. When the test server receives a test request, the only connected server is used as the production server by default.

[0075] The interaction information is used to indicate the response frequency of the production server, and specifically may be the number of transactions per second (TPS) of the production server. The following embodiments are all described using the interaction information as TPS information. It should be noted that the interaction information may also include any other information that may indicate the interaction frequency between the production server and the external business requester, wherein the transaction in the TPS information refers to the process in which the external business requester sends a business request to the production server and the production server responds.

[0076] Step 204: Under the constraint of available cache space, determine the window size of the sliding window based on the interaction information.

[0077] Available cache space refers to the amount of available space on the test server for storing data. Caching is a technology that temporarily stores frequently used data in the memory or disk of the test server to increase the data reading speed. However, when the cache space on the test server is fully utilized, the response speed of the test server may be affected.

[0078] Sliding windows are often used to manage data transmission, such as in the Transmission Control Protocol (TCP). Sliding windows allow the sender to continue sending subsequent data without receiving an acknowledgment from the receiver.

[0079] The size of the sliding window has a great impact on the data transmission process between the test server and the production server: the size of the sliding window determines the number of data segments that the production server can send continuously. A larger sliding window can improve the efficiency of data transmission and reduce the time the test server waits for confirmation, thereby transmitting data to the test server faster; a smaller sliding window will increase the delay in the transmission process. If the sliding window is too small, the production server needs to frequently wait for the confirmation signal from the test server, resulting in increased transmission delay and affecting transmission efficiency; the size of the sliding window can also be used to control the traffic between the production server and the test server. A smaller sliding window can control the transmission speed of the production server to avoid the test server being unable to process due to the production server sending too fast; if the sliding window is too large, it may cause network congestion and affect transmission performance. Therefore, when setting the sliding window size, it is necessary to comprehensively consider factors such as network conditions, bandwidth, and delay.

[0080] Step 206: Use a sliding window to obtain the interaction data received by the production server from the production server, and store it in the available cache space as data to be tested.

[0081] Interaction data refers to the actual relevant content of the business request sent by the external business requester to the production server. It is used to refer to the nature of the interaction between the business requester and the production server and the specific business needs. The interaction data may include, for example, the type of interaction request, such as information query, virtual resource transfer, etc.; the initiation time of the interaction request; the specific data of the virtual resources corresponding to the interaction request, etc.; a combination of various request parameters, including required parameters, optional parameters, parameter length, data format, etc.; request path, request status, request frequency and other information. It should be noted that this application does not limit the content of the specific interaction data. The test server in this application can generate comprehensive and effective test data based on the collected interaction data to cover various business requests that the production server may receive.

[0082] The interactive data may be transmitted to the test server in the form of a message.

[0083] Step 208: Obtain parallel test results based on the data to be tested.

[0084] In this embodiment, the test server can, for example, be pre-configured with a test script, which includes test environment parameters and test logic. After the test server obtains the data to be tested, it can generate test cases based on the data to be tested and the test logic, and then configure the test environment according to the test environment parameters included in the test script, and execute the generated test cases in the test environment to obtain parallel test results.

[0085] In the above-mentioned parallel testing method, the test server can monitor the interactive response frequency of the production server when receiving the test request, and adjust the size of the sliding window in real time based on the interactive response frequency of the production server and the available space of the cache, so as to adjust the rate of obtaining interactive data from the production server in real time, thereby realizing real-time synchronization of the production server receiving interactive data and the test server obtaining the data to be tested.

[0086] In some optional embodiments, step 202 includes:

[0087] Continuously obtain interaction information from the production server at a preset frequency.

[0088] In this embodiment, the test server can generate a collection instruction and send it to the production server at a preset frequency. After receiving the collection instruction, the production server obtains its latest TPS information and packages it to send it to the test server, so that the test server updates the sliding window according to the latest TPS information of the production server to ensure that the size change of the sliding window can correspond to the response fluctuations in the actual interactive environment of the production server.

[0089] In some optional embodiments, the sliding window includes an initial sliding window and an adjustment sliding window;

[0090] Step 204 includes:

[0091] Based on the interactive information obtained for the first time, the window size of the initial sliding window is adjusted to obtain an adjusted sliding window;

[0092] Based on the interaction information obtained for the nth time, the window size of the adjustment sliding window determined based on the interaction information obtained for the (n-1)th time is adjusted to obtain a new adjustment sliding window.

[0093] Here, n is a natural number greater than 1.

[0094] The window size of the initial sliding window may be preset according to the needs of the staff, and the window size of the sliding window may be expressed in terms of the number of bytes that can be accommodated.

[0095] In this embodiment, the test server can adjust the size of the sliding window according to the TPS information continuously collected at a preset frequency. It can be understood that the test server triggers the adjustment of the sliding window every time it receives TPS information.

[0096] In some optional embodiments, step 204 includes:

[0097] Matching a target flow range corresponding to the interaction information from at least one pre-set flow range;

[0098] Based on the target traffic range, the window size of the sliding window is determined.

[0099] In this embodiment, at least one traffic range can, for example, have a mapping relationship pre-established with at least one capacity value. Each time the test server receives TPS information, it can compare the latest received TPS information with at least one traffic range, and use the traffic range that the latest received TPS information matches as the target traffic range. Further, based on the mapping relationship, the capacity value corresponding to the target traffic range is used as the latest window size of the sliding window.

[0100] Alternatively, the test server may detect the difference between any adjacent TPS information in any continuous t TPS information. If each difference is less than a preset threshold, it can be understood that the interaction frequency of the production server changes little. At this time, the test server may not adjust the sliding window to avoid wasting resources. Where t can be greater than or equal to 2.

[0101] like Figure 3 As shown, in some optional embodiments, before step 204, the method further includes:

[0102] Step 2031, obtaining cache usage status information;

[0103] Step 2032: when the usage status information indicates that the usage rate of the cache reaches a preset threshold, obtain the extended cache space, and determine the available cache space based on the extended cache space and the remaining cache space;

[0104] Step 2033: When the usage status information indicates that the usage rate of the cache has not reached a preset threshold, the available cache space is determined based on the remaining space of the cache.

[0105] The cache usage status information usually includes the following: Cache Hit Rate: indicates the proportion of cached data in the cache that is successfully found in the request. A high cache hit rate usually means high cache utilization; Cache Miss Rate: indicates the proportion of requests that fail to successfully find the required data in the cache; Cache Usage: indicates the proportion of the current cache space occupied, which can be used to evaluate whether the cache capacity is sufficient and whether it needs to be expanded; Cache Eviction Rate: indicates the proportion of cache data that is eliminated due to insufficient cache space... and other information that can be used to characterize the specific usage of the cache in the test server.

[0106] In this embodiment, for example, the cache usage rate in the cache information is used. When the cache usage rate reaches a preset threshold, it can be considered that the cache capacity in the test server is too small and needs to be expanded. The expanded cache space obtained after the expansion and the original remaining space in the cache are used as the available cache space of the test server. When the cache usage rate does not reach the preset threshold, it can be considered that the cache capacity in the test server is large and does not require additional expansion. At this time, the capacity in the cache can be directly used as the available cache space.

[0107] Specifically, the method for the test server to expand the cache capacity may include: requesting dynamic memory allocation: the test server may dynamically apply for additional memory space through an API to expand the cache; converting the hard disk space of the disk into part of the virtual memory: the test server may use virtual memory technology to temporarily use the hard disk space of the disk as virtual content to store data. When the physical memory is insufficient, part of the cached data may be temporarily stored on the hard disk; allocating memory blocks from a maintained memory pool: the test server may maintain a standby memory pool in advance, and when the cache capacity needs to be expanded, memory blocks may be allocated from the memory pool; migrating data through distributed nodes to expand the cache capacity: the test server may include multiple interconnected host devices. For example, host device A may be used to execute the parallel testing method in the present application, and host device B may perform actual testing on the data to be tested stored in the cache of host device A... When the cache capacity of host device A is insufficient, the newly received data to be tested may be dynamically and temporarily migrated to the cache of host device B, thereby emptying the cache in host device A to achieve the expansion of the cache capacity. In this method, the test server does not actually expand the cache capacity. The above methods for expanding the cache capacity may be used in combination to meet different testing requirements.

[0108] In some optional embodiments, the parallel testing method further includes:

[0109] Get the response result generated by the production server for the interactive data;

[0110] Step 208 includes:

[0111] Processing the data to be tested in the available cache space based on a preset test script to obtain at least one test case sorted in sequence;

[0112] Execute the test cases in sequence and obtain the test results corresponding to each test case;

[0113] Compare the test result with the response result to obtain a comparison result;

[0114] The comparison results and test results are used as parallel test results.

[0115] In this embodiment, the test script may include test environment parameters and test logic. After the test server obtains the data to be tested, it can generate at least one test case in sequence based on the data to be tested and the test logic. Then, the test environment can be configured according to the test environment parameters included in the test script, and the generated test cases can be executed in sequence in the test environment to obtain the test results.

[0116] Furthermore, after obtaining the test result, the test server can delete the test case corresponding to the test result in the available cache space to update the remaining cache space.

[0117] The test server can also obtain the response result of the production server to the service request issued by the service requester from the production server. The response result can include the specific data content of the production server response, such as text data, image data, video data, etc., and can also include the data processing result based on the service request. By comparing the test result of the test server with the response result of the production server, the accuracy of the simulated response result of the test case in the test server can be obtained.

[0118] The test server in this embodiment uses the comparison results and the test results as the final parallel test results, and can verify and evaluate the response function of the production server, thereby discovering potential defects in the production server, improving the reliability of the production server, and can obtain the difference between the data to be tested in the test server and the data actually running in the production server based on the comparison results.

[0119] like Figure 4 As shown, in some optional embodiments, the parallel testing method further includes:

[0120] Step 402: Obtain operation status information according to a preset detection frequency;

[0121] Step 404: When the running status information indicates that the test status is abnormal, switch from the online status to the offline status; and stop obtaining the interaction data from the production server.

[0122] And after step 404, in step 406, when the running status information indicates that the test status is normal, switching from the offline state to the online state; and resuming obtaining the interaction data from the production server.

[0123] The operating status information is used to characterize the operating status of the test server during the test process. The operating status information may include, for example: response time: if the response time during the test process suddenly increases, this may indicate that there is a performance bottleneck in the test environment or that the test data loading time is too long; error rate: an abnormal increase in the error rate may indicate that there is a problem with the test data, or that the test environment cannot process the input correctly; resource usage: the usage of resources such as CPU, memory, disk I / O, and network bandwidth. If there are abnormal peaks or sustained high loads, it may indicate that the test environment resources in the test server are insufficient; system log: warnings and error messages in the system log can provide direct clues to problems with the test environment or test data; transaction success rate: if the transaction success rate suddenly drops, this may mean that some components of the test environment are not working properly, or that the test data causes system abnormalities. System stability indicators: such as system crashes, restart times, and service unavailability, which are obvious signs of problems in the test environment; performance indicators: including a decrease in performance indicators such as throughput and the number of concurrent users, which may indicate that the test environment cannot support the current load; dependent service status: if the test environment depends on external services (such as databases, API services, etc.), the status and response time of these services are also important monitoring indicators; test coverage: if the test coverage suddenly drops, it may be because the test data fails to cover certain key functions or scenarios; test script execution status: the failure or abnormal termination of the test script may also be a sign of problems in the test environment or test data. By monitoring these data types in real time and setting corresponding thresholds, the test status of the test server can be automatically detected, so that when the test status is abnormal, the test executed in the test server can be quickly converted from an online state to an offline state to ensure the continuity of the test and the integrity of the data in the test case.

[0124] After step 404, the method further includes: determining the test cases to be recovered in the available cache space; correspondingly, after step 406, the method further includes: continuing to execute the test cases to be recovered.

[0125] In some optional embodiments, the parallel testing method further includes:

[0126] Using a preset dot rule, at least one counting point is set in sequence in the data to be tested;

[0127] The steps of determining the test cases to be recovered in the available cache space include:

[0128] The test case with the most forward counting point in the available cache space is used as the test case to be recovered;

[0129] Continue to execute the steps of the test case to be restored, including:

[0130] The unexecuted counting points in the test case to be recovered are used as positioning counting points;

[0131] Taking the counting point before the positioning counting point as the starting point, continue to execute the test case to be recovered.

[0132] After receiving the interaction data corresponding to each interaction request from the production server, the test server can dot the key positions of the interaction data according to the preset dot rules, and update the counters in the current and previous sliding windows at the same time. By dotting the interaction data, more fine-grained traffic tracking and control can be achieved. Specifically, the dot rules can include the preset dot position, dot time and dot method.

[0133] Test cases to be recovered refer to test cases for which test results have not been obtained and the test execution is halfway through.

[0134] The positioning count point is used to locate the specific interruption position in the test case to be recovered to avoid repeated testing.

[0135] In the above parallel testing method, when a test request is received, the interactive response frequency of the production server can be monitored, and before adjusting the window size of the sliding window, the available space in the cache of the test server can be determined first. If the available space is too small, the cache is automatically expanded. Subsequently, based on the interactive response frequency of the production server and the available space of the expanded cache, the size of the sliding window is adjusted in real time, thereby being able to adjust in real time the rate of obtaining interactive data from the production server, thereby achieving real-time synchronization of the production server receiving interactive data and the test server obtaining data to be tested.

[0136] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0137] Based on the same inventive concept, the embodiment of the present application also provides a parallel test device for implementing the parallel test method involved above. The implementation solution provided by the parallel test device to solve the problem is similar to the implementation solution recorded in the above parallel test method, so the specific limitations in one or more parallel test device embodiments provided below can refer to the limitations of the parallel test method above, and will not be repeated here.

[0138] In one embodiment, Figure 5 As shown, a parallel testing device 500 is provided, comprising:

[0139] A response module 502 is used to obtain interaction information from a production server in response to a test request;

[0140] A determination module 504, configured to determine a window size of the sliding window based on the interaction information under the constraint of available cache space;

[0141] The storage module 506 is used to obtain the interaction data received by the production server from the production server by using a sliding window, and store the interaction data as the data to be tested in the available cache space;

[0142] The acquisition module 508 is used to acquire the parallel test results based on the data to be tested.

[0143] In some optional embodiments, the sliding window includes an initial sliding window and an adjustment sliding window;

[0144] The determination module 504 is further configured to:

[0145] Based on the interactive information obtained for the first time, the window size of the initial sliding window is adjusted to obtain an adjusted sliding window;

[0146] Based on the interaction information obtained for the nth time, the window size of the adjustment sliding window determined based on the interaction information obtained for the (n-1)th time is adjusted to obtain a new adjustment sliding window.

[0147] In some optional embodiments, the determination module 504 is further configured to:

[0148] Matching a target flow range corresponding to the interaction information from at least one pre-set flow range;

[0149] Based on the target traffic range, the window size of the sliding window is determined.

[0150] In some optional embodiments, the determination module 504 is further configured to:

[0151] Get the usage status information of the cache;

[0152] When the usage status information indicates that the usage rate of the cache reaches a preset threshold, the extended cache space is acquired, and the available cache space is determined based on the extended cache space and the remaining space of the cache;

[0153] When the usage status information indicates that the usage rate of the cache does not reach a preset threshold, the available cache space is determined based on the remaining space of the cache.

[0154] In some optional embodiments, the acquisition module 508 is further configured to:

[0155] Get the response result generated by the production server for the interactive data;

[0156] and processing the data to be tested in the available cache space based on a preset test script to obtain at least one test case that is sorted in sequence;

[0157] Execute the test cases in sequence and obtain the test results corresponding to each test case;

[0158] Compare the test result with the response result to obtain a comparison result;

[0159] The comparison results and test results are used as parallel test results.

[0160] In some optional embodiments, the acquisition module 508 is further configured to:

[0161] The test cases corresponding to the test results in the available cache space are deleted to update the remaining space of the cache.

[0162] In some optional embodiments, the acquisition module 508 is further configured to:

[0163] Obtain operation status information according to the preset detection frequency;

[0164] When the running status information indicates that the test status is abnormal, the online status is switched to the offline status; and the acquisition of interaction data from the production server is stopped.

[0165] In some optional embodiments, the acquisition module 508 is further configured to:

[0166] When the running status information indicates that the test status is normal, the offline state is switched to the online state; and the acquisition of interaction data from the production server is resumed.

[0167] In some optional embodiments, the acquisition module 508 is further configured to:

[0168] After switching from an online state to an offline state, determine the test cases to be recovered in the available cache space;

[0169] And after switching from an offline state to an online state, continue to execute the test cases to be recovered.

[0170] In some optional embodiments, the storage module 506 is further configured to:

[0171] Using a preset dot rule, at least one counting point is set in sequence in the data to be tested;

[0172] The acquisition module 508 is further configured to:

[0173] The test case with the most forward counting point in the available cache space is used as the test case to be recovered;

[0174] The unexecuted counting points in the test case to be recovered are used as positioning counting points;

[0175] Taking the counting point before the positioning counting point as the starting point, continue to execute the test case to be recovered.

[0176] Each module in the above parallel test device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0177] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a parallel testing method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0178] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0179] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0180] Responding to the test request, obtaining interaction information from the production server;

[0181] Under the constraint of available cache space, the window size of the sliding window is determined based on the interaction information;

[0182] Using a sliding window, the interaction data received by the production server is obtained from the production server and stored in the available cache space as the data to be tested;

[0183] Based on the data to be tested, obtain parallel test results.

[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0185] Continuously obtain interaction information from the production server at a preset frequency.

[0186] In one embodiment, the sliding window includes an initial sliding window and an adjustment sliding window;

[0187] When the computer program is executed by the processor, the following steps are also implemented:

[0188] Based on the interactive information obtained for the first time, the window size of the initial sliding window is adjusted to obtain an adjusted sliding window;

[0189] Based on the interaction information obtained for the nth time, the window size of the adjustment sliding window determined based on the interaction information obtained for the (n-1)th time is adjusted to obtain a new adjustment sliding window.

[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0191] Matching a target flow range corresponding to the interaction information from at least one pre-set flow range;

[0192] Based on the target traffic range, the window size of the sliding window is determined.

[0193] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0194] Get the usage status information of the cache;

[0195] When the usage status information indicates that the usage rate of the cache reaches a preset threshold, the extended cache space is acquired, and the available cache space is determined based on the extended cache space and the remaining space of the cache;

[0196] When the usage status information indicates that the usage rate of the cache does not reach a preset threshold, the available cache space is determined based on the remaining space of the cache.

[0197] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0198] Get the response result generated by the production server for the interactive data;

[0199] and processing the data to be tested in the available cache space based on a preset test script to obtain at least one test case that is sorted in sequence;

[0200] Execute the test cases in sequence and obtain the test results corresponding to each test case;

[0201] Compare the test result with the response result to obtain a comparison result;

[0202] The comparison results and test results are used as parallel test results.

[0203] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0204] The test cases corresponding to the test results in the available cache space are deleted to update the remaining space of the cache.

[0205] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0206] Obtain operation status information according to the preset detection frequency;

[0207] When the running status information indicates that the test status is abnormal, the online status is switched to the offline status; and the acquisition of interaction data from the production server is stopped.

[0208] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0209] When the running status information indicates that the test status is normal, the offline state is switched to the online state; and the acquisition of interaction data from the production server is resumed.

[0210] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0211] After switching from the online state to the offline state, determine the test cases to be recovered in the available cache space;

[0212] After switching from offline state to online state, continue to execute the test cases to be recovered.

[0213] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0214] Using a preset dot rule, at least one counting point is set in sequence in the data to be tested;

[0215] After switching from the online state to the offline state, the test case with the most forward counting point in the available cache space is used as the test case to be restored;

[0216] After switching from the offline state to the online state, the unexecuted counting points in the test case to be recovered are used as positioning counting points;

[0217] Taking the counting point before the positioning counting point as the starting point, continue to execute the test case to be recovered.

[0218] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps:

[0219] Responding to the test request, obtaining interaction information from the production server;

[0220] Under the constraint of available cache space, the window size of the sliding window is determined based on the interaction information;

[0221] Using a sliding window, the interaction data received by the production server is obtained from the production server and stored in the available cache space as the data to be tested;

[0222] Based on the data to be tested, obtain parallel test results.

[0223] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0224] Continuously obtain interaction information from the production server at a preset frequency.

[0225] In one embodiment, the sliding window includes an initial sliding window and an adjustment sliding window;

[0226] When the computer program is executed by the processor, the following steps are also implemented:

[0227] Based on the interactive information obtained for the first time, the window size of the initial sliding window is adjusted to obtain an adjusted sliding window;

[0228] Based on the interaction information obtained for the nth time, the window size of the adjustment sliding window determined based on the interaction information obtained for the (n-1)th time is adjusted to obtain a new adjustment sliding window.

[0229] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0230] Matching a target flow range corresponding to the interaction information from at least one pre-set flow range;

[0231] Based on the target traffic range, the window size of the sliding window is determined.

[0232] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0233] Get the usage status information of the cache;

[0234] When the usage status information indicates that the usage rate of the cache reaches a preset threshold, the extended cache space is acquired, and the available cache space is determined based on the extended cache space and the remaining space of the cache;

[0235] When the usage status information indicates that the usage rate of the cache does not reach a preset threshold, the available cache space is determined based on the remaining space of the cache.

[0236] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0237] Get the response result generated by the production server for the interactive data;

[0238] and processing the data to be tested in the available cache space based on a preset test script to obtain at least one test case that is sorted in sequence;

[0239] Execute the test cases in sequence and obtain the test results corresponding to each test case;

[0240] Compare the test result with the response result to obtain a comparison result;

[0241] The comparison results and test results are used as parallel test results.

[0242] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0243] The test cases corresponding to the test results in the available cache space are deleted to update the remaining space of the cache.

[0244] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0245] Obtain operation status information according to the preset detection frequency;

[0246] When the running status information indicates that the test status is abnormal, the online status is switched to the offline status; and the acquisition of interaction data from the production server is stopped.

[0247] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0248] When the running status information indicates that the test status is normal, the offline state is switched to the online state; and the acquisition of interaction data from the production server is resumed.

[0249] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0250] After switching from the online state to the offline state, determine the test cases to be recovered in the available cache space;

[0251] After switching from offline state to online state, continue to execute the test cases to be recovered.

[0252] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0253] Using a preset dot rule, at least one counting point is set in sequence in the data to be tested;

[0254] After switching from the online state to the offline state, the test case with the most forward counting point in the available cache space is used as the test case to be restored;

[0255] After switching from the offline state to the online state, the unexecuted counting points in the test case to be recovered are used as positioning counting points;

[0256] Taking the counting point before the positioning counting point as the starting point, continue to execute the test case to be recovered.

[0257] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0258] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0259] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A parallel testing method, characterized in that: Applied to a test server, the method comprises: Responding to the test request, obtaining interaction information from the production server; Under the constraint of available cache space, determining a window size of the sliding window based on the interaction information; The sliding window is used to obtain the interaction data received by the production server from the production server, and the interaction data is stored in the available cache space as the data to be tested; Based on the data to be tested, a parallel test result is obtained.

2. The method according to claim 1, characterized in that: The obtaining of interaction information from the production server includes: The interaction information is continuously obtained from the production server at a preset frequency.

3. The method according to claim 2, characterized in that The sliding window includes an initial sliding window and an adjustment sliding window; The determining the window size of the sliding window based on the interaction information includes: Based on the interaction information obtained for the first time, adjusting the window size of the initial sliding window to obtain the adjusted sliding window; Based on the interaction information obtained for the nth time, the window size of the adjustment sliding window determined based on the interaction information obtained for the (n-1)th time is adjusted to obtain a new adjustment sliding window.

4. The method according to claim 1 or 3, characterized in that: The determining the window size of the sliding window based on the interaction information includes: Matching a target flow range corresponding to the interaction information from at least one pre-set flow range; Based on the target flow range, a window size of the sliding window is determined.

5. The method according to claim 1, characterized in that Before determining the window size of the sliding window based on the interaction information under the constraint of the available cache space, the method further includes: Get the usage status information of the cache; When the usage status information indicates that the usage rate of the cache reaches a preset threshold, acquiring the extended cache space, and determining the available cache space based on the extended cache space and the remaining space of the cache; When the usage status information indicates that the usage rate of the cache does not reach a preset threshold, the available cache space is determined based on the remaining space of the cache.

6. The method according to claim 5, characterized in that The method further comprises: Obtaining a response result generated by the production server for the interaction data; The obtaining of parallel test results based on the data to be tested includes: Processing the test data in the available cache space based on a preset test script to obtain at least one test case that is sorted in sequence; Execute the test cases in sequence and obtain the test results corresponding to each test case; Comparing the test result with the response result to obtain a comparison result; The comparison result and the test result are used as the parallel test result.

7. The method according to claim 6, characterized in that After obtaining the test results corresponding to each of the test cases, the method further includes: The test case corresponding to the test result in the available cache space is deleted to update the remaining space of the cache.

8. The method according to claim 1, characterized in that: The method further comprises: Obtain operation status information according to the preset detection frequency; When the running status information indicates that the test status is abnormal, the online status is switched to the offline status; and the acquisition of the interaction data from the production server is stopped.

9. The method according to claim 8, characterized in that After the online state is switched to the offline state, the method further includes: When the running status information indicates that the test status is normal, the offline status is switched to the online status; and the acquisition of the interaction data from the production server is resumed.

10. The method according to claim 8, characterized in that After the online state is switched to the offline state, the method further includes: Determine the test cases to be recovered in the available cache space; After the switching from the offline state to the online state, the method further includes: Continue to execute the test case to be recovered.

11. The method according to claim 10, characterized in that The step of acquiring the interaction data received by the production server from the production server and storing the interaction data as the data to be tested in the available cache space also includes: Using a preset dot rule, at least one counting point is set in the data to be tested in a sequential order; The step of determining the test cases to be recovered in the available cache space includes: The test case at the counting point that is ranked the highest in the available cache space is used as the test case to be recovered; The continuing to execute the test case to be recovered includes: Using the unexecuted counting points in the test case to be recovered as positioning counting points; Taking the counting point before the positioning counting point as the starting point, continue to execute the test case to be recovered.

12. A parallel testing device, characterized in that: include: A response module, used to obtain interaction information from a production server in response to a test request; A determination module, configured to determine a window size of a sliding window based on the interaction information under the constraint of available cache space; A storage module, used to use the sliding window to obtain the interaction data received by the production server from the production server, and store it in the available cache space as data to be tested; The acquisition module is used to acquire the parallel test results based on the data to be tested.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the parallel testing method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the parallel testing method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the parallel testing method according to any one of claims 1 to 11 are implemented.