Server performance test method, device, system, equipment and medium

Through the test platform, the test address information in the test script is automatically extracted and the test list is determined, and multiple test tools are automatically called for server performance testing, which solves the problems of cumbersome and low efficiency in the existing technology, and achieves efficient performance testing.

CN119105968APending Publication Date: 2024-12-10AVITA NEW ENERGY VEHICLE TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411240638.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The existing server performance testing methods are cumbersome and time-consuming, making it difficult to meet complex business needs, especially when business services involve multiple test projects, the testing efficiency is inefficient.

Method used

Through the test platform, the test address information in the test script is automatically extracted, the test list and start and end time are determined, multiple test tools are automatically called for performance testing, and the test results are queryed, which simplifies the operation process and improves efficiency.

Benefits of technology

No need for users to operate the tool UI page, automate testing tasks, shorten testing time, improve testing efficiency, and meet complex testing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105968A_ABST
    Figure CN119105968A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of server testing, and discloses a server performance testing method, device, system and equipment and a medium, the method is suitable for a testing platform connected with a plurality of testing tools, and the method comprises the steps that after a testing script of a server is obtained, the testing script of the server is obtained; extracting test address information from the test script and performing test processing; determining a test list based on the test address information and starting and ending time of test processing; and calling the test tool to query a test result according to the starting and ending time of the test and the test list. By applying the technical scheme of the invention, the test processing can be automatically performed through the test tool of the test platform, a user does not need to operate the UI page of the tool for processing, and a plurality of nodes do not need to be arranged to be in communication connection with different UI pages, so that the test operation process can be simplified, the test processing time can be shortened, and the test processing efficiency can be improved; and different test requirements of users can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of server testing, and in particular to a method, device, system, equipment and medium for testing the performance of a server. Background Art

[0002] With the development of technology, more and more companies are building servers and managing their business through the server. Currently, most servers are built using microservice architecture. By integrating and building multiple different microservice architectures, a variety of different business functions can be achieved.

[0003] As user demands continue to increase and business requirements become increasingly complex, the number of microservice architectures integrated on the server side is also increasing. In order to determine whether business services can be fully executed, performance testing is required. The commonly used testing method is to call different monitoring tools for different business service scenarios, and then transfer the relevant data of the business services to each independent monitoring tool for corresponding testing, and determine whether the service is complete based on the test results.

[0004] However, the commonly used testing methods currently have the following technical problems: Since each independent testing tool is an open source independent website, the user needs to operate the UI page of the tool for processing each time the test is performed, and multiple nodes need to be arranged to communicate with different UI pages to obtain test data. Once the business service involves a large number of test items, the operation is cumbersome, the processing is time-consuming, and the testing efficiency is low, which makes it difficult to meet the user's testing needs. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention provide a method, apparatus, system, device and medium for testing performance of a server, which are used to solve one or more of the above technical problems existing in the prior art.

[0006] According to one aspect of an embodiment of the present invention, a performance testing method for a server is provided, the method being applicable to a testing platform connected to a plurality of testing tools, the method comprising:

[0007] After obtaining the test script of the server, extracting the test address information from the test script and performing test processing, the test address information including a plurality of test request addresses for performing test processing;

[0008] Determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address;

[0009] The test tool is called according to the start and end time of the test and the test list to query the test result.

[0010] According to another aspect of an embodiment of the present invention, a performance testing device for a server is provided, the device being applicable to a testing platform connected to a plurality of testing tools, the device comprising:

[0011] An address information extraction module is used to extract test address information from the test script and perform test processing after obtaining the test script of the server, wherein the test address information includes a plurality of test request addresses for performing test processing;

[0012] A test list determination module, used to determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address;

[0013] The test result query module is used to call the test tool to query the test result according to the start and end time of the test and the test list.

[0014] According to another aspect of an embodiment of the present invention, a performance testing system for a server is provided, the system comprising: a testing platform and a plurality of testing tools, the testing platform being communicatively connected with the plurality of testing tools respectively;

[0015] The test platform is used to control the multiple test tools in series to perform performance test processing.

[0016] According to another aspect of an embodiment of the present invention, there is provided a performance testing device for a server, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0017] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the server performance testing method as described above.

[0018] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a performance testing device / apparatus of a server to perform the following operations:

[0019] After obtaining the test script of the server, extracting the test address information from the test script and performing test processing, the test address information including a plurality of test request addresses for performing test processing;

[0020] Determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address;

[0021] The test tool is called according to the start and end time of the test and the test list to query the test result.

[0022] After obtaining the test script of the server, the embodiment of the present invention extracts the test address information from the test script through the test platform and performs test processing; determines the test list based on the test address information and the start and end time of the test processing; calls the test tool to query the test results according to the start and end time of the test and the test list; the present invention can automatically perform test processing through the test tool of the test platform, without the need for the user to operate the UI page of the tool for processing, and without the need to arrange multiple nodes to communicate with different UI pages. It can not only simplify the test operation process, shorten the test processing time, and improve the test processing efficiency to meet the different test needs of users.

[0023] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0025] Figure 1 A schematic diagram showing a flow chart of a first embodiment of a method for testing the performance of a server provided by the present invention;

[0026] Figure 2 A schematic diagram showing a flow chart of a second embodiment of a method for testing the performance of a server provided by the present invention;

[0027] Figure 3 A schematic structural diagram showing a first embodiment of a performance testing device for a server provided by the present invention;

[0028] Figure 4 A schematic structural diagram of an embodiment of a performance testing device for a server provided by the present invention is shown;

[0029] Figure 5 A structural schematic diagram of a first embodiment of a server performance testing system provided by the present invention is shown. DETAILED DESCRIPTION

[0030] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0031] Figure 1 The flowchart of the first embodiment of the performance testing method of the server provided by the present invention is shown, and the method is executed by a testing platform. The testing platform can communicate with multiple testing tools, including: JMeter testing tool, APISIX testing tool, SkyWalking testing tool, Grafana testing tool, etc.

[0032] The testing platform can aggregate real-time data from APISIX testing tools, SkyWalking testing tools, and Grafana testing tools to facilitate data processing for users.

[0033] The present invention can automatically call different test tools to perform test processing through the test platform, without the need for the user to operate the UI page of the tool to perform test processing each time, which can simplify the test operation, shorten the time spent on test processing, and improve test efficiency.

[0034] like Figure 1 As shown, the performance testing method of the server includes the following steps:

[0035] Step 110: After obtaining the test script of the server, extract the test address information from the test script and perform test processing, wherein the test address information includes a plurality of test request addresses for performing test processing.

[0036] The test script may be a performance test script input by a user. After obtaining the test script of the server, a test tool may be called to parse the test script, thereby analyzing and obtaining the address corresponding to the performance test service required by the user and obtaining the test request address.

[0037] The user may need to perform multiple performance testing services and may obtain multiple test request addresses.

[0038] In one embodiment, there are multiple contents that can be extracted. In order to quickly and accurately determine the test request address, as an example, the test address information is extracted from the test script, including the following steps:

[0039] Step 1101: The test script is parsed by calling the structural element tree through a test tool to obtain multiple http requests.

[0040] Step 1102: traverse the multiple http requests to obtain the request sub-element corresponding to each http request, wherein the request sub-element includes: protocol type, domain name and address.

[0041] Step 1103: Concatenate each of the sub-elements of the http request to obtain a test request address.

[0042] In one operation mode, JMeter can be used as a test tool for performance testing. In actual operation, a test script can be obtained first, and the test script can be a performance script in Jmx format. The performance script in Jmx format can be parsed to analyze the addresses corresponding to all performance test services in the script, and obtain multiple test request addresses for test processing.

[0043] It should be noted that the test platform can automatically parse all request information in Jmx.

[0044] A specific parsing method may be to first use Python language to introduce an XML library; then extract a structural element tree (eg, xml.etree.ElementTree class) from the XML library, and then use the structural element tree to parse the test script in the Jmx format.

[0045] Then, all http requests can be parsed from the test script through the xml path of the structure element tree (eg, . / / HTTPSamplerProxy[@guiclass='HttpTestSampleGui']) to obtain multiple http requests.

[0046] Next, all http requests can be traversed, and the sub-elements of the http request can be parsed from each http request. In one embodiment, the sub-elements may include the following, namely:

[0047] 1. Protocol type: "stringProp[@name='HTTPSampler.method']".

[0048] 2. Requested domain name: "stringProp[@name='HTTPSampler.domain']".

[0049] 3. Requested address: "stringProp[@name='HTTPSampler.path']".

[0050] Finally, the three sub-elements of each http request can be concatenated to restore the test request address corresponding to the test service. Taking the above sub-elements as an example, the concatenated test request address is as follows:

[0051] Protocol type:: / / request domain name+request address.

[0052] After obtaining the test request address, you can call the JMeter test tool to perform performance testing according to the test request address. At the same time, after completing the performance test, you can record the start time (startTime) and end time (endTime) of the test to obtain the start and end time. You can then query the test results based on the start and end time for users to view.

[0053] Step 120: Determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after calling the test tool to complete the test processing according to the test request address.

[0054] In one embodiment, after completing the test processing, the start time and end time of the test can be recorded, and then the relevant service content and service name involved in the performance test service can be found based on the test address information and the start and end time of the test processing, and then a list is constructed using these relevant service contents and service names to obtain a test list, which can include the service name of each performance test.

[0055] Subsequently, the corresponding test results can be searched according to the service name and service content in the list, and the results will be fed back to the user for review.

[0056] In one embodiment, the test platform can perform multiple performance test items, and each item needs to be executed by calling different test tools through the network. In order to accurately find the test service content and service name involved in this test process from multiple performance test items through the routing of the communication network to build a test list, as an example, the test list is determined based on the test address information and the start and end time of the test process, including the following steps:

[0057] Step 1201: Search for multiple service names according to the test address information and construct an initial list using the multiple service names.

[0058] Step 1202: After searching the tracking list by the start and end time, extract the corresponding service name field in the tracking list according to the service name contained in the initial list and construct a test list, wherein the tracking list is a list of all services found by the time period corresponding to the start and end time.

[0059] In one embodiment, the APISIX test tool interface can be called according to the test request address of the test address information to query the routing information of the performance test, and multiple service names can be found from the routing information, and the multiple service names can be arranged to form an initial list. At this time, the initial record table records multiple service names, which are the names of test services related to the performance test.

[0060] On this basis, a tracking list is searched according to the start and end time. The tracking list is a list of all services found in the time period corresponding to the start and end time. The test platform may execute multiple services in the time period of the start and end time, and some of them may belong to performance testing. The corresponding list is searched by time. Finally, according to the service name contained in the initial list, the corresponding service name field is extracted from the tracking list, and the two lists are compared through the service name field to determine the actual performance test service executed. Finally, a test list is constructed based on the name of the extracted performance test service.

[0061] In one embodiment, the routing information may involve services. In order to filter the service name that best matches the routing information, for example, searching for multiple service names according to the test address information and constructing an initial list using the multiple service names includes the following steps:

[0062] Step 12011: Query according to the test address information to obtain a routing information list of the domain name that matches the test request address, wherein the routing information list includes a plurality of routing information.

[0063] Step 12012: traverse the identifier of each routing information to obtain a routing ID, where the routing ID is an ID that matches the test request address.

[0064] Step 12013: Use each of the routing IDs to search for routing configuration content, and query the corresponding upstream service according to the routing configuration content to obtain the service name.

[0065] Step 12014: construct a list using multiple service names and perform deduplication processing to obtain an initial list.

[0066] Specifically, after calling the interface of the APISIX test tool according to the test request address of the test address information to query the routing information corresponding to the performance test, the routing information can be parsed to obtain the entry service of each test request address.

[0067] In one operation mode, the Jmx test script can be parsed to parse out the domain and path in each HTTPSamplerProxy, thereby querying the export service name and the import service name.

[0068] The operations to query the egress service name and ingress service name are as follows:

[0069] The first step is to call the APISIX interface with domain as the keyword to query the routing list.

[0070] The second step is to analyze the path according to the routing regular expression and find the matching routing information in the list.

[0071] The third step is to find the upstream of the routing information and find the serviceName of the entry service to get the service name of the entry service.

[0072] In actual operation, the specific operation method of the above steps can be to query the list of all routing information that matches the domain name through the interface of the APISIX test tool (for example, " / apisix / admin / routes?page=1&page_size=500&host=request domain name" interface), and the routing information list can include multiple routing information.

[0073] Next, the identifier (URI) of each routing information can be traversed to obtain the routing ID, which is a regular match with the test request address, and the ID with the highest matching degree (or the longest matching) is found.

[0074] The specific operation method is to query the configuration content of each routing information through the interface of the APISIX test tool (for example, the " / apisix / admin / routes / routing ID" interface), and obtain the routing ID in the routing information, which can be the upstream_ID field of the routing information.

[0075] Then, the upstream service corresponding to the routing ID can be queried through the interface of the APISIX test tool (for example, the " / apisix / admin / upstreams?ID=upstream_ID" interface) to obtain the service name.

[0076] Finally, a list of the obtained service names can be constructed and deduplicated. After complete deduplication, the initial list can be obtained.

[0077] In one embodiment, there are multiple services involved in the start and end time. In order to determine the specific content of the performance test service in combination with the time and the actually executed operation service, as an example, extracting the corresponding service name field in the tracking list according to the service name included in the initial list and constructing a test list includes the following steps:

[0078] Step 12021: Search the tracking list for a corresponding service ID list according to the service name included in the initial list;

[0079] Step 12022: Query the corresponding tracking ID according to the service ID list, test request address and start and end time.

[0080] Step 12023: After querying the call chain using the tracking ID, obtain the field corresponding to the service name of the call chain to obtain the service name field.

[0081] Step 12024: deduplicate the multiple service name fields and construct a list to obtain a test list.

[0082] Specifically, the tracking list can be queried by calling the SkyWalking test tool interface according to the start time and end time of the start and end time, the entry service of each test request address, and the test request address. The tracking list can be a list of all services in the time period corresponding to the start time and end time.

[0083] Next, you can call the data interface of the SkyWalking test tool (for example, the " / graphql" interface) to query the data for each test request address according to different parameters, and you can get the service name field.

[0084] Specifically, the service ID list (referred to as: serverID list) corresponding to the initial list can be found in the tracking list; then the corresponding tracking ID (referred to as: traceID) can be queried based on the serverID of the service ID list and the address of the service in the service ID list and the start and end time of the test processing.

[0085] Next, you can query the call chain of each trace based on the tracing ID; and parse the call chain to obtain all the service name fields in the call chain, that is, the serviceCode field.

[0086] Finally, the service name field obtained from each test request address may be deduplicated, and a list may be constructed using the deduplicated service name fields to obtain a test list.

[0087] In one operation mode, the steps to query all service name fields on the call chain to obtain the test list are as follows:

[0088] The first step is to call the SkyWalking interface with the service name (serviceName), start time (startTime) and end time (endTime) as keywords to query the endPoint list within the corresponding time period.

[0089] The second step is to filter out the corresponding ID (endPointID) in the endpoint list based on the specific address (path) of the test request address.

[0090] The third step is to call the SkyWalking interface with endPointID, start time (startTime) and end time (endTime) as keywords to query the corresponding trace list.

[0091] Step 4: Use any trace ID in the trace list to query the final details and resolve all servers.

[0092] The fifth step is to merge and remove duplicates of the service ID list parsed from the domain name (domain) of each test request address and the specific address (path) of the test request address to obtain the final test list (serverList).

[0093] Step 130: Call the test tool to query the test results according to the start and end time of the test and the test list.

[0094] After the test list is determined, the test tool can be called according to the start and end time of the test and the service name in the test list to query the test results of the performance test processing for the user to view.

[0095] After determining the test request address, the test tool can be called to perform test processing. However, the user does not know the test results after the test processing. By querying the start and end time of the test and the test list, the test processing results of the test request address can be accurately searched, which is convenient for users to determine the performance of the server based on the test results.

[0096] In one implementation, the interface of the Grafana test tool can be called according to the start and end time and all services in the test list to perform data query and test results, and then the test results are returned to the user for the user to view.

[0097] In one embodiment, in order to accurately query the test results of each performance test executed, as an example, calling the test tool to query the test results according to the start and end time of the test and the test list includes the following steps:

[0098] Step 1301: Call the test tool according to the start and end time to perform query processing according to the service name of the test list to obtain query data, wherein the query includes CPU limit query and memory consumption timing query.

[0099] Step 1302: Parse the query data to obtain test results, which include the number of nodes, resource configuration, and resource consumption of each test service.

[0100] Specifically, the test list contains multiple service name fields, each of which corresponds to a service. According to the service name field of each service in the test list combined with the start and end time of the test, the interface of the Grafana test tool (for example, the "queries" interface) can be called to query and obtain the test results.

[0101] In the specific operation method, you can call the interface of the Grafana test tool (for example, the "rate(pod:container_cpu_usage_seconds_total" interface) to query the CPU limit result of the service under test.

[0102] You can call the interface of the Grafana test tool (for example, the "sum(kube_pod_container_resource_limits_cpu_cores" interface) to query the results of the memory consumption time series data in the corresponding time period.

[0103] You can also call the interface of the Grafana test tool (for example, the "sum(container_memory_working_set_byte())" interface) to query the results of the memory consumption time series data in the corresponding time period.

[0104] Finally, the above query results can be parsed to obtain the number of nodes, resource configuration, resource consumption of each test service, and the test results.

[0105] It should be noted that in the operation of querying the resource consumption of all performance test services, you can query each service data in the test list (serverList) within the start time (startTime) and end time (endTime) time period, which can include: the number of server nodes; the CPU configuration limit, maximum consumption, average consumption and timing consumption list of each node; the memory configuration limit, maximum consumption, average consumption and timing consumption list of each node.

[0106] After obtaining the test script of the server, the embodiment of the present invention extracts the test address information from the test script through the test platform and performs test processing; determines the test list based on the test address information and the start and end time of the test processing; calls the test tool to query the test results according to the start and end time of the test and the test list; the present invention can automatically perform test processing through the test tool of the test platform, without the need for the user to operate the UI page of the tool for processing, and without the need to arrange multiple nodes to communicate with different UI pages. It can not only simplify the test operation process, shorten the test processing time, and improve the test processing efficiency to meet the different test needs of users.

[0107] Figure 2 FIG. 2 is a flow chart showing another embodiment of a method for testing the performance of a server according to the present invention, wherein the method is executed by a testing platform. Figure 2 As shown, the method comprises the following steps:

[0108] In the first step, the test platform can pull the test script.

[0109] In the second step, the test platform can parse the test script and obtain the request address.

[0110] In the third step, the test platform can call the JMeter test tool to execute the test, and the JMeter test tool returns the results to the test platform.

[0111] In the fourth step, the test platform can call the APISIX test tool to request an address query, and the APISIX test tool returns the entry service to the test platform.

[0112] In the fifth step, the test platform can call the SkyWalking test tool to request address and start and end time queries, and the SkyWalking test tool returns all related services to the test platform.

[0113] In the sixth step, the test platform can call the Grafana test tool to query the service name and start and end time. The Grafana test tool returns the resource consumption of the service to the test platform.

[0114] Through the above operations, the present invention can automatically parse all test scripts in Jmx format, without the need to manually read the test scope, so as to simplify the manual operation process and improve processing efficiency; and the test platform intelligently connects test tools such as APISIX test tools, SkyWalking test tools, and Grafana test tools in series, and can realize automated testing without manual intervention, thereby further improving processing efficiency; in addition, during the test process, the request entry, involved services, and service consumption can be analyzed in real time according to the start and end time of the test, which can avoid test omissions and effectively improve test efficiency.

[0115] Figure 3 The schematic diagram of the structure of an embodiment of the performance testing device of the server of the present invention is shown. The device is suitable for a test platform connected with multiple test tools, such as Figure 3 As shown, the device 300 includes: an address information extraction module 310, a test list determination module 320 and a test result query module 330.

[0116] An address information extraction module is used to extract test address information from the test script and perform test processing after obtaining the test script of the server, wherein the test address information includes a plurality of test request addresses for performing test processing;

[0117] A test list determination module, used to determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address;

[0118] The test result query module is used to call the test tool to query the test result according to the start and end time of the test and the test list.

[0119] Optionally, the module for extracting address information is further used to:

[0120] The test script is parsed by calling the structural element tree through the test tool to obtain multiple http requests;

[0121] Traversing the multiple http requests, obtaining a request sub-element corresponding to each http request, wherein the request sub-element includes: a protocol type, a domain name, and an address;

[0122] Concatenate each of the http request sub-elements to obtain a test request address.

[0123] Optionally, the module for determining the test list is further used to:

[0124] Searching for multiple service names according to the test address information and constructing an initial list using the multiple service names;

[0125] After searching the tracking list by the start and end time, the corresponding service name field is extracted from the tracking list according to the service name contained in the initial list and constructed into a test list, wherein the tracking list is a list of all services found by the time period corresponding to the start and end time.

[0126] Optionally, the module for determining the test list is further used to:

[0127] A routing information list of a domain name matching the test request address is obtained by querying the test address information, wherein the routing information list includes a plurality of routing information;

[0128] Traversing each identifier of the routing information to obtain a routing ID, where the routing ID is an ID that matches the test request address;

[0129] Using each of the routing IDs to search for routing configuration content, and querying the corresponding upstream service according to the routing configuration content to obtain the service name;

[0130] An initial list is obtained by constructing a list using a plurality of the service names and performing a deduplication process.

[0131] Optionally, the module for determining the test list is further used to:

[0132] Search the tracking list for a corresponding service ID list according to the service name included in the initial list;

[0133] Query the corresponding tracking ID according to the service ID list, test request address and start and end time;

[0134] After querying the call chain using the tracking ID, obtain the field corresponding to the service name of the call chain to obtain the service name field;

[0135] De-duplicate the multiple service name fields and construct a list to obtain a test list.

[0136] Optionally, the query test result module is further used to:

[0137] Call the test tool according to the start and end time to perform query processing according to the service name of the test list to obtain query data, wherein the query includes CPU limit query and memory consumption timing query;

[0138] The query data is parsed to obtain test results, which include the number of nodes, resource configuration, and resource consumption of each test service.

[0139] Figure 4 The schematic diagram of the structure of an embodiment of the performance testing device for a server of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the performance testing device for the server.

[0140] like Figure 4 As shown, the performance testing device of the server may include: a processor (processor) 402 , a communications interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .

[0141] The processor 402, the communication interface 404, and the memory 406 communicate with each other via the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps in the above-mentioned performance test method embodiment for the server.

[0142] Specifically, the program 410 may include program code including computer executable instructions.

[0143] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the performance test device of the server may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0144] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0145] Program 410 can be specifically called by processor 402 to enable the performance testing device of the server to perform the following operations:

[0146] After obtaining the test script of the server, extracting the test address information from the test script and performing test processing, the test address information including a plurality of test request addresses for performing test processing;

[0147] Determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address;

[0148] The test tool is called according to the start and end time of the test and the test list to query the test result.

[0149] In an optional manner, extracting the test address information from the test script includes:

[0150] The test script is parsed by calling the structural element tree through the test tool to obtain multiple http requests;

[0151] Traversing the multiple http requests, obtaining a request sub-element corresponding to each http request, wherein the request sub-element includes: a protocol type, a domain name, and an address;

[0152] Concatenate each of the http request sub-elements to obtain a test request address.

[0153] In an optional manner, determining the test list based on the test address information and the start and end time of the test process includes:

[0154] Searching for multiple service names according to the test address information and constructing an initial list using the multiple service names;

[0155] After searching the tracking list by the start and end time, the corresponding service name field is extracted from the tracking list according to the service name contained in the initial list and constructed into a test list, wherein the tracking list is a list of all services found by the time period corresponding to the start and end time.

[0156] In an optional manner, searching for multiple service names according to the test address information and using the multiple service names to construct an initial list includes:

[0157] A routing information list of a domain name matching the test request address is obtained by querying the test address information, wherein the routing information list includes a plurality of routing information;

[0158] Traversing each identifier of the routing information to obtain a routing ID, where the routing ID is an ID that matches the test request address;

[0159] Using each of the routing IDs to search for routing configuration content, and querying the corresponding upstream service according to the routing configuration content to obtain the service name;

[0160] An initial list is obtained by constructing a list using a plurality of the service names and performing a deduplication process.

[0161] In an optional manner, extracting corresponding service name fields from the tracking list according to the service names included in the initial list and constructing a test list includes:

[0162] Search the tracking list for a corresponding service ID list according to the service name included in the initial list;

[0163] Query the corresponding tracking ID according to the service ID list, test request address and start and end time;

[0164] After querying the call chain using the tracking ID, obtain the field corresponding to the service name of the call chain to obtain the service name field;

[0165] De-duplicate the multiple service name fields and construct a list to obtain a test list.

[0166] In an optional manner, calling the test tool to query the test result according to the start and end time of the test and the test list includes:

[0167] Call the test tool according to the start and end time to perform query processing according to the service name of the test list to obtain query data, wherein the query includes CPU limit query and memory consumption timing query;

[0168] The query data is parsed to obtain test results, which include the number of nodes, resource configuration, and resource consumption of each test service.

[0169] In an optional manner, the program 410 is called by the processor 402 to enable the performance testing device of the server to perform the following operations:

[0170] After obtaining the test script of the server, extracting the test address information from the test script and performing test processing, the test address information including a plurality of test request addresses for performing test processing;

[0171] Determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address;

[0172] The test tool is called according to the start and end time of the test and the test list to query the test result.

[0173] In an optional manner, extracting the test address information from the test script includes:

[0174] The test script is parsed by calling the structural element tree through the test tool to obtain multiple http requests;

[0175] Traversing the multiple http requests, obtaining a request sub-element corresponding to each http request, wherein the request sub-element includes: a protocol type, a domain name, and an address;

[0176] Concatenate each of the http request sub-elements to obtain a test request address.

[0177] In an optional manner, determining the test list based on the test address information and the start and end time of the test process includes:

[0178] Searching for multiple service names according to the test address information and constructing an initial list using the multiple service names;

[0179] After searching the tracking list by the start and end time, the corresponding service name field is extracted from the tracking list according to the service name contained in the initial list and constructed into a test list, wherein the tracking list is a list of all services found by the time period corresponding to the start and end time.

[0180] In an optional manner, searching for multiple service names according to the test address information and using the multiple service names to construct an initial list includes:

[0181] A routing information list of a domain name matching the test request address is obtained by querying the test address information, wherein the routing information list includes a plurality of routing information;

[0182] Traversing each identifier of the routing information to obtain a routing ID, where the routing ID is an ID that matches the test request address;

[0183] Using each of the routing IDs to search for routing configuration content, and querying the corresponding upstream service according to the routing configuration content to obtain the service name;

[0184] An initial list is obtained by constructing a list using a plurality of the service names and performing a deduplication process.

[0185] In an optional manner, extracting corresponding service name fields from the tracking list according to the service names included in the initial list and constructing a test list includes:

[0186] Search the tracking list for a corresponding service ID list according to the service name included in the initial list;

[0187] Query the corresponding tracking ID according to the service ID list, test request address and start and end time;

[0188] After querying the call chain using the tracking ID, obtain the field corresponding to the service name of the call chain to obtain the service name field;

[0189] De-duplicate the multiple service name fields and construct a list to obtain a test list.

[0190] In an optional manner, calling the test tool to query the test result according to the start and end time of the test and the test list includes:

[0191] Call the test tool according to the start and end time to perform query processing according to the service name of the test list to obtain query data, wherein the query includes CPU limit query and memory consumption timing query;

[0192] The query data is parsed to obtain test results, which include the number of nodes, resource configuration, and resource consumption of each test service.

[0193] Figure 5 FIG. 1 is a schematic diagram showing a first embodiment of a server performance test system provided by the present invention. Figure 5 As shown, the performance test system of the server includes: a test platform and multiple test tools;

[0194] The test platform is used to execute the steps in the above-mentioned server performance testing method embodiment.

[0195] The test tool is used to perform test processing and test query.

[0196] An embodiment of the present invention provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a performance testing device / apparatus of a server, the performance testing device / apparatus of the server executes the performance testing method of the server in any of the above-mentioned method embodiments.

[0197] The executable instructions may be specifically used to enable the performance testing device / apparatus of the server to perform the following operations:

[0198] After obtaining the test script of the server, extracting the test address information from the test script and performing test processing, the test address information including a plurality of test request addresses for performing test processing;

[0199] Determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address;

[0200] The test tool is called according to the start and end time of the test and the test list to query the test result.

[0201] In an optional manner, extracting the test address information from the test script includes:

[0202] The test script is parsed by calling the structural element tree through the test tool to obtain multiple http requests;

[0203] Traversing the multiple http requests, obtaining a request sub-element corresponding to each http request, wherein the request sub-element includes: a protocol type, a domain name, and an address;

[0204] Concatenate each of the http request sub-elements to obtain a test request address.

[0205] In an optional manner, determining the test list based on the test address information and the start and end time of the test process includes:

[0206] Searching for multiple service names according to the test address information and constructing an initial list using the multiple service names;

[0207] After searching the tracking list by the start and end time, the corresponding service name field is extracted from the tracking list according to the service name contained in the initial list and constructed into a test list, wherein the tracking list is a list of all services found by the time period corresponding to the start and end time.

[0208] In an optional manner, searching for multiple service names according to the test address information and using the multiple service names to construct an initial list includes:

[0209] A routing information list of a domain name matching the test request address is obtained by querying the test address information, wherein the routing information list includes a plurality of routing information;

[0210] Traversing each identifier of the routing information to obtain a routing ID, where the routing ID is an ID that matches the test request address;

[0211] Using each of the routing IDs to search for routing configuration content, and querying the corresponding upstream service according to the routing configuration content to obtain the service name;

[0212] An initial list is obtained by constructing a list using a plurality of the service names and performing a deduplication process.

[0213] In an optional manner, extracting corresponding service name fields from the tracking list according to the service names included in the initial list and constructing a test list includes:

[0214] Search the tracking list for a corresponding service ID list according to the service name included in the initial list;

[0215] Query the corresponding tracking ID according to the service ID list, test request address and start and end time;

[0216] After querying the call chain using the tracking ID, obtain the field corresponding to the service name of the call chain to obtain the service name field;

[0217] De-duplicate the multiple service name fields and construct a list to obtain a test list.

[0218] In an optional manner, calling the test tool to query the test result according to the start and end time of the test and the test list includes:

[0219] Call the test tool according to the start and end time to perform query processing according to the service name of the test list to obtain query data, wherein the query includes CPU limit query and memory consumption timing query;

[0220] The query data is parsed to obtain test results, which include the number of nodes, resource configuration, and resource consumption of each test service.

[0221] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.

[0222] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.

[0223] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.

[0224] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A performance testing method for a server, characterized in that: The method is applicable to a test platform connected with multiple test tools, and the method comprises: After obtaining the test script of the server, extracting the test address information from the test script and performing test processing, the test address information including a plurality of test request addresses for performing test processing; Determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address; The test tool is called according to the start and end time of the test and the test list to query the test result.

2. The method according to claim 1, characterized in that: The extracting the test address information from the test script includes: The test script is parsed by calling the structural element tree through the test tool to obtain multiple http requests; Traversing the multiple http requests, obtaining a request sub-element corresponding to each http request, wherein the request sub-element includes: a protocol type, a domain name, and an address; Concatenate each of the http request sub-elements to obtain a test request address.

3. The method according to claim 1, characterized in that The determining of the test list based on the test address information and the start and end time of the test processing includes: Searching for multiple service names according to the test address information and constructing an initial list using the multiple service names; After searching the tracking list by the start and end time, the corresponding service name field is extracted from the tracking list according to the service name contained in the initial list and constructed into a test list, wherein the tracking list is a list of all services found by the time period corresponding to the start and end time.

4. The method according to claim 3, characterized in that The step of searching for multiple service names according to the test address information and using the multiple service names to construct an initial list includes: A routing information list of a domain name matching the test request address is obtained by querying the test address information, wherein the routing information list includes a plurality of routing information; Traversing each identifier of the routing information to obtain a routing ID, where the routing ID is an ID that matches the test request address; Using each of the routing IDs to search for routing configuration content, and querying the corresponding upstream service according to the routing configuration content to obtain the service name; An initial list is obtained by constructing a list using a plurality of the service names and performing a deduplication process.

5. The method according to claim 3, characterized in that: The extracting corresponding service name fields in the tracking list according to the service names contained in the initial list and constructing a test list includes: Search the tracking list for a corresponding service ID list according to the service name included in the initial list; Query the corresponding tracking ID according to the service ID list, test request address and start and end time; After querying the call chain using the tracking ID, obtain the field corresponding to the service name of the call chain to obtain the service name field; De-duplicate the multiple service name fields and construct a list to obtain a test list.

6. The method according to claim 1, characterized in that The calling the test tool to query the test result according to the start and end time of the test and the test list includes: Call the test tool according to the start and end time to perform query processing according to the service name of the test list to obtain query data, wherein the query includes CPU limit query and memory consumption timing query; The query data is parsed to obtain test results, which include the number of nodes, resource configuration, and resource consumption of each test service.

7. A performance testing device for a server, characterized in that: The device is suitable for a test platform connected with a plurality of test tools, and the device comprises: An address information extraction module is used to extract test address information from the test script and perform test processing after obtaining the test script of the server, wherein the test address information includes a plurality of test request addresses for performing test processing; A test list determination module, used to determine a test list based on the test address information and the start and end time of the test processing, wherein the test list includes the service name of each test, and the start and end time is the time recorded after the test tool is called to complete the test processing according to the test request address; The test result query module is used to call the test tool to query the test result according to the start and end time of the test and the test list.

8. A server performance testing system, characterized in that: The system comprises: a test platform and a plurality of test tools, wherein the test platform is respectively connected to the plurality of test tools for communication; The test platform is used to control the multiple test tools in series to perform performance test processing.

9. A performance testing device for a server, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the server performance testing method as described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the performance testing device / apparatus of the server, the performance testing device / apparatus of the server executes the operation of the performance testing method of the server as described in any one of claims 1-6.