Performance test method and device, equipment, storage medium and product
By collecting raw traffic and using preset search algorithms and sensitive information desensitization, an automated performance testing process was achieved, improving testing efficiency and accuracy and solving the problem of low efficiency in existing testing methods.
Patent Information
- Application Number
- CN202411147775.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2026-03-03
AI Technical Summary
Existing performance testing methods rely on manual traffic management and partial automated scenario testing, resulting in low testing accuracy and inefficiency, and failing to comprehensively evaluate software performance.
Raw traffic is collected, target data packets are found using a preset search algorithm, sensitive information is desensitized, and the traffic is replayed as qualified data packets. The replay information is monitored to determine the software performance test results.
It improves the efficiency and accuracy of software performance testing, enabling a more comprehensive evaluation of system performance and providing valuable optimization references.
Smart Images

Figure CN121603407A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of performance testing technology, and in particular to performance testing methods, apparatus, equipment, storage media and products. Background Technology
[0002] With the development of software technology, confirming system stability and reliability through software testing has become increasingly important. In the research and development of computer network / security products and the implementation of security solutions, when a new software product needs to be launched, a comprehensive and systematic performance test is required, and the decision to launch is based on the test results. Existing performance testing methods still have some shortcomings. For example, they require manual maintenance of the traffic to be tested, and then perform partially automated scenario testing on the traffic manually, resulting in low test accuracy and insufficient comprehensiveness, thus affecting testing efficiency. Summary of the Invention
[0003] The main purpose of this application is to provide a performance testing method, apparatus, equipment, storage medium, and product, which aims to solve the technical problem of low efficiency in existing software testing.
[0004] To achieve the above objectives, this application proposes a performance testing method, which includes:
[0005] Collect raw traffic and search for target data packets from the raw traffic using a preset search algorithm;
[0006] Sensitive information is de-identified in the target data packet to obtain a qualified data packet;
[0007] The qualified data packets are used as the data source for playback, and the playback information is monitored. The software performance test results are determined based on the playback information.
[0008] Optionally, the step of searching for the target data packet from the original traffic using a preset search algorithm includes:
[0009] The hash value corresponding to the original traffic is determined based on the five elements of the original traffic.
[0010] A hash table is constructed based on the hash value and the original traffic;
[0011] Traverse the hash table to find the target data packet that meets the preset conditions.
[0012] Optionally, the step of traversing the hash table to find the target data packet that meets the preset conditions includes:
[0013] Traverse the hash table to determine the current list of data packets;
[0014] Determine the data packet set based on the current data packet list;
[0015] The initial synchronization data packet and the end data packet are determined based on the data packet set;
[0016] The target data packet that meets the preset conditions is determined based on the initial synchronization data packet, the end data packet, and the data packet set.
[0017] Optionally, the step of performing sensitive information desensitization processing on the target data packet to obtain a qualified data packet includes:
[0018] The sorting sequence of the target data packet is shuffled using an embedding unit scrambling algorithm to obtain the shuffled result;
[0019] Determine the optimal embedding position of the target data packet;
[0020] Using a carrier manipulation algorithm, sensitive information is desensitized based on the scrambling result and the optimal embedding position to obtain a qualified data packet.
[0021] Optionally, the step of collecting raw traffic includes:
[0022] Perform stress testing on the target software and collect the stress flow during the stress testing process;
[0023] The pressure flow rate is cleaned and the time interval is compressed to obtain the original flow rate.
[0024] Optionally, the step of using the qualified data packets as a replay data source for traffic replay, monitoring the traffic replay information, and determining the software performance test result based on the traffic replay information includes:
[0025] Obtain playback parameter information;
[0026] Based on the playback parameter information, a playback data packet is selected from the qualified data packets and the playback data packet is sent.
[0027] Monitor traffic playback information;
[0028] The software performance test results are determined based on the traffic replay information.
[0029] Furthermore, to achieve the above objectives, this application also proposes a performance testing apparatus, which includes:
[0030] The acquisition module is used to acquire raw traffic and search for target data packets from the raw traffic using a preset search algorithm;
[0031] The desensitization module is used to desensitize the target data packet for sensitive information to obtain a qualified data packet;
[0032] The traffic replay module is used to use the qualified data packets as the replay data source for traffic replay, monitor the traffic replay information, and determine the software performance test results based on the traffic replay information.
[0033] In addition, to achieve the above objectives, this application also proposes a performance testing device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the performance testing method described above.
[0034] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the performance testing method described above.
[0035] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the performance testing method described above.
[0036] This application collects raw traffic, searches for target data packets from the raw traffic using a preset search algorithm, performs sensitive information desensitization processing on the target data packets to obtain qualified data packets, uses the qualified data packets as a playback data source for traffic playback, monitors the traffic playback information, and determines the software performance test results based on the traffic playback information. Compared with existing manual performance testing methods, the above method of this application can improve the efficiency of software performance testing. Attached Figure Description
[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart illustrating the performance testing method of this application in Embodiment 1.
[0040] Figure 2 This is a flowchart illustrating Embodiment 2 of the performance testing method of this application;
[0041] Figure 3This is a schematic diagram of data packet selection provided in Embodiment 2 of the performance testing method of this application;
[0042] Figure 4 This is a schematic diagram of the module structure of the performance testing device according to an embodiment of this application;
[0043] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the performance testing method in this application embodiment.
[0044] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0045] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0046] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0047] The main solution of this application embodiment is as follows: Raw traffic is collected, and target data packets are searched from the raw traffic using a preset search algorithm; sensitive information is de-identified from the target data packets to obtain qualified data packets; the qualified data packets are used as a playback data source for traffic playback, and the traffic playback information is monitored; the software performance test results are determined based on the traffic playback information. Compared with existing manual performance testing methods, the above method of this application can improve the efficiency of software performance testing.
[0048] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or performance testing device capable of performing the above functions. The following description uses a performance testing device as an example to illustrate this embodiment and the subsequent embodiments.
[0049] Based on this, the embodiments of this application provide a performance testing method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the performance testing method of this application.
[0050] In this embodiment, the performance testing method includes steps S10 to S30:
[0051] Step S10: Collect raw traffic and search for target data packets from the raw traffic using a preset search algorithm;
[0052] It should be noted that the raw traffic can be the data traffic collected during stress testing of the software to be tested. The preset search algorithm can be used to find data packets with consecutive sequence numbers from the raw traffic according to the sequence number of the data packets to obtain the target data packet.
[0053] Furthermore, to improve performance testing efficiency, the step of collecting raw traffic includes:
[0054] Perform stress testing on the target software and collect the stress flow during the stress testing process;
[0055] The pressure flow rate is cleaned and the time interval is compressed to obtain the original flow rate.
[0056] It should be noted that the stress test, also known as a load test, simulates the system load of a real-world application's hardware and software environment and user usage. It runs the test software under prolonged or extremely heavy loads to test the performance, reliability, and stability of the system under test. The target software can be the software being tested. The stress traffic can be the traffic generated during the stress test. The process of cleaning and compressing the stress traffic to obtain the raw traffic involves processing the stress traffic for noise, outliers, or missing data to ensure data accuracy and integrity. Then, data packets with larger time intervals are compressed, while those with smaller intervals are compressed less. For example, data packets with time intervals less than two minutes are not compressed, while data packets with time intervals greater than or equal to two minutes have their time intervals compressed.
[0057] Step S20: Perform sensitive information desensitization processing on the target data packet to obtain a qualified data packet;
[0058] It should be noted that the desensitization process can be used to transform certain sensitive information in the target data packet according to desensitization rules, thereby achieving reliable protection of sensitive privacy data. Specifically, it can first scramble the sorting sequence of sensitive information in the target data packet using an embedding unit scrambling algorithm, then find the optimal embedding position of the sensitive information in the target data packet according to the character brightness encoding mechanism, and finally complete the embedded desensitization of the sensitive information in the target data packet using a carrier manipulation algorithm.
[0059] Furthermore, to ensure the security of user data and the security during information flow, it is necessary to de-identify the traffic data. While de-identifying the data, its availability must also be guaranteed. Therefore, step S20 may include: shuffling the sorting sequence of the target data packet using an embedding unit scrambling algorithm to obtain a scrambling result;
[0060] Determine the optimal embedding position of the target data packet;
[0061] Using a carrier manipulation algorithm, sensitive information is desensitized based on the scrambling result and the optimal embedding position to obtain a qualified data packet.
[0062] It should be noted that determining the optimal embedding position of the target data packet can be achieved through an embedding unit scrambling algorithm. Specifically,
[0063] Let S represent the set of abstract embedded units of user-sensitive information (i.e., target data packets) in a hierarchical heterogeneous network. i Represents the embedding unit, seq represents the embedding unit s i The position information, sn represents the scrambled order of the embedded units. Each s i Sensitive user information is stored in the system. i In this context, seq and sn are used. X represents the i-th user-sensitive information embedding unit s. i A set of synonyms, whose key is denoted as K.
[0064] The hash function selects a representative element from the synonym set based on the key K to ensure that the embedded units can still be correctly arranged after synonym substitution. Let r = Ran-dom(K) represent pseudo-random numbers, and the seed of the random function is determined by the key K. In the set X, the representative element with index r is denoted as ω = X. r `res[]` represents a byte array used to store the hash values representing the elements. The sorting sequence number of user-sensitive information in the hierarchical heterogeneous network is obtained through the hash value array `res[]` representing the elements. `y[n]` represents an array in the hierarchical heterogeneous network used to store the generated sorting sequence number of user-sensitive information. The sorting sequence number of the representative elements of user-sensitive information is calculated using equations (1) and (2):
[0065] f(i)= res[j]·poω(255,j) (1)
[0066]
[0067] Where, poω(x, y) is the function calculated by raising x to the power of y, and f(j) represents the sorting index of the representative element of user sensitive information in the hierarchical heterogeneous network. z[] represents the sorted array of user sensitive information, which is obtained by sorting the array y[] of user sensitive information using equation (3). The formula for calculating z[] is:
[0068] z[] = sort y[] (3)
[0069] Here, sort represents the sorting command.
[0070] Based on a character brightness-based encoding mechanism, the color of user-sensitive information in a hierarchical heterogeneous network is described using the HSI model, where H represents the hue of the user-sensitive information, S represents the saturation of the user-sensitive information, and I represents the brightness of the user-sensitive information. The expressions for H, S, and I are:
[0071]
[0072] S=1-3 / (R+G+B)min(R,G,B) (5)
[0073] I = 1 / 3(R + G + B) (6)
[0074] Where R, G, and B represent the three primary colors, and θ represents the hue parameter. The brightness of characters in user-sensitive information in a hierarchical heterogeneous network is calculated using equation (6), and the brightness of the characters is adjusted. The adjusted character brightness is denoted as d, and its calculation formula is:
[0075] d = 1 / 3(ΔR + ΔG + ΔB) (7)
[0076] Let I′ represent the brightness of the adjusted user-sensitive information character, [I-d,I+d] be the range of character brightness, and W represent the position where the user-sensitive information is embedded. The formula for calculating W is as follows (8):
[0077]
[0078] It should be noted that the use of the carrier manipulation algorithm to desensitize sensitive information based on the scrambling result and the optimal embedding position to obtain a qualified data packet can be achieved by assuming M′ represents a binary bit string, and converting the user sensitive information to be hidden into M′. The information embedding unit set S in the original user sensitive information text C is then analyzed using the carrier manipulation algorithm:
[0079] S = {S0, S1, ..., S...} n-1} (9)
[0080] Let T i T represents the synonym set of the set of embedded units S. i The embedded unit S obtained from the analysis is transformed using the carrier manipulation algorithm to obtain:
[0081] Transform(S)→T i (10)
[0082] Here, Transform() represents the pre-transformation operation. The embedded unit S in the hierarchical heterogeneous network... i The Pth bit in the corresponding embedded sensitive information bit string M′ i The bit is calculated using the key K:
[0083] P i =Mapping(S i ,K) (11)
[0084] Here, Mapping is a function for calculating the bit string. User-sensitive information is embedded into the optimal position for hiding it, calculated in section S32, to obtain the ciphertext-containing user information T′, i.e., a valid data packet, thus completing the hiding of user-sensitive information in the hierarchical heterogeneous network.
[0085] T′=Output(S i )·WP i (12)
[0086] Among them, Output(S i () represents the embedding of sensitive user information.
[0087] Step S30: Use the qualified data packet as the playback data source for traffic playback, monitor the traffic playback information, and determine the software performance test results based on the traffic playback information.
[0088] It should be noted that using the qualified data packets as a replay data source for traffic replay can be performed by simulating real network traffic according to pre-set parameters such as replay rate and duration. This includes normal data transmission, connection establishment, and disconnection operations. Monitoring traffic replay information can be used to observe the performance of the system corresponding to the software under test during the traffic replay process, thereby evaluating the system's performance under different load conditions.
[0089] Furthermore, in order to improve software testing efficiency, step S30 may include: obtaining playback parameter information;
[0090] Based on the playback parameter information, a playback data packet is selected from the qualified data packets and the playback data packet is sent.
[0091] Monitor traffic playback information;
[0092] The software performance test results are determined based on the traffic replay information.
[0093] It should be noted that the playback parameter information may include playback rate, duration, interval, connection establishment and termination information, etc. The selection of playback data packets from the qualified data packets can be based on the scenario to be simulated, playback rate, and time interval, selecting playback data packets with increasing sequence numbers that match the current playback scenario from the qualified data packets. Simultaneously, it is essential to maintain a stable traffic load during playback, and the load can be gradually increased as needed to test the system's performance limits.
[0094] In practical implementation, real-world network traffic scenarios can be simulated, including normal data transmission, connection establishment, and disconnection. Observing the system's performance during traffic replay allows for the evaluation of system performance under different load conditions. For example, metrics such as system response time, throughput, and resource utilization can be monitored to identify performance bottlenecks and optimization potential, thus assessing system performance. During traffic replay, using cleaned and de-identified qualified data packets (Q) verifies the effectiveness of data cleaning. This ensures that no abnormal data points appear during replay, guaranteeing the accuracy and reliability of the results. Through these methods, the results of traffic replay can provide valuable references for system optimization and improvement. Based on the performance metrics and behaviors observed during replay, corresponding decisions and improvement measures can be formulated to enhance system stability, performance, and security.
[0095] This embodiment collects raw traffic and uses a preset search algorithm to find target data packets from the raw traffic. Sensitive information is de-identified from the target data packets to obtain qualified data packets. These qualified data packets are used as a playback data source for traffic playback, and the playback information is monitored. Based on this playback information, the software performance test results are determined. Compared to existing manual performance testing methods, the above method in this embodiment can improve the efficiency of software performance testing.
[0096] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 , Figure 2 This is a flowchart illustrating the performance testing method of this application in Embodiment 2. Step S10 further includes the following steps:
[0097] Step S101: Determine the hash value corresponding to the original traffic based on the five elements of the original traffic;
[0098] It should be noted that determining the hash value corresponding to the original traffic based on the five elements of the original traffic can be done by determining the five elements of each data packet in the original traffic, i.e., the five-tuple information, including the source IP address, destination IP address, application protocol, source port, and destination port, and calculating the hash value of the five elements.
[0099] Step S102: Construct a hash table based on the hash value and the original traffic;
[0100] It should be noted that constructing the hash table based on the hash value and the original traffic can be achieved by sorting the data packets according to the hash value to obtain the hash table. Specifically, the five-element value (i.e., hash value) of the data packet is mapped to the hash table:
[0101] hash_table[five_tuple]←packet_list
[0102] Here, `five_tuple` represents the five-element value of a data packet, and `packet_list` is a list of data packets with the same five-element value. The list of data packets in the hash table is then sorted.
[0103] sorted_packets←sort(hash_table)
[0104] The sorted list `sorted_packets` contains a list of data packets sorted according to their five-element values.
[0105] Step S103: Traverse the hash table to find the target data packet that meets the preset conditions.
[0106] It should be noted that traversing the hash table to find the target data packet that meets the preset conditions can involve traversing the hash table, determining a list of data packets with the same five-element values, and then traversing the list of data packets to determine the target data packet according to the preset conditions. The preset conditions can be selecting data packets with consecutive sequence numbers.
[0107] Furthermore, in order to improve the efficiency of performance testing, step S103 may include: traversing the hash table to determine the current data packet list;
[0108] Determine the data packet set based on the current data packet list;
[0109] The initial synchronization data packet and the end data packet are determined based on the data packet set;
[0110] The target data packet that meets the preset conditions is determined based on the initial synchronization data packet, the end data packet, and the data packet set.
[0111] It should be noted that traversing the hash table to determine the current data packet list can be achieved by the outer loop iterating through each five-element characteristic value and its corresponding data packet list in the sorted_packets list. Determining the data packet set based on the current data packet list can be achieved by the inner loop comparing the sequence value of the current data packet in the data packet list with the sequence value of the next data packet. If it is less, it checks whether the data packet uses the TCP protocol and whether it is the first SYN packet. If both conditions are met, the data packet corresponding to the data packet in the data packet list is added to the data packet set Q. Then, the inner loop is exited, and the outer loop continues to traverse each five-element characteristic value and its corresponding data packet list in the sorted_packets list.
[0112] In practical implementation, this embodiment uses the five-element characteristics of network data packets (source IP address, destination IP address, application protocol, source port, and destination port) to search and filter data packets. The goal is to find data packets that meet specific conditions, such as significant differences in characteristics, typically due to special network behaviors or specific types of data flows. The conditions can be adjusted according to specific application scenarios and needs to meet different testing objectives and requirements. In this embodiment, the data packets in the data packet set need to meet the following conditions: A. The data packet uses the TCP protocol. B. The sequence value of the current data packet is less than the sequence value of the next data packet. C. The data packet is the first SYN packet sent (the SYN flag is set (SYN=1), and the ACK flag is not set (ACK=0). This indicates that the data packet is the initial synchronization packet of the TCP connection). This embodiment also needs to consider cases where the packets are identical or reversed. Therefore, this embodiment improves the binary search algorithm.
[0113] (1) Before the search is performed, the list of data packets is sorted to facilitate quick comparison of the five-element features.
[0114] (2) During the search process, not only should the size relationship between the current element and the target element be compared, but their reversed forms should also be considered to see if they meet the conditions.
[0115] (3) Once an element that meets the conditions is found, the inner loop can be exited immediately without having to continue comparing subsequent elements, thereby improving the efficiency of the search.
[0116] These improvements enable faster identification of packets that meet specific criteria (using the TCP protocol and containing consecutive packets with consistent five-element characteristics, starting from the first SYN packet and ending with the last FIN or RST packet, with a time interval between packets not exceeding 2 minutes), and reduce unnecessary comparison operations, thereby improving the performance and efficiency of the algorithm.
[0117] It should be noted that determining the initial synchronization data packet and the end data packet based on the data packet set can be done by traversing the data packet set Q: traversing each data packet in set Q, checking its flag bit, specifically, checking the SYN flag: for each data packet, checking whether its TCP flag bit is SYN. Marking the first SYN data packet: if a SYN data packet is found, it is marked as the first SYN data packet (is_first_syn is set to True). Stopping traversal: once the first SYN data packet is found and marked, traversing the remaining data packets stops. Based on the first SYN data packet, the process ends when the last FIN or RST data packet is received: (the data packet needs to be the last FIN or RST data packet, indicating that the TCP connection has ended), and the time interval between data packets does not exceed time T. Time T is preferably 2 minutes, and all data packets in set Q constitute a TCP session stream. The determination of the target data packet that meets the preset conditions based on the initial synchronization data packet, the end data packet, and the data packet set satisfies the following criteria for finding the target data packet, which can be referred to... Figure 3 , Figure 3 This is a schematic diagram illustrating the data packet selection provided in Embodiment 2 of the performance testing method of this application. 1. Data packets must use the TCP protocol. This is the most basic evaluation criterion, as this embodiment only focuses on the TCP session flow. 2. The direction of the data packets must be consistent with the direction of the TCP connection. For example, if the TCP connection is established from the client to the server, then all eligible data packets should also be from the client to the server. 3. The sequence numbers of the data packets must be consecutive. The sequence numbers of TCP data packets should increase consecutively after the connection is established; therefore, if the sequence numbers of some data packets are not consecutive, it may indicate an abnormal connection. 4. The payload of the data packets should contain useful information and conform to the expected format and content. This can be determined by checking the payload of the data packets to determine whether the data packets contain the expected data. 5. The TCP connection state of the data packets must be in an established state. For example, after the connection is established, there should be a data transmission phase, followed by a connection termination phase. If the TCP connection state of the data packets does not conform to expectations, it may indicate an abnormal connection.
[0118] This embodiment determines the hash value corresponding to the original traffic based on the five elements of the original traffic; constructs a hash table based on the hash value and the original traffic; and traverses the hash table to find target data packets that meet preset conditions. This embodiment can simulate real-world scenarios and replay qualified data packets, simulating real network traffic situations, including normal data transmission, connection establishment, and disconnection. Observing the system's performance during traffic replay can evaluate the system's performance under different load conditions. For example, the system's response time, throughput, resource utilization, and other indicators can be monitored to identify system performance bottlenecks and optimization potential, thus evaluating system performance. During traffic replay, using cleaned and qualified data packets can verify the effectiveness of data cleaning.
[0119] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the performance testing method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0120] This application also provides a performance testing device, please refer to... Figure 4 The performance testing device includes:
[0121] The acquisition module 10 is used to acquire raw traffic and search for target data packets from the raw traffic using a preset search algorithm;
[0122] The desensitization module 20 is used to perform sensitive information desensitization processing on the target data packet to obtain a qualified data packet;
[0123] The traffic replay module 30 is used to use the qualified data packets as the replay data source for traffic replay, monitor the traffic replay information, and determine the software performance test results based on the traffic replay information.
[0124] This embodiment collects raw traffic and uses a preset search algorithm to find target data packets from the raw traffic. Sensitive information is de-identified from the target data packets to obtain qualified data packets. These qualified data packets are used as a playback data source for traffic playback, and the playback information is monitored. Based on this playback information, the software performance test results are determined. Compared to existing manual performance testing methods, the above method in this embodiment can improve the efficiency of software performance testing.
[0125] The performance testing apparatus provided in this application, employing the performance testing method described in the above embodiments, can solve the technical problem of low efficiency in existing software testing. Compared with the prior art, the beneficial effects of the performance testing apparatus provided in this application are the same as those of the performance testing method described in the above embodiments, and other technical features in the performance testing apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0126] This application provides a performance testing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the performance testing method in Embodiment 1 above.
[0127] The following is for reference. Figure 5 The diagram illustrates a structural schematic of a performance testing device suitable for implementing embodiments of this application. The performance testing device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The performance testing equipment shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0128] like Figure 5As shown, the performance testing device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the performance testing device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the performance testing equipment to communicate wirelessly or wiredly with other devices to exchange data. Although a performance testing equipment with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.
[0129] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0130] The performance testing equipment provided in this application, employing the performance testing method described in the above embodiments, can solve the technical problem of low efficiency in existing software testing. Compared with the prior art, the beneficial effects of the performance testing equipment provided in this application are the same as those of the performance testing method described in the above embodiments, and other technical features of the performance testing equipment are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0131] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0132] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0133] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the performance testing method described in the above embodiments.
[0134] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0135] The aforementioned computer-readable storage medium may be included in the performance testing equipment; or it may exist independently and not assembled into the performance testing equipment.
[0136] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the performance testing device, cause the performance testing device to perform the aforementioned performance testing method.
[0137] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0138] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0139] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0140] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described performance testing method, thereby solving the technical problem of low efficiency in existing software testing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the performance testing method provided in the above embodiments, and will not be repeated here.
[0141] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the performance testing method described above.
[0142] The computer program product provided in this application can solve the technical problem of low efficiency in existing software testing. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the performance testing method provided in the above embodiments, and will not be repeated here.
[0143] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A performance testing method, characterized in that, The performance testing method includes the following steps: Collect raw traffic and search for target data packets from the raw traffic using a preset search algorithm; Sensitive information is de-identified in the target data packet to obtain a qualified data packet; The qualified data packets are used as the data source for playback, and the playback information is monitored. The software performance test results are determined based on the playback information.
2. The performance testing method as described in claim 1, characterized in that, The step of finding the target data packet from the original traffic using a preset search algorithm includes: The hash value corresponding to the original traffic is determined based on the five elements of the original traffic. A hash table is constructed based on the hash value and the original traffic; Traverse the hash table to find the target data packet that meets the preset conditions.
3. The performance testing method as described in claim 2, characterized in that, The step of traversing the hash table to find the target data packet that meets the preset conditions includes: Traverse the hash table to determine the current list of data packets; Determine the data packet set based on the current data packet list; The initial synchronization data packet and the end data packet are determined based on the data packet set; The target data packet that meets the preset conditions is determined based on the initial synchronization data packet, the end data packet, and the data packet set.
4. The performance testing method as described in claim 1, characterized in that, The step of performing sensitive information desensitization processing on the target data packet to obtain a qualified data packet includes: The sorting sequence of the target data packet is shuffled using an embedding unit scrambling algorithm to obtain a shuffled result; Determine the optimal embedding position of the target data packet; Using a carrier manipulation algorithm, sensitive information is desensitized based on the scrambling result and the optimal embedding position to obtain a qualified data packet.
5. The performance testing method according to any one of claims 1-4, characterized in that, The steps for collecting raw traffic include: Perform stress testing on the target software and collect the stress flow during the stress testing process; The pressure flow rate is cleaned and the time interval is compressed to obtain the original flow rate.
6. The performance testing method according to any one of claims 1-4, characterized in that, The steps of using the qualified data packets as the playback data source for traffic playback, monitoring the traffic playback information, and determining the software performance test results based on the traffic playback information include: Obtain playback parameter information; Based on the playback parameter information, a playback data packet is selected from the qualified data packets and the playback data packet is sent. Monitor traffic playback information; The software performance test results are determined based on the traffic replay information.
7. A performance testing device, characterized in that, The performance testing device includes: The acquisition module is used to acquire raw traffic and search for target data packets from the raw traffic using a preset search algorithm; The desensitization module is used to desensitize the target data packet for sensitive information to obtain a qualified data packet; The traffic replay module is used to use the qualified data packets as the replay data source for traffic replay, monitor the traffic replay information, and determine the software performance test results based on the traffic replay information.
8. A performance testing device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the performance testing method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the performance testing method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the performance testing method as described in any one of claims 1 to 6.