ICE Interface Performance Testing Method, Device, Equipment and Storage Medium

By using the performance testing tool Jmeter to obtain and call the test parameters and server interface of the ICE interface, the problem of the lack of performance testing solution for the ICE protocol interface is solved, and efficient performance testing of the ICE interface is realized.

CN114153704BActive Publication Date: 2025-06-13PCI TECH & SERVICE CO LTD +4
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111507308.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-06-13
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

The lack of performance testing solutions for ICE protocol interfaces in the prior art hinders the promotion of ICE protocol technology.

Method used

The performance testing tool Jmeter obtains the ICE interface test parameters entered by the user, and calls the ICE service interface of the server based on these parameters, and receives the interface call results returned by the server, thereby realizing the performance testing of the ICE interface.

Benefits of technology

It realizes automated performance testing of ICE interfaces, and can perform multi-threaded performance testing through Jmeter's multi-threaded testing function, greatly improving the efficiency of ICE interface testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114153704B_ABST
    Figure CN114153704B_ABST
Patent Text Reader

Abstract

The present application relates to a method for testing the performance of an ICE interface, which is applied to the performance testing tool Jmeter. The method includes: obtaining ICE interface test parameters input by a user; wherein, the ICE interface test parameters include a first address of a server, a target call class identifier, a target call method identifier, and interface call parameters, and the target call class identifier and the target call method identifier are used to indicate an ICE service interface to be called in the server; after establishing a communication connection with the server through the first address, calling the ICE service interface based on the interface call parameters; and receiving an interface call result returned by the server. This method only requires the user to input ICE interface test parameters in Jmeter to automatically implement the performance testing of the ICE interface. Moreover, through the multi-thread testing function provided by Jmeter itself, the performance testing of the ICE interface with multiple threads can be achieved, greatly improving the efficiency of ICE interface testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method, device, equipment, and storage medium for testing the performance of an Internet Communication Engine (ICE) interface. Background Art

[0002] With the continuous development of communication technology, real-time data streams are becoming increasingly important in all walks of life, especially in traditional industries. Through actual measurement and comparison, in terms of network bandwidth occupancy, memory usage, and Central Processing Unit (CPU) overhead, the practical value of the ICE protocol interface is superior to other protocol interfaces, such as the restful protocol interface. Therefore, the proportion of the ICE protocol interface applied in the field of real-time communication will be higher and higher. Considering the particularity of the ICE protocol, there is currently a lack of a performance test solution for the ICE protocol interface in the industry, which hinders the popularization of the ICE protocol technology. Summary of the Invention

[0003] This application provides a method, device, equipment, and storage medium for testing the performance of an ICE interface, which can realize the performance test of the ICE interface.

[0004] In a first aspect, an embodiment of this application provides a method for testing the performance of an ICE interface, which is applied to the performance testing tool Jmeter. The method includes:

[0005] Obtain the ICE interface test parameters input by the user; wherein, the ICE interface test parameters include the first address of the server, the target call class identifier, the target call method identifier, and the interface call parameters, and the target call class identifier and the target call method identifier are used to indicate the ICE service interface to be called in the server;

[0006] After establishing a communication connection with the server through the first address, call the ICE service interface based on the interface call parameters;

[0007] Receive the interface call result returned by the server.

[0008] In a second aspect, an embodiment of this application provides an ICE interface performance testing device, which is integrated in the performance testing tool Jmeter. The device includes:

[0009] A parameter acquisition module, configured to acquire ICE interface test parameters input by a user; wherein, the ICE interface test parameters include a first address of a server, a target call class identifier, a target call method identifier, and interface call parameters, and the target call class identifier and the target call method identifier are used to indicate an ICE service interface to be called in the server;

[0010] An interface call module, configured to, after establishing a communication connection with the server through the first address, call the ICE service interface based on the interface call parameters;

[0011] A result receiving module, configured to receive an interface call result returned by the server.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the ICE interface performance test method provided in the first aspect of the embodiment of the present application are implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the ICE interface performance test method provided in the first aspect of the embodiment of the present application are implemented.

[0014] The technical solution provided by the embodiment of the present application obtains the ICE interface test parameters input by the user through the performance test tool Jmeter, calls the corresponding ICE service interface in the server based on the ICE interface test parameters, and receives the interface call result returned by the server. That is to say, only the user needs to input the ICE interface test parameters in Jmeter to automatically implement the performance test of the ICE interface. Since the embodiment of the present application can use the performance test tool Jmeter to perform the performance test on the ICE interface, through the multi-threaded test function provided by Jmeter itself, the multi-threaded performance test of the ICE interface can be implemented, greatly improving the efficiency of the ICE interface test. Description of the Drawings

[0015] Figure 1 It is a schematic flowchart of an ICE interface performance test method provided by an embodiment of the present application;

[0016] Figure 2 It is a schematic diagram of a parameter input interface provided by an embodiment of the present application;

[0017] Figure 3 It is a schematic flowchart of an ICE file processing process provided by an embodiment of the present application;

[0018] Figure 4Another process schematic diagram of the ICE interface performance testing method provided by the embodiments of the present application;

[0019] Figure 5 A structural schematic diagram of the ICE interface performance testing device provided by the embodiments of the present application;

[0020] Figure 6 A structural schematic diagram of the electronic device provided by the embodiments of the present application. Detailed implementation manners

[0021] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be further described in detail below through the following embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0022] To better understand the technical solutions in the embodiments of the present application, the relevant content of Jmeter will be briefly introduced below. Jmeter is a performance testing tool that can perform performance testing on interfaces. Jmeter has the following advantages: it has high portability and can run across platforms; it can achieve distributed load; it can use multiple threads, allowing concurrent sampling through multiple threads or sampling different functions through independent threads; it has high scalability. However, currently Jmeter does not support the performance testing of ICE interfaces.

[0023] In some traditional technologies, the ICE interface access technology must write corresponding code for each called interface by itself, and can only access single-threadedly, and cannot perform multi-threaded performance testing. For this reason, the technical solution provided by the embodiments of the present application aims to implement the performance testing of ICE interfaces through Jmeter.

[0024] Figure 1 A process schematic diagram of the ICE interface performance testing method provided by the embodiments of the present application. This embodiment relates to how to perform performance testing on the ICE interface through Jmeter. As Figure 1 shown, the method may include:

[0025] S101. Obtain the ICE interface test parameters input by the user.

[0026] Among them, the ICE interface test parameters include the first address of the server, the target call class identifier, the target call method identifier, and the interface call parameters. The target call class identifier and the target call method identifier are used to indicate the ICE service interface to be called in the server.

[0027] The above first address may include the Internet Protocol (IP) address, port number, and service identifier of the server. The target call class identifier is used to identify the target call class, and this identifier may be the name or code of the target call class, etc. The target call method identifier is used to identify the target call method. There may be multiple call methods under the target call class, and this target call method is one of the call methods under the target call class. The identifier of this call method may be the name or code of the target call method, etc. In practical applications, there are multiple ICE service interfaces in the server. The above target call class identifier and target call method identifier jointly indicate the ICE service interface to be called in the server, that is, by the target call class identifier and target call method identifier, it is informed the server that the client (i.e., Jmeter) needs to call which ICE service interface of the server.

[0028] The above interface call parameters are the input parameters required to call the ICE service interface. For example, when the ICE service interface is a query type service interface, if you want to query the user account balance, the interface call parameter may be the identifier (id) of the user; another example, if you want to query the user's historical orders, the interface call parameter may be the identifier of the user and the query time range of the historical orders, etc.

[0029] To facilitate the user to input ICE interface test parameters, optionally, before the above S101, the method may further include: calling the interface creation class in the Jmeter toolkit to create a parameter input interface.

[0030] Among them, the interface creation class in the Jmeter toolkit may be the AbstractJavaSamplerClient class. By calling the AbstractJavaSamplerClient class, a parameter input interface required for ICE interface testing is created. Refer to Figure 2 the shown parameter input interface. The user can input ICE interface test parameters through the parameter input interface, that is, input the IP address, port number, service identifier, target call class identifier, target call method identifier, and interface call parameters of the ICE server, etc. Correspondingly, Jemter obtains the ICE interface test parameters input by the user through the parameter input interface.

[0031] S102. After establishing a communication connection with the server through the first address, call the ICE service interface based on the interface call parameters.

[0032] After obtaining the ICE interface test parameters, Jemter establishes a communication connection with the ICE server through the IP address, port number, and service identifier of the ICE server. After successfully establishing a communication connection with the server, Jemter uses the interface call parameters as input parameters to call the ICE service interface of the server indicated by the target call class identifier and the target call method identifier.

[0033] S103. Receive the interface call result returned by the server.

[0034] From the interface call result, it can be known whether the ICE service interface of the server can correctly respond to the client's call, thereby realizing the performance test of the ICE interface. Exemplarily, assume that the ICE service interface is a query type service interface. At the same time, assume that the target call class is the user order class, and the user order class can include multiple call methods, namely the method for querying the user's current order, the method for querying the user's historical orders, and the method for querying the user's refund orders, etc. In this embodiment, assume that the target call method is the above-mentioned method for querying the user's historical orders, and the interface call parameters can be the user id of the user to be queried and the query time range of the historical orders. Jemter obtains the above ICE interface test parameters through the drawn parameter input interface, and after establishing a communication connection with the server through the first address of the server, Jemter can send the identifier of the user order class, the identifier of the method for querying historical orders, the user id, and the query time range of the historical orders to the server. After the server successfully receives this information, the server queries the user's historical orders according to the above interface call parameters through the method for querying historical orders under the user order class, and returns the query result to Jemter.

[0035] Jemter supports multi-threaded interface calls. Therefore, during the ICE interface test, a thread group can be configured to enable multiple threads to concurrently perform a stress test on the ICE interface.

[0036] The ICE interface performance test method provided by the embodiments of this application obtains the ICE interface test parameters input by the user through the performance test tool Jmeter, calls the corresponding service interface in the server based on the ICE interface test parameters, and receives the interface call result returned by the server. That is to say, only the user needs to input the ICE interface test parameters in Jmeter to automatically realize the performance test of the ICE interface. Since the embodiments of this application can use the performance test tool Jmeter to perform a performance test on the ICE interface, then through the multi-threaded test function provided by Jmeter itself, a multi-threaded performance test on the ICE interface can be realized, greatly improving the efficiency of the ICE interface test.

[0037] In one embodiment, a process for obtaining a target call class identifier and a target call method identifier is also provided. Continuing to refer to Figure 2 , a file upload control is provided in the parameter input interface. Optionally, on the basis of the above embodiment, as Figure 3 shown, the method may further include:

[0038] S301: Receive an ICE file input by a user through the file upload control in the parameter input interface.

[0039] Among them, the ICE file can be understood as a file provided by the ICE server to the ICE client. All function classes and methods supported by the ICE server are included in the ICE file.

[0040] S302: Compile the ICE file to obtain a Java file.

[0041] S303: Analyze the Java file to obtain a set of call class identifiers supported by the server and a set of call method identifiers included in each call class identifier in the set of call class identifiers.

[0042] Among them, after compiling the ICE file into a Java file, all function classes and methods in the compiled Java file are analyzed.

[0043] Exemplarily, the analyzed query function classes may include a user order class and a user account class. The user order class may include methods such as querying the user's current order, querying the user's historical orders, and querying the user's refund orders. The user account class may include methods such as querying the user's account balance, querying the user's historical consumption, and querying the user's recharge history orders. Again, the analyzed subscription function classes may include a robot status class and a workstation environment class. The robot status class may include methods such as subscribing to the robot's action trajectory, subscribing to the robot's energy consumption, and subscribing to the robot's temperature. The workstation environment class may include methods such as subscribing to the carbon dioxide concentration in the workstation, subscribing to the temperature in the workstation, and subscribing to the humidity in the workstation.

[0044] S304: Load the set of call class identifiers and the set of call method identifiers into the parameter input interface.

[0045] Among them, after obtaining all the sets of call class identifiers supported by the server and the sets of call method identifiers supported by each call class identifier in the set of call class identifiers, the obtained sets of call class identifiers and call method identifiers are passed into the parameter input interface and provided to the user through the parameter input interface for the user to select.

[0046] Optionally, a class control and a method control are provided in the parameter input interface. Correspondingly, the process of obtaining the target call class identifier input by the user through the parameter input interface may be: when it is detected that the user triggers the class control in the parameter input interface, a call class selection interface is popped up; the target call class identifier selected by the user from the call class identifier set is obtained.

[0047] Among them, the call class identifier set is displayed in the call class selection interface. That is to say, Jemter can display all the call class identifiers supported by the server in the call class selection interface for the user to select the target call class identifier.

[0048] Correspondingly, the process of obtaining the target call method identifier input by the user through the parameter input interface may be: when it is detected that the user triggers the method control in the parameter input interface, a call method selection interface is popped up; the target call method identifier selected by the user from the call method identifier set is obtained.

[0049] Among them, the call method identifier set included in the target call class identifier is displayed in the call method selection interface. That is to say, Jemter can display all the call method identifiers under the call class identifier supported by the server in the call method selection interface for the user to select the target call method identifier.

[0050] In this embodiment, a parameter input interface is created by calling the interface creation class in the Jmeter toolkit. The user can set the ICE interface test parameters through the parameter input interface, enriching the human-computer interaction method and improving the intelligence of the human-computer interaction. At the same time, the ICE file provided by the server is analyzed and processed to obtain all the functional classes and methods supported by the server, and the identifiers of all the functional classes and method identifiers are loaded into the parameter input interface for the user to select, simplifying the user's operation and improving the convenience of the ICE interface test.

[0051] In one embodiment, the above ICE service interface may also be a subscription class service interface. Next, the performance test process of the subscription class service interface will be specifically introduced. On the basis of the above embodiment, optionally, as Figure 4 shown, the method may include:

[0052] S401. Obtain the ICE interface test parameters input by the user.

[0053] Among them, the ICE interface test parameters include the first address of the server, the target call class identifier, the target call method identifier, the interface call parameter, and the second address of the local proxy service. The target call class identifier and the target call method identifier are used to indicate the ICE service interface to be called in the server.

[0054] Optionally, the above second address may include the IP address and port number of the local proxy service. If multiple ICE service interfaces need to be subscribed, the second address may include multiple port numbers. Taking the target call class as the robot status class as an example, the above interface call parameter may be the robot id.

[0055] S402. After establishing a communication connection with the server through the first address, create a local proxy based on the second address, the target call class identifier, and the target call method identifier.

[0056] Among them, the local proxy can be understood as the service in the ICE client that docks with the ICE server. Optionally, the process of creating a local proxy based on the second address, the target call class identifier, and the target call method identifier may include the following steps:

[0057] S4021. Create a local callback class based on the target call class identifier and the target call method identifier.

[0058] S4022. Call the ICE adapter creation tool, and through the adapter creation tool, generate a local adapter based on the second address.

[0059] S4023. Activate the local adapter based on the local callback class.

[0060] S4024. Call the proxy creation tool, and through the proxy creation tool, generate a local proxy based on the local adapter.

[0061] S403. Send the proxy identifier of the local proxy as a parameter to the server, so that the server establishes a long connection with the local proxy.

[0062] S404. Call the ICE service interface based on the interface call parameter.

[0063] S405. Receive the interface call result returned by the server through the long connection.

[0064] By means of the interface call result, it can be known whether the ICE service interface of the subscribed server can correctly respond to the client's call, so as to realize the performance test of the subscribed ICE interface. Exemplarily, assume that the ICE service interface is a subscribed service interface, and at the same time assume that the target call class is the robot status class. The robot status class can include multiple call methods, namely the method of subscribing to the robot's action trajectory, the method of subscribing to the robot's energy consumption, the method of subscribing to the robot's temperature, etc. In this embodiment, assume that the target call method is the above-mentioned method of subscribing to the robot's temperature, and the interface call parameter can be the robot id. Jemter obtains the above ICE interface test parameters through the drawn parameter input interface, and after establishing a communication connection with the server through the first address of the server, Jemter can send the identifier of the robot status class, the identifier of the method of subscribing to the robot's temperature, the robot id, and the proxy identifier of the created local proxy to the server. After the server successfully receives this information, the server establishes a long connection with the local proxy, and subscribes to the robot's temperature through the method of subscribing to the robot's temperature under the robot status class according to the above interface call parameter, and returns the collected robot temperature to Jemter through the long connection established with the local proxy.

[0065] When it is necessary to subscribe to the ICE service interfaces of multiple servers, Jemter can obtain the port list of the local proxy service from the parameter input interface. After obtaining the port list of the local proxy service from the parameter input interface, the port numbers in the port list can also be maintained to ensure the normal test of the subscribed service interface. On the basis of the above embodiment, optionally, before creating the local proxy based on the second address, the target call class identifier, and the target call method identifier in S402, the method can also: determine whether the port number is occupied.

[0066] Specifically, if it is determined that the port number is occupied, a port prompt message is output; wherein, the port prompt message is used to indicate modifying the port number; if the port number is not occupied, the step of creating the local proxy based on the second address, the target call class identifier, and the target call method identifier is continued.

[0067] Optionally, after the port number is used up, the process occupying the port number can also be terminated to release the port number, ensuring that the port number is not occupied when the port number is used next time.

[0068] In this embodiment, it only requires the user to input the subscription - type ICE interface test parameters in Jmeter to automatically implement the performance test of the subscription - type ICE service interface. Since the embodiment of the present application can use the performance test tool Jmeter to perform the performance test on the subscription - type ICE service interface, through the multi - thread test function provided by Jmeter itself, the multi - thread performance test of the subscription - type ICE service interface can be achieved, greatly improving the efficiency of the subscription - type ICE service interface test. Moreover, it can timely recycle the local port numbers that have been used up, improving the reuse rate of local port numbers.

[0069] Figure 5 It is a schematic structural diagram of an ICE interface performance test device provided by an embodiment of the present application. This device is integrated in the performance test tool Jmeter, as Figure 5 shown, this device may include: a parameter acquisition module 501, an interface call module 502, and a result receiving module 503.

[0070] Specifically, the parameter acquisition module 501 is used to acquire the ICE interface test parameters input by the user; among them, the ICE interface test parameters include the first address of the server, the target call class identifier, the target call method identifier, and the interface call parameters, and the target call class identifier and the target call method identifier are used to indicate the ICE service interface to be called in the server;

[0071] The interface call module 502 is used to, after establishing a communication connection with the server through the first address, call the ICE service interface based on the interface call parameters;

[0072] The result receiving module 503 is used to receive the interface call result returned by the server.

[0073] The ICE interface performance test device provided by the embodiment of the present application obtains the ICE interface test parameters input by the user through the performance test tool Jmeter, calls the corresponding service interface in the server based on the ICE interface test parameters, and receives the interface call result returned by the server. That is to say, it only requires the user to input the ICE interface test parameters in Jmeter to automatically implement the performance test of the ICE interface. Since the embodiment of the present application can use the performance test tool Jmeter to perform the performance test on the ICE interface, through the multi - thread test function provided by Jmeter itself, the multi - thread performance test of the ICE interface can be achieved, greatly improving the efficiency of the ICE interface test.

[0074] Based on the above - mentioned embodiment, optionally, this device further includes: an interface creation module.

[0075] Specifically, the interface creation module is used to call the interface creation class in the Jmeter toolkit to create a parameter input interface before the parameter acquisition module 501 acquires the ICE interface test parameters input by the user.

[0076] Correspondingly, the parameter acquisition module 501 is specifically used to acquire the ICE interface test parameters input by the user through the parameter input interface.

[0077] Based on the above embodiments, optionally, the device further includes: a file receiving module, a file compiling module, a file analyzing module, and a result loading module.

[0078] Specifically, the file receiving module is used to receive the ICE file input by the user through the file upload control in the parameter input interface.

[0079] The file compiling module is used to compile the ICE file to obtain a Java file.

[0080] The file analyzing module is used to analyze the Java file to obtain the set of call class identifiers supported by the server and the set of call method identifiers included in each call class identifier in the set of call class identifiers.

[0081] The result loading module is used to load the set of call class identifiers and the set of call method identifiers into the parameter input interface.

[0082] Based on the above embodiments, optionally, a class control and a method control are set in the parameter input interface. The parameter acquisition module 501 is specifically used to pop up a call class selection interface when detecting a trigger operation by the user on the class control in the parameter input interface; and acquire the target call class identifier selected by the user from the set of call class identifiers; wherein, the set of call class identifiers is displayed in the call class selection interface.

[0083] The parameter acquisition module 501 is further specifically used to pop up a call method selection interface when detecting a trigger operation by the user on the method control in the parameter input interface; and acquire the target call method identifier selected by the user from the set of call method identifiers; wherein, the set of call method identifiers included in the target call class identifier is displayed in the call method selection interface.

[0084] Based on the above embodiments, optionally, when the ICE service interface is a subscription service interface, the ICE interface test parameters further include: the second address of the local proxy service.

[0085] The device further includes: a proxy creation module and a parameter sending module.

[0086] Specifically, the proxy creation module is configured to create a local proxy based on the second address, the target call class identifier, and the target call method identifier before the interface call module 502 calls the ICE service interface based on the interface call parameters.

[0087] The parameter sending module is configured to send the proxy identifier of the local proxy as a parameter to the server, so that the server establishes a long connection with the local proxy.

[0088] Correspondingly, the result receiving module is specifically configured to receive the interface call result returned by the server through the long connection.

[0089] Based on the above embodiments, optionally, the proxy creation module is specifically configured to create a local callback class based on the target call class identifier and the target call method identifier; call the adapter creation tool of ICE, and generate a local adapter based on the second address through the adapter creation tool; activate the local adapter based on the local callback class; call the proxy creation tool, and generate a local proxy based on the local adapter through the proxy creation tool.

[0090] Based on the above embodiments, optionally, the second address includes the Internet Protocol (IP) address and port number of the local proxy service. The apparatus further includes: a judgment module and an information prompt module.

[0091] Specifically, the judgment module is configured to judge whether the port number is occupied before the proxy creation module creates a local proxy based on the second address, the target call class identifier, and the target call method identifier.

[0092] The information prompt module is configured to output a port prompt message when the port number is occupied; wherein, the port prompt message is used to indicate modifying the port number.

[0093] The proxy creation module is configured to create a local proxy based on the second address, the target call class identifier, and the target call method identifier when the port number is not occupied.

[0094] In one embodiment, an electronic device is provided, and its internal structure diagram can be as Figure 6As shown. A performance testing tool Jmeter is installed in the electronic device. The electronic device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. The database of the electronic device is used to store data during the ICE interface performance testing process. When the computer program is executed by the processor, it implements an ICE interface performance testing method.

[0095] Those skilled in the art can understand that Figure 6 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0096] In one embodiment, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0097] Obtain the ICE interface test parameters input by the user; wherein, the ICE interface test parameters include the first address of the server, the target call class identifier, the target call method identifier, and the interface call parameters. The target call class identifier and the target call method identifier are used to indicate the ICE service interface to be called in the server;

[0098] After establishing a communication connection with the server through the first address, call the ICE service interface based on the interface call parameters;

[0099] Receive the interface call result returned by the server.

[0100] In one embodiment, when the processor executes the computer program, the following steps are also implemented: call the interface creation class in the Jmeter toolkit to create a parameter input interface; obtain the ICE interface test parameters input by the user through the parameter input interface.

[0101] In one embodiment, when the processor executes the computer program, the following steps are further implemented: receiving an ICE file input by a user through a file upload control in the parameter input interface; compiling the ICE file to obtain a Java file; analyzing the Java file to obtain a set of call class identifiers supported by the server and a set of call method identifiers included in each call class identifier in the set of call class identifiers; and loading the set of call class identifiers and the set of call method identifiers into the parameter input interface.

[0102] In one embodiment, a class control and a method control are provided in the parameter input interface. When the processor executes the computer program, the following steps are further implemented: when detecting a trigger operation by the user on the class control in the parameter input interface, popping up a call class selection interface; wherein, the set of call class identifiers is displayed in the call class selection interface; obtaining a target call class identifier selected by the user from the set of call class identifiers; when detecting a trigger operation by the user on the method control in the parameter input interface, popping up a call method selection interface; wherein, the set of call method identifiers included in the target call class identifier is displayed in the call method selection interface; and obtaining a target call method identifier selected by the user from the set of call method identifiers.

[0103] In one embodiment, when the ICE service interface is a subscription service interface, the ICE interface test parameters further include: a second address of the local proxy service. When the processor executes the computer program, the following steps are further implemented: creating a local proxy based on the second address, the target call class identifier, and the target call method identifier; sending the proxy identifier of the local proxy as a parameter to the server so that the server establishes a long connection with the local proxy; and receiving an interface call result returned by the server through the long connection.

[0104] In one embodiment, when the processor executes the computer program, the following steps are further implemented: creating a local callback class based on the target call class identifier and the target call method identifier; calling an adapter creation tool of ICE, and generating a local adapter based on the second address through the adapter creation tool; activating the local adapter based on the local callback class; and calling a proxy creation tool, and generating a local proxy based on the local adapter through the proxy creation tool.

[0105] In one embodiment, the second address includes the Internet Protocol (IP) address and port number of the local proxy service; when the processor executes the computer program, the following steps are further implemented: determining whether the port number is occupied; if the port number is occupied, outputting a port prompt message; wherein the port prompt message is used to indicate modifying the port number; if the port number is not occupied, continuing to execute the step of creating a local proxy based on the second address, the target call class identifier, and the target call method identifier.

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

[0107] Obtaining Internet Communication Engine (ICE) interface test parameters input by a user; wherein the ICE interface test parameters include the first address of the server, a target call class identifier, a target call method identifier, and interface call parameters, and the target call class identifier and the target call method identifier are used to indicate the ICE service interface to be called in the server;

[0108] After establishing a communication connection with the server through the first address, calling the ICE service interface based on the interface call parameters;

[0109] Receiving an interface call result returned by the server.

[0110] The ICE interface performance testing apparatus, device, and storage medium provided in the above embodiments can execute the ICE interface performance testing method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the above embodiments can be found in the ICE interface performance testing method provided in any embodiment of the present application.

[0111] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0112] The above embodiments only represent several implementation manners of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. An ICE interface performance testing method, characterized in that, it is applied to the performance testing tool Jmeter, and the method includes: invoking an interface creation class in the Jmeter tool package to create a parameter input interface; receiving an ICE file of a network communication engine input by a user through a file upload control in the parameter input interface; all function classes and methods supported by the server are included in the ICE file; compiling the ICE file to obtain a Java file; analyzing the Java file to obtain a set of call class identifiers supported by the server and a set of call method identifiers included in each call class identifier in the set of call class identifiers; loading the set of call class identifiers and the set of call method identifiers into the parameter input interface; obtaining ICE interface test parameters input by a user through the parameter input interface; wherein, the ICE interface test parameters include a first address of the server, a target call class identifier, a target call method identifier, and interface call parameters, and the target call class identifier and the target call method identifier are used to indicate an ICE service interface to be called in the server; after establishing a communication connection with the server through the first address, calling the ICE service interface based on the interface call parameters; receiving an interface call result returned by the server.

2. The method according to claim 1, characterized in that, a class control and a method control are arranged in the parameter input interface, and obtaining a target call class identifier input by a user through the parameter input interface includes: when detecting a triggering operation of the user on the class control in the parameter input interface, popping up a call class selection interface; wherein, the set of call class identifiers is displayed in the call class selection interface; obtaining a target call class identifier selected by the user from the set of call class identifiers; correspondingly, obtaining a target call method identifier input by a user through the parameter input interface includes: when detecting a triggering operation of the user on the method control in the parameter input interface, popping up a call method selection interface; wherein, the set of call method identifiers included in the target call class identifier is displayed in the call method selection interface; obtaining a target call method identifier selected by the user from the set of call method identifiers.

3. The method according to claim 1, characterized in that, when the ICE service interface is a subscription class service interface, the ICE interface test parameters further include: a second address of a local proxy service; before calling the ICE service interface based on the interface call parameters, the method further includes: creating a local proxy based on the second address, the target call class identifier, and the target call method identifier; sending a proxy identifier of the local proxy as a parameter to the server so that the server establishes a long connection with the local proxy; correspondingly, the receiving the interface call result returned by the server includes: receiving the interface call result returned by the server through the long connection.

4. The method according to claim 3, characterized in that, Creating a local proxy based on the second address, the target call class identifier, and the target call method identifier includes: Creating a local callback class based on the target call class identifier and the target call method identifier; Invoking the adapter creation tool of ICE, and generating a local adapter based on the second address through the adapter creation tool; Activating the local adapter based on the local callback class; Invoking the proxy creation tool, and generating a local proxy based on the local adapter through the proxy creation tool.

5. The method according to claim 3, wherein, the second address includes the Internet Protocol (IP) address and port number of the local proxy service; Before creating the local proxy based on the second address, the target call class identifier, and the target call method identifier, the method further includes: Determining whether the port number is occupied; If the port number is occupied, outputting a port prompt message; wherein the port prompt message is used to indicate modifying the port number; If the port number is not occupied, continuing to perform the step of creating the local proxy based on the second address, the target call class identifier, and the target call method identifier.

6. An ICE interface performance testing device, wherein, Integrated in the performance testing tool Jmeter, the device includes: An interface element creation module, configured to call the interface creation class in the Jmeter toolkit to create a parameter input interface; receiving an ICE file input by a user through a file upload control in the parameter input interface; the ICE file contains all function classes and methods supported by the server; compiling the ICE file to obtain a Java file; analyzing the Java file to obtain a set of call class identifiers supported by the server and a set of call method identifiers included in each call class identifier in the set of call class identifiers; loading the set of call class identifiers and the set of call method identifiers into the parameter input interface; A parameter acquisition module, configured to acquire ICE interface test parameters input by a user through the parameter input interface; wherein the ICE interface test parameters include a first address of the server, a target call class identifier, a target call method identifier, and interface call parameters, and the target call class identifier and the target call method identifier are used to indicate an ICE service interface to be called in the server; An interface call module, configured to call the ICE service interface based on the interface call parameters after establishing a communication connection with the server through the first address; A result receiving module, configured to receive the interface call result returned by the server.

7. An electronic device, including a memory and a processor, the memory stores a computer program, wherein, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, on which a computer program is stored, wherein, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Fully-automatic interface pressure measurement method, device, compute device and storage medium

    CN109491891A

  • Interface calling method and device, computer equipment and computer readable storage medium

    CN111741118A