Pressure measurement script analysis method and device, storage medium and computer equipment
By automatically parsing and mapping the interface address in the pressure test script file and the traffic data in the traffic log file, the problem of low efficiency and accuracy of the pressure test script analysis in the existing technology is solved, and efficient and accurate system performance analysis is achieved.
Patent Information
- Application Number
- CN202411969502.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The analysis method of pressure test scripts in the prior art is time-consuming and labor-intensive, with low efficiency and accuracy, resulting in the analysis results deviating from reality and unable to accurately reflect the performance status of the system.
By obtaining multiple pressure test script files and traffic log files in the target system, extracting the interface address in each pressure test script file, parsing the traffic log file to obtain traffic data, and mapping the interface data and traffic data based on the interface address to generate a pressure test script analysis report.
It realizes automatic analysis of interface information and traffic conditions of the system when it is tested, reduces manual participation, improves the efficiency and accuracy of pressure test script analysis, and enables the analysis report to accurately reflect the performance status of the system.
Smart Images

Figure CN119759791A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a stress testing script analysis method, device, storage medium and computer equipment. Background Art
[0002] In the current technical practice environment, PTS (Performance Testing Service) is widely used as an efficient performance testing solution to simulate system loads in high-concurrency scenarios to evaluate and optimize system stability and performance. In the process of implementing PTS stress testing, the configuration value settings of the stress testing script should be closely aligned with the current status and historical data trends of the system under test to ensure the accuracy and effectiveness of the stress testing results.
[0003] However, the existing stress testing script analysis method can only rely on manual collection and analysis of recent system data, such as interface data, traffic data and other key performance indicators, and then adjust the configuration parameters of the stress testing script accordingly. This process is not only time-consuming and laborious, but also inefficient and inaccurate, resulting in analysis results that deviate from reality and cannot accurately reflect the performance of the system. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect that the stress test script analysis method in the prior art is not only time-consuming and labor-intensive, but also has low efficiency and accuracy, resulting in the analysis results deviating from reality and failing to accurately reflect the performance status of the system.
[0005] The present application provides a stress testing script analysis method, the method comprising:
[0006] Obtain multiple stress testing script files and traffic log files in the target system;
[0007] Extracting each interface address in each stress testing script file, and generating interface data of the target system according to the extraction results of each stress testing script file;
[0008] Performing interface traffic analysis on the traffic log file to obtain traffic data of the target system;
[0009] Based on each interface address, data mapping is performed on the interface data and the flow data, and a stress testing script analysis report of the target system is generated according to the mapping result.
[0010] Optionally, extracting each interface address in each stress testing script file includes:
[0011] For each stress testing script file, parse the stress testing script file to obtain an object array;
[0012] The various interface addresses contained in the object array are obtained through a preset logic acquisition script.
[0013] Optionally, the acquiring each interface address contained in the object array by using a preset logic acquisition script includes:
[0014] The script is indexed to each interface path contained in the object array through a preset logic acquisition, and the interface address in each interface path is extracted, and the address deduplication operation is performed on the extraction result to obtain each interface address contained in the object array.
[0015] Optionally, performing interface traffic parsing on the traffic log file to obtain traffic data of the target system includes:
[0016] The analyzePressLog method is used to capture the interface access information in the traffic log file, and the traffic data of the target system is obtained by summarizing the captured results.
[0017] Optionally, the obtaining the flow data of the target system by aggregating the capture results includes:
[0018] Determine the interface address of each interface access information in the capture result, summarize and count each interface access information according to each interface address, and obtain access volume information of each interface address;
[0019] The traffic data of the target system is generated based on the access volume information of each interface address.
[0020] Optionally, generating a stress testing script analysis report of the target system according to the mapping result includes:
[0021] Obtaining interface parameters corresponding to each interface address, and determining access volume information corresponding to each interface address according to the mapping result;
[0022] A stress testing script analysis report of the target system is generated based on each interface address and the interface parameters and access volume information corresponding to each interface address.
[0023] Optionally, the method further comprises:
[0024] The stress testing script analysis report is sent to the client of the target user using a preset notification strategy.
[0025] The present application also provides a stress testing script analysis device, including:
[0026] The file acquisition module is used to obtain multiple stress testing script files and traffic log files in the target system;
[0027] An interface data parsing module is used to extract each interface address in each stress testing script file, and generate interface data of the target system according to the extraction results of each stress testing script file;
[0028] A flow data analysis module, used to perform interface flow analysis on the flow log file to obtain flow data of the target system;
[0029] The data mapping module is used to perform data mapping on the interface data and the flow data based on each interface address, and generate a stress testing script analysis report for the target system according to the mapping result.
[0030] The present application also provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the stress testing script analysis method described in any one of the above embodiments.
[0031] The present application also provides a computer device, comprising: one or more processors, and a memory;
[0032] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the stress testing script analysis method described in any one of the above embodiments are performed.
[0033] The present application provides the following advantages:
[0034] The present application provides a stress test script analysis method, device, storage medium and computer equipment. When analyzing the stress test script, multiple stress test script files and traffic log files in the target system can be obtained first, so as to collect recent system data; then each interface address in each stress test script file can be extracted, and the interface data of the target system can be generated according to the extraction results of each stress test script file, so as to realize the automatic parsing of the interface information of the system when it is tested, and provide a basis for subsequent data mapping and analysis; at the same time, the interface traffic can be parsed for the traffic log file to obtain the traffic data of the target system, so as to realize the automatic parsing of the traffic situation of the system when it is tested, and serve as an important basis for the script analysis effect; finally, based on each interface address, the interface data and the traffic data can be mapped, and the stress test script analysis report of the target system can be generated according to the mapping results, so as to improve the efficiency and accuracy. In short, the present application reduces the manual participation link through the automatic parsing of interface data and traffic data, and realizes the process of automatic data mapping according to the parsing results, thereby improving the efficiency and accuracy of the stress test script analysis, so that the stress test script analysis report finally generated can accurately reflect the performance status of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0036] Figure 1 A schematic diagram of a flow chart of a stress testing script analysis method provided in an embodiment of the present application;
[0037] Figure 2 A schematic diagram of the structure of a stress testing script analysis device provided in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0040] The existing stress testing script analysis method can only rely on manual collection and analysis of recent system data, such as interface data, traffic data and other key performance indicators, and then adjust the configuration parameters of the stress testing script accordingly. This process is not only time-consuming and labor-intensive, but also inefficient and inaccurate, resulting in analysis results that deviate from reality and cannot accurately reflect the performance status of the system.
[0041] Based on this, this application proposes the following technical solutions, see below for details:
[0042] In one embodiment, Figure 1 As shown, Figure 1 A schematic diagram of a stress testing script analysis method provided in an embodiment of the present application; the present application provides a stress testing script analysis method, which specifically includes the following:
[0043] S110: Acquire multiple stress testing script files and traffic log files in the target system.
[0044] In this step, when it is necessary to parse recent system data in the target system, the computer device can obtain multiple stress testing script files and traffic log files of the target system within the target time period, and then can parse the relevant system data from the multiple stress testing script files and traffic log files according to the preset parsing process as the basic data for stress testing script analysis.
[0045] The stress test script file refers to the file used to execute the stress test script. It simulates the real user access mode to evaluate the performance and stability of the system under different loads. It is usually generated by the stress test tool. The stress test script file defines the specific process of the test, including simulated user behavior, request interface, request parameters, data-driven test configuration and other data. The traffic log file records the network traffic data generated by the system during the stress test, in which each request record includes information such as the request interface, request type, and request parameter content. It can be used to analyze the performance of the system in the stress test, especially to help detect system bottlenecks, requests with long response times, errors, and other problems.
[0046] It is understandable that when the target system is stress tested, due to the limitations of the stress testing tool, each stress testing script file can only contain a certain number of interfaces. Therefore, when a system contains multiple interfaces, these interfaces need to be divided into multiple different stress testing script files for separate testing. For example, a system has 10 interfaces, and each stress testing script can only contain 3 interfaces, then it is necessary to split it into multiple stress testing script files to test different interface combinations. The traffic log file records the detailed data of all requests received by the system during the stress test. It records the actual requests, so it contains the traffic data of all interfaces, without the limitation of the capacity of a single file or the number of entries. Therefore, when obtaining the relevant files of the target system for stress testing script analysis, the present application can obtain multiple stress testing script files and their corresponding traffic log files.
[0047] S120: extracting each interface address in each stress testing script file, and generating interface data of the target system according to the extraction results of each stress testing script file.
[0048] In this step, after obtaining multiple stress testing script files through step S110, the computer device can extract each interface address in each stress testing script file, and then generate interface data of the target system according to the extraction results of each stress testing script file, thereby realizing automatic parsing of interface information when the system is tested, providing a basis for subsequent data mapping and analysis.
[0049] Specifically, after obtaining each stress testing script file, the computer device can load and decompress each stress testing script file, and identify and extract the interface addresses defined therein. These interfaces usually appear in the form of URLs and contain corresponding request types, such as GET, POST, etc., as well as related request parameters and corresponding content. Since each stress testing script file involves multiple interfaces, the computer device can sequentially identify each interface address in each stress testing script file, extract the corresponding related data from the file, and then integrate them into a unified data structure to form interface data.
[0050] It is understandable that, in order to facilitate subsequent data analysis and mapping, the computer device can store the extraction results of all stress testing script files in a preset format, for example, in the form of JSON, XML or database. In multiple stress testing script files, the computer device can also automatically merge repeated or identical interfaces based on the similarity of the interface addresses to ensure the integrity and consistency of the data.
[0051] S130: performing interface traffic analysis on the traffic log file to obtain traffic data of the target system.
[0052] In this step, after the traffic log file is obtained through step S110, the computer device can perform interface traffic analysis on the traffic log file to obtain the traffic data of the target system, thereby realizing automatic analysis of the system's traffic conditions within the target time period, and using the analysis results as an important basis for the script analysis effect.
[0053] Specifically, since the traffic log file is generated by the network monitoring tool, proxy service or the server's own log system, and records all the request and response data of the system under different loads, after obtaining the traffic log file, the computer device can parse each request record, and then determine the corresponding interface address in each request record, and then integrate it into a unified data structure to form traffic data. Similar to the interface data, the computer device can save the integrated traffic data in the form of JSON, XML or database for further processing and analysis.
[0054] S140: Based on each interface address, perform data mapping on the interface data and the flow data, and generate a stress testing script analysis report for the target system according to the mapping result.
[0055] In this step, after obtaining the interface data and flow data through parsing in step S120 and step S130, the computer device can perform data mapping on the interface data and flow data based on the various interface addresses involved in the target system, and generate a stress testing script analysis report for the target system according to the mapping results, so as to improve the analysis efficiency and accuracy.
[0056] Specifically, after determining each interface address, the computer device can map the interface data and the flow data based on the interface address to match the request record in the flow log file with the interface address in the stress testing script file. In this process, for each interface address, the computer device can accurately associate the request record corresponding to the interface address in the flow data with the corresponding interface address in the interface data until all request records in the flow data are associated with the interface data.
[0057] For example, when a specific request record appears in the traffic file log, the computer device can identify the interface address of the request record and then compare it with the interface address defined in the stress testing script to ensure that they correspond one to one. For complex interfaces, the device will also check information such as request parameters and response content to ensure the accuracy of the match.
[0058] In the above embodiment, when analyzing the stress test script, multiple stress test script files and traffic log files in the target system can be obtained first, so as to collect recent system data; then each interface address in each stress test script file can be extracted, and the interface data of the target system can be generated according to the extraction results of each stress test script file, so as to realize the automatic parsing of the interface information of the system when it is tested, and provide a basis for subsequent data mapping and analysis; at the same time, the interface traffic can be parsed for the traffic log file to obtain the traffic data of the target system, so as to realize the automatic parsing of the traffic situation of the system when it is tested, and serve as an important basis for the script analysis effect; finally, based on each interface address, the interface data and traffic data can be mapped, and the stress test script analysis report of the target system can be generated according to the mapping results, so as to improve efficiency and accuracy. In summary, the present application reduces the manual participation link through the automatic parsing of interface data and traffic data, and realizes the process of automatic data mapping according to the parsing results, thereby improving the efficiency and accuracy of the stress test script analysis, so that the stress test script analysis report finally generated can accurately reflect the performance status of the system.
[0059] In one embodiment, the process of extracting each interface address in each stress testing script file in step S120 may include:
[0060] S121: For each stress testing script file, parse the stress testing script file to obtain an object array.
[0061] S122: Acquire each interface address contained in the object array through a preset logic acquisition script.
[0062] In this embodiment, when the computer device extracts the interface address of the stress testing script file, for each stress testing script file, the computer device can parse the stress testing script file to obtain an object array, and then obtain each interface address contained in the object array through a preset logic acquisition script.
[0063] Among them, the logic acquisition script refers to an execution script that selects and accesses specific data according to preset rules or logic. Therefore, the computer device can use the logic acquisition script to realize the automatic acquisition of the interface address in the object array. The array object here refers to an object-oriented array structure, such as an array, dictionary, list, class, etc. It combines the characteristics of arrays and objects, that is, each element in the array is an object; this array structure can be used to store multiple elements with certain common attributes or behaviors, so that they can be processed, traversed and managed together. In this application, each object represents an interface.
[0064] It is understandable that the stress test script file contains various forms of text data, especially the more complex forms of stress test script files, which makes the process of directly extracting information from the stress test script file cumbersome and error-prone. Therefore, the present application can parse the stress test script file into object data, and each object in the object array has clear properties and methods, so that the computer device can directly access and process the information of each interface through the object data, and then obtain the address of each interface.
[0065] Specifically, when the computer device parses the stress test script file into an array object, it can first read the stress test script file, and then use a parser, such as a regular expression, a JSON parser, or a custom script parser to parse the data in the file, and convert the request corresponding to each interface into an object according to the parsing result, and then form an array object of the stress test script file according to the converted object, where each object contains the request address, request method, and request parameters of the corresponding interface. Finally, the computer device can conditionally index each object in the array object through a preset logic acquisition script, so as to obtain the interface address contained in each object.
[0066] In one embodiment, the process of obtaining each interface address contained in the object array by using a preset logic acquisition script in step S122 may include:
[0067] S1221: Obtain the script index to each interface path contained in the object array through a preset logic, extract the interface address in each interface path, and perform address deduplication operation on the extraction result to obtain each interface address contained in the object array.
[0068] In this embodiment, when the computer device obtains the various interface addresses in the object array, it can first use a preset logic acquisition script to index the various interface paths contained in the object array, extract the interface address in each interface path, and perform address deduplication operations on the extraction results to obtain the various interface addresses contained in the object array.
[0069] It is understandable that the interface path here is a complete form of the interface URL, including the protocol, domain name and path, and the interface address refers to the path part of the interface URL. In the target system, different domain names may point to the same service or functional module; for example, the systems of the production environment, development environment and test environment may be deployed on different servers with different domain names, but usually have the same path structure. Therefore, after the computer device indexes each interface path contained in the object array, it can extract the interface address in each interface path, and then perform address deduplication operation on the extracted results to obtain the remaining interface addresses.
[0070] For example, there are two interface paths in the target system, namely http: / / 127.0.0.1 / xxx / aaa and https: / / example.com / xxx / aaa, and both interface paths point to the same interface address / xxx / aaa. Therefore, no matter which domain name the request comes from, the function or resource finally accessed is the same. When obtaining its interface address, the computer device can only focus on the path part, that is, the interface address / xxx / aaa, without distinguishing the domain name.
[0071] In one embodiment, the process of performing interface traffic analysis on the traffic log file in step S130 to obtain traffic data of the target system may include:
[0072] S131: using the analyzePressLog method to capture the interface access information in the traffic log file, and obtaining the traffic data of the target system according to the captured results.
[0073] In this embodiment, when parsing the traffic data of the traffic log file, the computer device can use the analyzePressLog method to capture the interface access information in the traffic log file, and obtain the traffic data of the target system based on the capture results, thereby realizing automatic parsing of the traffic data.
[0074] Among them, the analyzePressLog method refers to a custom method or function that is designed to parse the traffic log file and extract interface access information from it. In this application, it can also automatically extract the interface access information and summarize and analyze it based on this information to generate a traffic data report for the target system.
[0075] Specifically, the computing device can parse each request record in the traffic log file through the analyzePressLog method, and identify the access information of the corresponding interface in the record, such as the interface address, request timestamp, request method, response time, status code, request data volume and other key information, and then group and summarize the request records from different interfaces according to the preset rules in the analyzePressLog method to generate a traffic data report for the target system.
[0076] In one embodiment, the process of obtaining the flow data of the target system according to the captured results in step S131 may include:
[0077] S1311: Determine the interface address of each interface access information in the capture result, summarize and count each interface access information according to each interface address, and obtain access volume information of each interface address.
[0078] S1312: Generate traffic data of the target system based on the access volume information of each interface address.
[0079] In this embodiment, after the computer device captures the interface access information in the traffic log file, it can first determine the interface address of each interface access information in the capture result, and then summarize and count each interface access information according to each interface address to obtain the access volume information of each interface address.
[0080] Specifically, after capturing the interface access information of each request record in the traffic file, the computer device can extract and identify the interface address in each interface access information to obtain the specific interface address corresponding to each request. Then, the computer device can classify and summarize all captured interface access information based on the extracted interface address to obtain the access volume information of each interface address, and then generate the traffic data of the target system based on the access volume information of each interface address; that is, all log records requesting the same interface address in the traffic data will be classified into one category. For example, all logs requesting / api / user will be divided into one group, while logs requesting / api / order will be divided into another group. By classifying these interface access data, the computer device can analyze the access status of each interface in a more targeted manner.
[0081] Furthermore, after summarizing the access information of each interface, the computer device can count and count the number of visits to each interface address. The counted content usually includes the total number of requests for the interface, the request frequency, and other related indicators that may be involved, such as the number of successful requests, the number of failed requests, etc., so that the activity of each interface can be accurately analyzed and the frequently accessed interfaces and the less frequently accessed interfaces can be identified. Furthermore, the computer device can also obtain more detailed performance data based on the response time of each interface, the source of the request, and other characteristics, which are not specifically limited here.
[0082] In one embodiment, the process of generating a stress testing script analysis report of the target system according to the mapping result in step S140 may include:
[0083] S141: Acquire interface parameters corresponding to each interface address, and determine access volume information corresponding to each interface address according to the mapping result.
[0084] S142: Generate a stress testing script analysis report for the target system based on each interface address and interface parameters and access volume information corresponding to each interface address.
[0085] In this embodiment, after the computer device performs data mapping on the traffic data and interface data according to each interface address, the computer device can also obtain the interface parameters corresponding to each interface address, and then determine the access volume information corresponding to each interface address according to the mapping result, and then generate a stress testing script analysis report for the target system based on each interface address and the interface parameters and access volume information corresponding to each interface address.
[0086] Specifically, the interface parameters may include interface name, interface address and other related interface configuration data. After obtaining each interface address and its corresponding interface parameters, the computer device may also associate the interface parameters and access volume information corresponding to each interface address using a preset rule or algorithm, and generate a stress test script analysis report for the target system based on the association result, thereby realizing automatic data mapping analysis between the traffic log file and each stress test script file.
[0087] Furthermore, in the process of generating the stress test script analysis report, the computer device can also perform targeted statistics on the access information of each interface based on each request record in the traffic data, combined with the interface parameters and actual analysis requirements. This access information can not only include the number of interface requests, but also the time distribution of interface requests, the request frequency under different parameter combinations, the success rate, the response time, etc. This information can reflect the usage and performance of the interface under different conditions, and provide a basis for further optimization and analysis.
[0088] In one embodiment, the method may further include:
[0089] S150: Using a preset notification strategy, the stress testing script analysis report is sent to the client of the target user.
[0090] In this embodiment, after generating the stress test script analysis report of the target system, the computer device can also use a preset notification strategy to send the stress test script analysis report to the client of the target user to notify the target user to further optimize and analyze it. Among them, the notification strategy can include SMS notification, email notification, and prompt tone notification, and the specific notification method is not limited here.
[0091] The stress testing script analysis device provided in an embodiment of the present application is described below. The stress testing script analysis device described below and the stress testing script analysis method described above can be referenced to each other.
[0092] In one embodiment, Figure 2 As shown, Figure 2 A schematic diagram of the structure of a stress testing script analysis device provided in an embodiment of the present application; the present application also provides a stress testing script analysis device, including a file acquisition module 210, an interface data analysis module 220, a flow data analysis module 230 and a data mapping module 240, specifically including the following:
[0093] The file acquisition module 210 is used to acquire multiple stress testing script files and traffic log files in the target system.
[0094] The interface data parsing module 220 is used to extract each interface address in each stress testing script file, and generate interface data of the target system according to the extraction results of each stress testing script file.
[0095] The flow data analysis module 230 is used to perform interface flow analysis on the flow log file to obtain flow data of the target system.
[0096] The data mapping module 240 is used to perform data mapping on the interface data and the flow data based on each interface address, and generate a stress testing script analysis report of the target system according to the mapping result.
[0097] In the above embodiment, when analyzing the stress test script, multiple stress test script files and traffic log files in the target system can be obtained first, so as to collect recent system data; then each interface address in each stress test script file can be extracted, and the interface data of the target system can be generated according to the extraction results of each stress test script file, so as to realize the automatic parsing of the interface information of the system when it is tested, and provide a basis for subsequent data mapping and analysis; at the same time, the interface traffic can be parsed for the traffic log file to obtain the traffic data of the target system, so as to realize the automatic parsing of the traffic situation of the system when it is tested, and serve as an important basis for the script analysis effect; finally, based on each interface address, the interface data and the traffic data can be mapped, and the stress test script analysis report of the target system can be generated according to the mapping results, so as to improve the efficiency and accuracy. In short, the present application reduces the manual participation link through the automatic parsing of interface data and traffic data, and realizes the process of automatic data mapping according to the parsing results, thereby improving the efficiency and accuracy of the stress test script analysis, so that the stress test script analysis report finally generated can accurately reflect the performance of the system.
[0098] In one embodiment, the interface data parsing module 220 may include:
[0099] The array parsing submodule is used to parse each stress testing script file to obtain an object array.
[0100] The address acquisition submodule is used to obtain the addresses of each interface contained in the object array through a preset logic acquisition script.
[0101] In one embodiment, the process of obtaining each interface address contained in the object array by using a preset logic acquisition script in step S122 may include:
[0102] The address extraction unit is used to obtain the script index to each interface path contained in the object array through a preset logic, extract the interface address in each interface path, and perform address deduplication operation on the extraction result to obtain each interface address contained in the object array.
[0103] In one embodiment, the traffic data parsing module 230 may include:
[0104] The information capture submodule is used to capture the interface access information in the traffic log file using the analyzePressLog method, and to obtain the traffic data of the target system based on the captured results.
[0105] In one embodiment, the information capture submodule may include:
[0106] The information summarizing unit is used to determine the interface address of each interface access information in the capture result, summarize and count each interface access information according to each interface address, and obtain the access volume information of each interface address.
[0107] The data generating unit is used to generate the flow data of the target system based on the access volume information of each interface address.
[0108] In one embodiment, the data mapping module 240 may include:
[0109] The parameter acquisition submodule is used to acquire the interface parameters corresponding to each interface address, and determine the access volume information corresponding to each interface address according to the mapping result.
[0110] The report generation submodule is used to generate a stress testing script analysis report of the target system based on each interface address and the interface parameters and access volume information corresponding to each interface address.
[0111] In one embodiment, the apparatus may further include:
[0112] The report sending module is used to send the stress testing script analysis report to the target user's client using a preset notification strategy.
[0113] In one embodiment, the present application further provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the stress testing script analysis method described in any of the above embodiments.
[0114] In one embodiment, the present application further provides a computer device having computer-readable instructions stored therein. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the stress testing script analysis method as described in any one of the above embodiments.
[0115] Indicatively, if Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 may be provided as a server. Figure 3 The computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301, for storing instructions executable by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the stress testing script analysis method of any of the above embodiments.
[0116] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0117] Those skilled in the art will understand that Figure 3 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.
[0118] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0119] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0120] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A stress testing script analysis method, characterized in that: The method comprises: Obtain multiple stress testing script files and traffic log files in the target system; Extracting each interface address in each stress testing script file, and generating interface data of the target system according to the extraction results of each stress testing script file; Performing interface traffic analysis on the traffic log file to obtain traffic data of the target system; Based on each interface address, data mapping is performed on the interface data and the flow data, and a stress testing script analysis report of the target system is generated according to the mapping result.
2. The stress testing script analysis method according to claim 1, characterized in that: The extraction of each interface address in each stress testing script file includes: For each stress testing script file, parse the stress testing script file to obtain an object array; The various interface addresses contained in the object array are obtained through a preset logic acquisition script.
3. The stress testing script analysis method according to claim 2, characterized in that: The step of obtaining each interface address contained in the object array by using a preset logic acquisition script includes: The script is indexed to each interface path contained in the object array through a preset logic acquisition, and the interface address in each interface path is extracted, and the address deduplication operation is performed on the extraction result to obtain each interface address contained in the object array.
4. The stress testing script analysis method according to claim 1, characterized in that: The performing interface traffic parsing on the traffic log file to obtain traffic data of the target system includes: The analyzePressLog method is used to capture the interface access information in the traffic log file, and the traffic data of the target system is obtained by summarizing the captured results.
5. The stress testing script analysis method according to claim 4, characterized in that: The flow data of the target system is obtained by aggregating the captured results, including: Determine the interface address of each interface access information in the capture result, summarize and count each interface access information according to each interface address, and obtain access volume information of each interface address; The traffic data of the target system is generated based on the access volume information of each interface address.
6. The stress testing script analysis method according to claim 1, characterized in that: Generating a stress testing script analysis report of the target system according to the mapping result includes: Obtaining interface parameters corresponding to each interface address, and determining access volume information corresponding to each interface address according to the mapping result; A stress testing script analysis report of the target system is generated based on each interface address and the interface parameters and access volume information corresponding to each interface address.
7. The stress testing script analysis method according to claim 1, characterized in that: The method further comprises: The stress testing script analysis report is sent to the client of the target user using a preset notification strategy.
8. A stress testing script analysis device, characterized in that: include: The file acquisition module is used to obtain multiple stress testing script files and traffic log files in the target system; An interface data parsing module is used to extract each interface address in each stress testing script file, and generate interface data of the target system according to the extraction results of each stress testing script file; A flow data analysis module, used to perform interface flow analysis on the flow log file to obtain flow data of the target system; The data mapping module is used to perform data mapping on the interface data and the flow data based on each interface address, and generate a stress testing script analysis report for the target system according to the mapping result.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the stress testing script analysis method as described in any one of claims 1 to 7.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the stress testing script analysis method according to any one of claims 1 to 7 are performed.
Citation Information
Patent Citations
Method and apparatus for generating interface document
CN109408375A
Interface testing method and equipment
CN109491894A
Test result data storage method and device, terminal equipment and storage medium
CN110874324A
Interface testing and monitoring method based on log recording
CN114003506A
Automatic report generation method and device, equipment and storage medium
CN115563950A