Test methods, apparatuses, systems, and computer devices
By using the Netty high-concurrency framework and the TR069 communication protocol, a test instruction set was built to simulate bidirectional information transmission between home gateway devices and web application platforms. This solved the problem that existing tools could not meet the performance testing needs of large-scale home gateway devices, and achieved efficient performance testing and accurate performance indicator data generation.
Patent Information
- Application Number
- CN202311768829.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-12-20
AI Technical Summary
Existing testing tools cannot meet the performance requirements for simulating bidirectional information transmission between a large number of home gateway devices and web application platforms, especially when home gateway devices interact with web application platforms under the TR069 communication protocol, they cannot simultaneously act as client and server roles.
The Netty high-concurrency framework is used to receive batch connection requests from the web application platform, and a test instruction set is constructed, including the first and second types of test instructions. The TR069 communication protocol is used to simulate the interaction between the home gateway device and the Internet application platform to generate performance index data.
The system enables bidirectional information transmission performance testing based on the TR069 communication protocol, which lowers the testing threshold, improves testing efficiency, and can simulate the real-world usage scenarios of a large number of home gateway devices with limited hardware resources, thereby improving the accuracy of test results.
Smart Images

Figure CN118827488B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of communication, and particularly relates to a test method, device, system and computer device. BACKGROUND
[0002] A web application (Web App) is a computer program stored on a remote server and run by its user through a web browser. For performance testing of a web application, a test tool such as jmeter, loadRunner, etc. can be used for testing. At this time, the test tool initiates a request data to the web application platform as a pure client single side to obtain performance index data of the web application platform.
[0003] However, in the interaction between a home gateway device based on a TR069 communication protocol and a web application platform, the web application platform will first actively request to connect the home gateway device for functions such as upgrading and parameter setting of the home gateway device. After obtaining the response of the home gateway device, the home gateway device actively requests data interaction with the web application platform. At this time, the web application platform and the home gateway device act as both client and server roles. Therefore, the above test tool cannot meet the performance test of simulating bidirectional information transmission of a large number of home gateway devices to the web application platform. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a test method, device, system and computer device, which can simulate bidirectional information transmission of a large number of home gateway devices to the web application platform based on the TR069 communication protocol for performance testing.
[0005] In a first aspect, the embodiments of the present application provide a test method, comprising:
[0006] Obtaining test configuration data and a home gateway device participating in the test, and the home gateway device supports a TR-069 communication protocol;
[0007] Based on the test configuration data and an interaction data template, a test instruction set is constructed, the test instruction set comprising a first type of test instruction and a second type of test instruction, the first type of test instruction being a test instruction for responding to a connection request of an internet application platform participating in the test, and the second type of test instruction being a data request instruction sent to the internet application platform;
[0008] In a case where a connection request sent by the internet application platform based on device information of the home gateway device is received, the first type of test instruction is sent to the internet application platform; and in a case where the home gateway device is connected to the internet application platform, the second type of test instruction is sent to the internet application platform;
[0009] Based on connection requests, the first type of test commands, and feedback data from the internet application platform to the second type of test commands, performance metrics data for testing the internet application platform are generated.
[0010] Secondly, embodiments of this application provide a testing apparatus, including:
[0011] The acquisition module is used to acquire test configuration data and the home gateway devices participating in the test. The home gateway devices support the TR-069 communication protocol.
[0012] The building module is used to build a test instruction set based on test configuration data and interaction data templates. The test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction that responds to the connection request of the Internet application platform participating in the test, and the second type of test instruction is an instruction that sends a data request to the Internet application platform.
[0013] The sending module is used to send a first type of test instruction to the Internet application platform when it receives a connection request from the Internet application platform based on the device information of the home gateway device; and to send a second type of test instruction to the Internet application platform when the home gateway device is connected to the Internet application platform.
[0014] The generation module is used to generate performance index data for testing the Internet application platform based on connection requests, the first type of test instructions, and feedback data from the Internet application platform to the second type of test instructions.
[0015] Thirdly, embodiments of this application provide a testing system, including:
[0016] The initialization module is used to obtain test configuration data;
[0017] The environment deployment module is used to acquire the home gateway devices participating in the test, which support the TR-069 communication protocol; and, the test configuration data also includes test scenario initialization instructions, which include a first test scenario initialization instruction and a second test scenario initialization instruction. The first test scenario initialization instruction is used to instruct the home gateway device to adjust its operating state to a preset initial operating state. Based on the first test scenario initialization instruction, the module adjusts its operating state to a preset initial operating state. The module also sends a second test scenario initialization instruction and instruction information to the participating internet application platform. The second test scenario initialization instruction is used to instruct the internet application platform to clean up scheduled tasks, and the instruction information carries device configuration information. The instruction information is used to instruct the internet application platform to send a connection request to the home gateway device based on the device configuration information and establish a connection with the home gateway device.
[0018] The scenario management module is used to build a test instruction set based on test configuration data and interaction data templates. The test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction that responds to the connection request of the Internet application platform participating in the test, and the second type of test instruction is an instruction that sends a data request to the Internet application platform.
[0019] The task management module is used to send a first type of test instruction to the Internet application platform when it receives a connection request from the Internet application platform based on the device information of the home gateway device; and to send a second type of test instruction to the Internet application platform when the home gateway device is connected to the Internet application platform.
[0020] The monitoring and management module generates performance indicator data for the internet application platform based on connection requests, first-type test commands, and feedback data from the internet application platform to second-type test commands; and displays the performance indicator data of the internet application platform.
[0021] Fourthly, embodiments of this application provide a computer device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps of the test method as shown in the first aspect.
[0022] Fifthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the test method as shown in the first aspect are implemented.
[0023] In a sixth aspect, embodiments of this application provide a chip, which includes a processor and a display interface, the display interface and the processor being coupled together, the processor being used to run programs or instructions to implement the steps of the test method as shown in the first aspect.
[0024] In a seventh aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the test method as described in the first aspect.
[0025] In this embodiment, test configuration data and a home gateway device supporting the TR-069 communication protocol are acquired. Based on the test configuration data and interaction data template, a test instruction set is constructed. The test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction responding to a connection request from an internet application platform participating in the test, and the second type of test instruction is an instruction sending a data request to the internet application platform. Then, upon receiving a connection request from the internet application platform based on the device information of the home gateway device, the first type of test instruction is sent to the internet application platform. And, when the home gateway device is connected to the internet application platform, the second type of test instruction is sent to the internet application platform. Based on the connection request, the first type of test instruction, and the feedback data from the internet application platform to the second type of test instruction, performance index data for testing the internet application platform is generated. In this way, based on the TR069 communication protocol, it is possible to simulate the interaction between a large number of home gateway devices and Internet application platforms. It also connects the test configuration data, interaction data templates and test instruction sets associated with service deployment, the test command sending associated with performance test execution, and the performance indicator data of the test Internet application platform associated with performance monitoring, forming a controllable automated performance testing process. This lowers the testing threshold and effectively improves testing efficiency while simulating the bidirectional information transmission between a large number of home gateway devices and Web application platforms based on the TR069 communication protocol. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the structure of a testing system provided in an embodiment of this application;
[0027] Figure 2 A flowchart of a testing method provided in an embodiment of this application;
[0028] Figure 3 This is a schematic diagram of the structure of a testing device provided in an embodiment of this application;
[0029] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of this application;
[0030] Figure 5 This is a schematic diagram of the hardware structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0032] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0033] Currently, performance testing of web application platforms typically employs tools such as JMeter and LoadRunner. These tools act as pure clients, initiating a certain number of concurrent data requests to the web application platform to obtain its performance metrics. However, in interactions between a home gateway device based on the TR069 communication protocol and a web application platform, for functions such as upgrades and parameter settings, the web application platform first proactively requests a connection to the home gateway device. After receiving a response from the home gateway device, the home gateway device then proactively requests a connection to the web application platform, engaging in a series of interactions. Both the web application platform and the home gateway device need to act as both client and server, a role that the aforementioned testing tools cannot fulfill.
[0034] To address the problems in related technologies, embodiments of this application provide a testing method, apparatus, device, and storage medium. The following description, in conjunction with the accompanying drawings, further details these aspects. Figures 1 to 5 The test methods provided in this application will be described in detail through specific embodiments and application scenarios.
[0035] First, combined Figure 1 A testing system provided in the embodiments of this application will be described in detail.
[0036] like Figure 1As shown, the test system 10 uses the high-concurrency Netty network programming framework to receive batch connection requests from the web application platform. It also enables the task management module to interact with the internet platform, meeting the performance requirements for batch and rapid processing. Furthermore, it can expand the performance of the simulated home gateway service by adding limited hardware resources, making it better suited for testing the performance metrics of the web platform. The test system is functionally divided into an initialization module, an environment deployment module, a scenario management module, a task management module, and a monitoring management module. The initialization module includes pre-setting gateway-related data and initializing the test environment before testing. The environment deployment module mainly deploys the simulated home gateway service and its configuration files to the test environment. The scenario management module mainly selects specific test scenarios and generates test tasks. The task management module mainly configures task-related parameters and starts test tasks. The monitoring management module mainly collects and statistically analyzes performance data during performance testing and displays it in real time, while also monitoring resource usage. The following section combines... Figure 1 The test system 10 in the embodiments of this application will be described separately.
[0037] The initialization module can be used to pre-configure test configuration data related to the home gateway device and restore the test environment before testing. Specifically, the initialization module can be used to obtain test configuration data. This test configuration data can include at least one of the following: data transmission method between the home gateway device and the internet application platform, device configuration information of the home gateway device, preset performance test requirement information, test scenario initialization instructions, N test scenarios and M test tasks corresponding to the i-th test scenario among the N test scenarios, where N and M are positive integers, i∈[1,N], the number of home gateway devices sending the first type of test instructions in each batch, the first preset time interval between receiving connection requests and sending the first type of test instructions, the number of threads interacting with the internet application platform, the number of home gateway devices sending the second type of test instructions in each batch, the second preset time interval between sending the first type of test instructions and sending the second type of test instructions, and the number of threads interacting with the internet application platform. Furthermore, the data transmission method includes at least one of the following: interface method, structured query import method; device configuration information includes the device address of the home gateway device and the time interval for sending connection requests in each batch; preset performance test requirement information includes the number of test instructions, such as 1 million test instructions, and the corresponding work order data, wherein the work order data can be attribute data associated with the home gateway device; test scenario initialization instructions include a first test scenario initialization instruction and a second test scenario initialization instruction. The first test scenario initialization instruction is used to instruct the home gateway device to adjust its operating state to the preset initial operating state, and the second test scenario initialization instruction is used to instruct the Internet application platform to clean up scheduled tasks. In this way, the test configuration data can be used to instruct the home gateway device and the Internet application platform to perform initialization operations on the test environment, including cleaning up the background scheduled tasks of the Internet application platform, restoring the configuration information of the home gateway device to its initial state, and resetting the test environment, so that the entire test environment is in a clean environment without interference.
[0038] The environment deployment module is used to select at least one server for testing and deploy the simulated home gateway service to the server's test environment. Specifically, the environment deployment module is used to obtain the home gateway device participating in the test, which supports the TR-069 communication protocol. The test configuration data also includes test scenario initialization instructions, which include a first test scenario initialization instruction and a second test scenario initialization instruction. The first test scenario initialization instruction instructs the home gateway device to adjust its operating state to a preset initial operating state. Based on the first test scenario initialization instruction, the module adjusts the operating state to the preset initial operating state. The module also sends a second test scenario initialization instruction and instruction information to the participating internet application platform. The second test scenario initialization instruction instructs the internet application platform to clean up scheduled tasks, and the instruction information carries device configuration information, instructing the internet application platform to send a connection request to the home gateway device based on the device configuration information and establish a connection with the home gateway device. For example, the module retrieves service packages and corresponding preset performance test requirement information, as well as interaction data templates corresponding to test tasks, from the baseline address. Based on the preset performance test requirement information and the interaction data templates corresponding to test tasks, it selects one or more servers to deploy the simulated home gateway service. It should be noted that the home gateway device in this embodiment can be a physical server or a node in a server that simulates the function of a home gateway device.
[0039] The scenario management module stores interaction data templates corresponding to test tasks, determines test scenarios, and generates test instructions for test tasks corresponding to those scenarios. Specifically, since the scenario management module pre-stores interaction data templates for test tasks, these templates are pre-loaded when a test scenario is determined. These templates include preset fixed fields and variable fields. Variable fields can include the media access control address of the home gateway device, the internet platform address, and interaction instruction keys. This allows for real-time parameterization of variable fields based on test configuration data such as device timing information and test scenario initialization instructions. Based on this, the scenario management module can construct a test instruction set based on the test configuration data and interaction data templates. This test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction responds to connection requests from participating internet application platforms, while the second type of test instruction sends data request instructions to the internet application platforms. It should be noted that test scenarios can include single scenarios and mixed scenarios. For a single scenario, a specific test task, such as an upgrade task or a restart task, is selected and associated with the single scenario. For a mixed scenario, multiple test tasks, such as upgrade tasks and restart tasks, are selected and associated with the mixed scenario to generate a test scenario identifier (ID) and a set of test instructions for the total test tasks under that test scenario.
[0040] The task management module is used to initiate test scenarios and test tasks. In some embodiments of this application, the task management module is used to configure test tasks for the Internet application platform. Based on the data transmission method, it sends instruction information to the Internet application platform, carrying device configuration information. This instruction information instructs the Internet application platform to send connection requests to the home gateway device based on the device configuration information and establish a connection with the home gateway device. Furthermore, the task management module can also send triggering conditions related to the connection requests, such as immediate triggering and timed triggering, to the Internet application platform, and can also send the time interval for sending connection requests in each batch. In other embodiments of this application, the task management module can also be used to perform test configuration on the home gateway device selected by the environment deployment module based on the test tasks, test scenarios, test instructions, and test configuration data output by the scenario management module. For example, based on the test configuration data, it configures the address of the Internet application platform, test instructions, and the total number of test task threads for data interaction with the Internet application platform in the home gateway device. It should be noted that the total number of test task threads in the embodiments of this application can be determined by considering the number of connection requests sent by the Internet application platform in each batch, predetermined performance indicators, and the resource configuration of the server where the service is located. Furthermore, in some embodiments of this application, the task management module can also be used to: receive connection requests sent by the Internet application platform based on the device information of the home gateway device using the Netty high-concurrency framework; and, upon receiving a connection request, send a first type of test instruction to the Internet application platform; and, when the home gateway device is connected to the Internet application platform, send a second type of test instruction to the Internet application platform. For example, when a test scenario and test task are started, the Netty high-concurrency framework can be used to receive connection requests sent by the Internet application platform based on the device information of the home gateway device. Then, based on the target test scenario corresponding to the connection request, the test instruction set of the test task is loaded into memory, the task thread pool is started, and the home gateway device uniformly listens for connection requests issued by the Internet application platform through a high-performance interface. According to the task identifier of the test task carried by each connection request, the first type of test instruction in the test instruction set of the test task is extracted, implanted into the task data template, and a thread is retrieved from the task thread pool. This thread completes the data interaction with the platform. Then, based on the time point of sending the second test instruction in the test configuration data, the second type of test instruction is sent to the Internet application platform again.
[0041] The monitoring and management module is used to collect and display performance metrics data of the internet application platform in real time during performance testing. It also collects first resource usage data for each batch of connection requests in the target test scenario corresponding to the connection requests, second resource usage data for the first type of test instructions responding to the connection requests, and third resource usage data for the internet application platform's feedback data to the second type of test instructions. Based on the target test scenario, it statistically analyzes the first, second, and third resource usage data to obtain the performance metrics data of the tested internet application platform, thus monitoring resource usage during the testing process. For example, it can collect and monitor resource and performance data. During the automated performance test execution phase, it can collect real-time usage data such as the processor, memory, and JVM stack of the server hosting the internet application platform, and, in the case of a simulated home gateway device, collect performance metrics data such as the number of completed interactions and the time consumed. This data is placed in a message queue, routed to a designated queue according to the test scenario, and the performance metrics data of the internet application platform, such as success rate and speed, are calculated in real time and output to the interface for display.
[0042] Therefore, this application provides a performance testing system for an internet application platform based on TR069 communication to simulate home gateway devices. By simulating a large number of home gateway devices, such as a single 8-core 16G server, it simulates the interaction between over 500,000 home gateways and a web application platform. It connects service deployment, parameter and scenario configuration, performance test execution, and performance monitoring to form a controllable automated performance testing process, lowering the testing threshold and effectively improving testing efficiency. Furthermore, through flexible scenario configuration, it can achieve automated performance testing in both single and mixed scenarios, more closely resembling real-world usage scenarios, resulting in higher accuracy of test results, such as performance metrics data for the internet application platform. Moreover, it eliminates the need to rewrite scripts to simulate the interaction between home gateway devices and the internet application platform, reducing resource waste while achieving performance testing of bidirectional information transmission between a large number of home gateway devices and the internet application platform based on the TR069 communication protocol.
[0043] It should be noted that the testing method in this application embodiment is based on the TR-069 communication protocol and uses the Netty high-concurrency framework to simulate the interaction between a large number of home smart gateways and a web application platform. This enables automated performance testing of the web application platform in functions such as batch upgrades, batch parameter settings, and batch backup of gateway configurations for home gateway terminal devices. The TR-069 protocol is a standard protocol for remote management and configuration of devices, providing a unified management and configuration mechanism that enables remote monitoring, troubleshooting, configuration, and software upgrades of devices.
[0044] Secondly, based on the aforementioned testing system, combined withFigure 2 A test method provided in the embodiments of this application will be described in detail.
[0045] Figure 2 A flowchart of a testing method provided in an embodiment of this application.
[0046] like Figure 2 As shown, the testing method provided in this application embodiment can be applied to a testing system. Based on this, the testing method may include the following steps:
[0047] Step 210: Obtain test configuration data and the home gateway device participating in the test. The home gateway device supports the TR-069 communication protocol. Step 220: Based on the test configuration data and interaction data template, construct a test instruction set. The test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction responding to the connection request from the participating Internet application platform, and the second type of test instruction is an instruction sending a data request to the Internet application platform. Step 230: Upon receiving a connection request from the Internet application platform based on the device information of the home gateway device, send the first type of test instruction to the Internet application platform; and, when the home gateway device is connected to the Internet application platform, send the second type of test instruction to the Internet application platform. Step 240: Based on the connection request, the first type of test instruction, and the feedback data from the Internet application platform to the second type of test instruction, generate performance indicator data for testing the Internet application platform.
[0048] In this way, based on the TR069 communication protocol, it is possible to simulate the interaction between a large number of home gateway devices and Internet application platforms. It also connects the test configuration data, interaction data templates and test instruction sets associated with service deployment, the test command sending associated with performance test execution, and the performance indicator data of the test Internet application platform associated with performance monitoring, forming a controllable automated performance testing process. This lowers the testing threshold and effectively improves testing efficiency while simulating the two-way information transmission between a large number of home gateway devices and the Web application platform based on the TR069 communication protocol.
[0049] The steps described above are explained in detail below.
[0050] First, regarding step 210, in one or more possible embodiments, the test configuration data includes preset performance test requirement information, which includes the number of test instructions. Based on this, before step 210, the test method may also include steps 2501 and 2502.
[0051] Step 2501: Based on the number of test commands, select an initial home gateway device from multiple gateway devices that can carry the required number of test commands.
[0052] Step 2502: Select home gateway devices that support the TR-069 communication protocol from the initial home gateway devices.
[0053] Next, regarding step 220, in one or more possible embodiments, the test configuration data further includes a test scenario initialization instruction. The test scenario initialization instruction includes a first test scenario initialization instruction and a second test scenario initialization instruction. The first test scenario initialization instruction is used to instruct the home gateway device to adjust its operating state to a preset initial operating state. Based on this, before step 220, the test method may also include steps 2601 and 2602.
[0054] Step 2601: Based on the initialization command of the first test scenario, adjust the running state to the preset initial running state.
[0055] Step 2602: Send a second test scenario initialization command to the Internet application platform. The second test scenario initialization command is used to instruct the Internet application platform to clean up the scheduled tasks.
[0056] Therefore, the test environments for home gateway devices and internet platforms can be initialized and cleaned up by scheduled background tasks separately to ensure that the entire test environment is clean and undisturbed, thereby improving the accuracy of the test results.
[0057] Based on this, the test configuration data includes N test scenarios and M test tasks corresponding to the i-th test scenario among the N test scenarios. The M test tasks correspond to at least one interactive data template. The interactive data template includes preset fixed fields and variable fields. N and M are positive integers, i∈[1,N]. This step 220 may specifically include:
[0058] Based on the task field of the test task, the variable fields in the interaction data template corresponding to the test task are replaced to obtain the test instruction set corresponding to the test task; wherein, the variable fields include at least one of the following: the media access control address of the home gateway device, the Internet platform address, and the interaction instruction key.
[0059] For example, N can be 1, representing a single test scenario, such as a restart test scenario. This test scenario can correspond to 3 test tasks. These 3 test tasks can correspond to at least one interactive data template, i.e., 3 test tasks corresponding to one interactive data template, or 2 of the 3 test tasks corresponding to one interactive data template, and the other test task corresponding to another interactive data template. The interactive data template can include preset fixed fields and variable fields. The variable fields can generate different test instructions as fields such as the media access control address and internet platform address of the home gateway device change.
[0060] Therefore, a large number of test instructions can be generated quickly without human intervention, thus improving testing efficiency.
[0061] Furthermore, regarding step 230, in one or more possible embodiments, the test configuration data includes the data transmission method and device configuration information between the home gateway device and the Internet application platform. The data transmission method includes at least one of the following: interface method, structured query import method. The device configuration information includes the device address of the home gateway device and the time interval for sending connection requests in each batch. Based on this, before receiving the connection request sent by the Internet application platform based on the device information of the home gateway device, the test method may also include step 270.
[0062] Step 270: Based on the data transmission method, send instruction information to the Internet application platform. The instruction information carries device configuration information and is used to instruct the Internet application platform to send a connection request to the home gateway device based on the device configuration information and establish a connection with the home gateway device.
[0063] For example, before receiving a connection request, an instruction message is sent to the Internet application platform to instruct the Internet application platform to identify the home gateway device to which it is to establish a connection. At this time, the device address of the home gateway device, the number of batches of connection requests to be sent, the time interval between each batch of connection requests, and the test tasks under different test scenarios can be sent to the Internet application platform in order to establish a connection with the home gateway device and execute the test process.
[0064] In this way, the device address of the simulated home gateway device can be configured on the Internet application platform side, as well as the relevant configurations for each test task in the test scenario, the test task triggering method, the number of test instruction sets corresponding to the test task, the number of connection requests sent in each batch, and the time interval between sending connection requests in each batch. Thus, bidirectional interaction between the Internet application platform and the home gateway device can be achieved.
[0065] In another or more possible embodiments, the test configuration data includes the data transmission method between the home gateway device and the Internet application platform. The data transmission method includes at least one of the following: interface method, structured query import method. Based on this, step 230 may specifically include steps 2301 and 2302.
[0066] Step 2301: Upon receiving a connection request from the Internet application platform based on the device information of the home gateway device, send a first type of test instruction to the Internet application platform via data transmission.
[0067] Step 2302: With the home gateway device connected to the Internet application platform, send the second type of test command to the Internet application platform via data transmission.
[0068] For example, different data transmission methods can be selected for different batches. Specifically, when transmitting the first type of test instructions in the first batch, the data transmission method can be the interface method, i.e., the Application Programming Interface. At this time, the second type of test instructions can also be sent to the internet application platform using the same data transmission method. Then, when transmitting the first type of test instructions in the second batch, the data transmission method can be the Structured Query Language (SQL) method. At this time, the second type of test instructions can also be sent to the internet application platform using the same data transmission method, i.e., the SQL import method.
[0069] In this way, test commands can be transmitted by selecting different data transmission methods to test resource usage data of different data transmission methods, thus increasing the richness of testing in different scenarios.
[0070] In one or more possible embodiments, the test configuration data in this application embodiment includes the number of home gateway devices that send the first type of test command in each batch, the first preset time interval between receiving the connection request and sending the first type of test command, and the number of threads that interact with the Internet application platform. The step 230, which involves sending the first type of test command to the Internet application platform when a connection request is received from the Internet application platform based on the device information of the home gateway device, may specifically include steps 2303 to 2306.
[0071] Step 2303: Upon receiving a connection request from the Internet application platform based on the device information of the home gateway device, obtain from the test configuration data the first number of threads interacting with the Internet application platform in the first target batch corresponding to the connection request, the second number of home gateway devices sending the first type of test instructions, and the first target time point for sending the first type of test instructions. The first target time point is determined by the time point of receiving the connection request and the first preset time interval.
[0072] Step 2304: Based on the target test scenario corresponding to the connection request, store the target test instruction set of the target test task corresponding to the target test scenario into memory.
[0073] Step 2305: Extract the first target thread corresponding to the first quantity from the task thread pool.
[0074] Step 2306: Through the first target thread, call the home gateway device corresponding to the second number to send the first type of test instruction to the Internet application platform at the first target time point.
[0075] For example, the target test instruction set of the target test task can be loaded into memory, and the task thread pool can be started to simulate the home gateway device listening to the connection requests issued by the platform through a high-performance interface. According to the task identifier of the test task carried by each connection request, such as the task identifier of the restart task, the first type of test instruction in the target test instruction set is extracted, and the first target thread is taken out from the task thread pool. The first target thread completes the data interaction with the Internet application platform.
[0076] In one or more possible embodiments, the test configuration data in this application embodiment includes the number of home gateway devices that send the second type of test command in each batch, the second preset time interval between sending the first type of test command and sending the second type of test command, and the number of threads that interact with the Internet application platform. The step of sending the second type of test command to the Internet application platform when the home gateway device is connected to the Internet application platform may specifically include steps 2307 to 2310.
[0077] Step 2307: When the home gateway device is connected to the Internet application platform, obtain from the test configuration data the third number of threads interacting with the Internet application platform in the first target batch corresponding to the first type of test instruction, the fourth number of home gateway devices sending the second type of test instruction, and the second target time point for sending the second type of test instruction. The second target time point is determined by the time point for sending the first type of test instruction and the second preset time interval.
[0078] Step 2308: Based on the target test scenario corresponding to the connection request, store the target test instruction set of the target test task corresponding to the target test scenario into memory.
[0079] Step 2309: Extract the second target thread corresponding to the third quantity from the task thread pool.
[0080] Step 2310: Through the second target thread, call the home gateway device corresponding to the fourth quantity to send the second type of test instruction to the Internet application platform at the second target time point.
[0081] For example, continuing with the examples in steps 2303 to 2306 above, when it is indicated that the home gateway device has been connected to the Internet application platform, the target test instruction set of the restart test task can be obtained and stored in memory. At this time, the target test instruction can specifically be the second type of test instruction. Similarly, the task thread pool is started, and the third number of corresponding second target threads are taken out from the task thread pool. The second target thread completes the data interaction with the Internet application platform.
[0082] Then, regarding step 240, in one or more possible embodiments, step 240 may specifically include steps 2401 and 2402.
[0083] Step 2401: Collect the first resource usage data of each batch of connection requests in the target test scenario corresponding to the connection request, collect the second resource usage data of the first type of test instructions in response to the connection request, and collect the third resource usage data of the feedback data of the Internet application platform to the second type of test instructions.
[0084] Step 2402: Based on the target test scenario, collect the first resource usage data, the second resource usage data, and the third resource usage data to obtain the performance index data of the test Internet application platform.
[0085] For example, during the automated performance test run phase, real-time data is collected and monitored on the processor, memory, and JVM stack of the server hosting the internet application platform, as well as related data on the performance metrics of the home gateway device and the internet application platform, such as the number of completed interactions and the time consumed. The data obtained from both the internet application platform and the home gateway device are placed into a message queue, and the target test tasks corresponding to the target test scenario are routed to a designated queue according to the target test scenario. Real-time statistical calculations are performed on the performance metrics of the internet application platform under the test scenario, such as success rate and speed.
[0086] In addition, the test method provided in this application embodiment may also include step 280.
[0087] Step 280 displays the first resource usage data, the second resource usage data, the third resource usage data, and the performance index data of the Internet application platform.
[0088] For example, the resource usage data involved in step 240 and the performance metrics data of the internet application platform under the test scenario, such as success rate and speed, can be displayed. In this way, automated performance testing is carried out in the deployed test environment according to the set test scenario and task load conditions. During the test, the performance metrics data of the internet application platform under different test scenarios will be displayed in real time so that testers can view and confirm the results.
[0089] Therefore, the testing method provided in this application can simulate a large number of home gateways with relatively few hardware resources. A single 16-core, 8GB memory server can simulate 500,000 to 600,000 home gateway devices, and performance can be linearly increased by appropriately increasing the number of servers to meet the performance requirements of testing web application platforms. Furthermore, by simulating home gateway devices, automated performance testing of the platform is achieved, and service deployment, parameter configuration, test execution, and test process monitoring are linked together to form a complete automated performance testing system, improving testing efficiency. In addition, through flexible scenario configuration, automated performance testing of single and mixed scenarios can be achieved, more closely resembling real-world usage scenarios, and the test results have significant reference value for production environments.
[0090] It should be noted that each embodiment involved in the test system and test method provided in this application can be used alone or in combination with each other. One embodiment and another embodiment are only used to distinguish their steps and do not limit their relationship.
[0091] The testing method provided in this application can be executed by a testing device. This application uses a testing device executing the testing method as an example to illustrate the device used in the testing method provided in this application.
[0092] Based on the same inventive concept, this application also provides a testing device. (Specifically combined with...) Figure 3 Please provide a detailed explanation.
[0093] Figure 3 This is a schematic diagram of a testing device provided in an embodiment of this application.
[0094] like Figure 3 As shown, the testing device 30 can be applied to a testing system, and the testing device 30 may specifically include:
[0095] The acquisition module 301 is used to acquire test configuration data and home gateway devices participating in the test. The home gateway devices support the TR-069 communication protocol.
[0096] Module 302 is used to build a test instruction set based on test configuration data and interaction data template. The test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction that responds to the connection request of the Internet application platform participating in the test, and the second type of test instruction is an instruction that sends a data request to the Internet application platform.
[0097] The sending module 303 is used to send a first type of test instruction to the Internet application platform when it receives a connection request sent by the Internet application platform based on the device information of the home gateway device; and to send a second type of test instruction to the Internet application platform when the home gateway device is connected to the Internet application platform.
[0098] The generation module 303 is used to generate performance index data for testing the Internet application platform based on connection requests, the first type of test instructions, and feedback data from the Internet application platform to the second type of test instructions.
[0099] The test apparatus 30 in the embodiments of this application will be described in detail below.
[0100] In one or more possible embodiments, the sending module 303 in this application embodiment can also be used to send instruction information to the Internet application platform based on the data transmission method when the test configuration data includes the data transmission method and device configuration information between the home gateway device and the Internet application platform, the data transmission method includes at least one of the following: interface method, structured query import method, and the device configuration information includes the device address of the home gateway device and the time interval for sending connection requests in each batch. The instruction information carries the device configuration information and is used to instruct the Internet application platform to send a connection request to the home gateway device based on the device configuration information and establish a connection with the home gateway device.
[0101] In one or more possible embodiments, the sending module 303 in this application embodiment can also be used to send a first type of test instruction to the Internet application platform through the data transmission method when the test configuration data includes the data transmission method between the home gateway device and the Internet application platform, and the data transmission method includes at least one of the following: interface method, structured query import method; when a connection request is received from the Internet application platform based on the device information of the home gateway device, the first type of test instruction is sent to the Internet application platform through the data transmission method.
[0102] In addition, when the home gateway device is connected to the Internet application platform, a second type of test command is sent to the Internet application platform via data transmission.
[0103] In one or more possible embodiments, the testing device 30 in this application embodiment may further include a screening module; wherein...
[0104] The filtering module is used to filter the initial home gateway device that can carry the number of test commands from multiple gateway devices, based on the number of test commands, when the test configuration data includes preset performance test requirement information, and the preset performance test requirement information includes the number of test commands.
[0105] Additionally, select home gateway devices that support the TR-069 communication protocol from the initial home gateway devices.
[0106] In one or more possible embodiments, the testing device 30 in this application embodiment may further include an adjustment module; wherein...
[0107] The adjustment module is used to adjust the operating state to the preset initial operating state based on the test scenario initialization instructions when the test configuration data also includes test scenario initialization instructions, which include a first test scenario initialization instruction and a second test scenario initialization instruction. The first test scenario initialization instruction is used to instruct the home gateway device to adjust its operating state to the preset initial operating state.
[0108] The sending module 303 can also be used to send a second test scenario initialization command to the Internet application platform. The second test scenario initialization command is used to instruct the Internet application platform to clean up the scheduled tasks.
[0109] In one or more possible embodiments, the test apparatus 30 in this application embodiment may further include a replacement module; wherein...
[0110] The replacement module is used to replace the variable fields in the interaction data template corresponding to the test task based on the task field of the test task, when the test configuration data includes N test scenarios and M test tasks corresponding to the i-th test scenario in the N test scenarios, and the interaction data template includes preset fixed fields and variable fields, where N and M are positive integers and i∈[1,N]. This results in a test instruction set corresponding to the test task. The variable fields include at least one of the following: the media access control address of the home gateway device, the Internet platform address, and the interaction instruction key.
[0111] In one or more possible embodiments, the testing device 30 in this application embodiment may further include a first storage module, a first extraction module, and a first processing module; wherein...
[0112] The acquisition module 301 can also be used to, when the test configuration data includes the number of home gateway devices that send the first type of test command in each batch, the first preset time interval between receiving the connection request and sending the first type of test command, and the number of threads that interact with the Internet application platform, and a connection request sent by the Internet application platform based on the device information of the home gateway device is received, to obtain from the test configuration data the first number of threads that interact with the Internet application platform in the first target batch corresponding to the connection request, the second number of home gateway devices that send the first type of test command, and the first target time point for sending the first type of test command, wherein the first target time point is determined by the time point for receiving the connection request and the first preset time interval;
[0113] The first storage module is used to store the target test instruction set of the target test task corresponding to the target test scenario into memory based on the target test scenario corresponding to the connection request;
[0114] The first extraction module is used to extract the first target thread corresponding to the first quantity from the task thread pool;
[0115] The first processing module is used to call the home gateway devices corresponding to the second number through the first target thread to send the first type of test instructions to the Internet application platform at the first target time point.
[0116] In one or more possible embodiments, the testing device 30 in this application embodiment may further include a second storage module, a second extraction module, and a second processing module; wherein...
[0117] The acquisition module 301 can also be used to, when the test configuration data includes the number of home gateway devices that send the second type of test command in each batch, the second preset time interval between sending the first type of test command and sending the second type of test command, and the number of threads that interact with the Internet application platform, and when the home gateway devices are connected to the Internet application platform, obtain from the test configuration data the third number of threads that interact with the Internet application platform in the first target batch corresponding to the first type of test command, the fourth number of home gateway devices that send the second type of test command, and the second target time point for sending the second type of test command, wherein the second target time point is determined by the time point for sending the first type of test command and the second preset time interval;
[0118] The second storage module is used to store the target test instruction set of the target test task corresponding to the target test scenario into memory based on the target test scenario corresponding to the connection request.
[0119] The second extraction module is used to extract the second target thread corresponding to the third quantity from the task thread pool;
[0120] The second processing module is used to call the home gateway device corresponding to the fourth quantity through the second target thread, and send the second type of test instruction to the Internet application platform at the second target time point.
[0121] In one or more possible embodiments, the testing device 30 in this application embodiment may further include a data acquisition module and a statistics module; wherein...
[0122] The data acquisition module is used to acquire first resource usage data for each batch of connection requests in the target test scenario corresponding to the connection request, second resource usage data for the first type of test instructions in response to the connection request, and third resource usage data for the feedback data of the Internet application platform to the second type of test instructions.
[0123] The statistics module is used to collect data on the first resource usage, the second resource usage, and the third resource usage based on the target test scenario, in order to obtain performance index data for the tested internet application platform.
[0124] In one or more possible embodiments, the test device 30 in this application embodiment may further include a display module for displaying first resource usage data, second resource usage data, third resource usage data, and performance index data of the Internet application platform.
[0125] The testing device in this application embodiment can be a computer device or a component within the computer device, such as an integrated circuit or a chip. The computer device can be a terminal or other devices besides a terminal. For example, the computer device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle computer device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0126] The testing device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0127] The device coordination apparatus provided in this application embodiment can achieve... Figures 1 to 3 The various processes implemented in the test method embodiments shown achieve the same technical effect, and will not be described again here to avoid repetition.
[0128] Based on this, the testing apparatus provided in this application acquires test configuration data and a home gateway device participating in the test that supports the TR-069 communication protocol; based on the test configuration data and interaction data template, it constructs a test instruction set, which includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction responding to a connection request from an internet application platform participating in the test, and the second type of test instruction is an instruction sending a data request to the internet application platform; then, upon receiving a connection request from the internet application platform based on the device information of the home gateway device, it sends the first type of test instruction to the internet application platform; and, when the home gateway device is connected to the internet application platform, it sends the second type of test instruction to the internet application platform; based on the connection request, the first type of test instruction, and the feedback data from the internet application platform to the second type of test instruction, it generates performance index data for testing the internet application platform. In this way, based on the TR069 communication protocol, it is possible to simulate the interaction between a large number of home gateway devices and Internet application platforms. It also connects the test configuration data, interaction data templates and test instruction sets associated with service deployment, the test command sending associated with performance test execution, and the performance indicator data of the test Internet application platform associated with performance monitoring, forming a controllable automated performance testing process. This lowers the testing threshold and effectively improves testing efficiency while simulating the two-way information transmission between a large number of home gateway devices and the Web application platform based on the TR069 communication protocol.
[0129] Optional, such as Figure 4 As shown, this application embodiment also provides a computer device 40, including a processor 401 and a memory 402. The memory 402 stores a program or instructions that can run on the processor 401. When the program or instructions are executed by the processor 401, they implement the various steps of the above-described test method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0130] Figure 5 This is a schematic diagram of the hardware structure of a computer device provided in an embodiment of this application.
[0131] The computer device 500 includes, but is not limited to, components such as: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, and processor 510.
[0132] Those skilled in the art will understand that the computer device 500 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 510 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 5 The computer device structure shown in the figure does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0133] It should be understood that the input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042. The GPU 5041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 506 may include a display panel, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 507 includes at least one of a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch display. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as volume display buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0134] The memory 509 can be used to store software programs and various data. The memory 509 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 509 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 509 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0135] Processor 510 may include one or more processing units; optionally, processor 510 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless display signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 510.
[0136] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described test method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0137] The processor is the processor in the computer device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0138] In addition, this application embodiment provides another chip, which includes a processor and a display interface. The display interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described test method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0139] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0140] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described test method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0141] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0142] Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
[0143] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0144] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A testing method, characterized in that, include: Acquire test configuration data and home gateway devices participating in the test, wherein the home gateway devices support the TR-069 communication protocol; Based on the test configuration data and interaction data template, a test instruction set is constructed. The test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction that responds to the connection request of the Internet application platform participating in the test, and the second type of test instruction is an instruction that sends a data request to the Internet application platform. Upon receiving a connection request from the Internet application platform based on the device information of the home gateway device, the first type of test instruction is sent to the Internet application platform; and, if the home gateway device is connected to the Internet application platform, the second type of test instruction is sent to the Internet application platform. Based on the connection request, the first type of test instruction, and the feedback data from the Internet application platform to the second type of test instruction, performance indicator data for testing the Internet application platform is generated.
2. The method according to claim 1, characterized in that, The test configuration data includes the data transmission method and device configuration information between the home gateway device and the Internet application platform. The data transmission method includes at least one of the following: interface method and structured query import method. The device configuration information includes the device address of the home gateway device and the time interval for sending connection requests in each batch. The method further includes: Based on the data transmission method, an instruction message is sent to the Internet application platform. The instruction message carries the device configuration information and is used to instruct the Internet application platform to send a connection request to the home gateway device based on the device configuration information and establish a connection with the home gateway device.
3. The method according to claim 1, characterized in that, The test configuration data includes the data transmission method between the home gateway device and the Internet application platform, and the data transmission method includes at least one of the following: interface method, structured query import method; Upon receiving a connection request from the Internet application platform based on the device information of the home gateway device, the first type of test instruction is sent to the Internet application platform. And, when the home gateway device is connected to the internet application platform, send the second type of test command to the internet application platform, including: Upon receiving a connection request from the Internet application platform based on the device information of the home gateway device, the first type of test instruction is sent to the Internet application platform through the data transmission method; Furthermore, when the home gateway device is connected to the Internet application platform, the second type of test command is sent to the Internet application platform through the data transmission method.
4. The method according to claim 1, characterized in that, The test configuration data includes preset performance test requirements information, which includes the number of test instructions; Before acquiring the test configuration data and the home gateway devices participating in the test, the method further includes: Based on the number of test commands, an initial home gateway device capable of carrying the required number of test commands is selected from multiple gateway devices; Home gateway devices that support the TR-069 communication protocol are selected from the initial home gateway devices.
5. The method according to claim 1, characterized in that, The test configuration data includes test scenario initialization instructions, which include a first test scenario initialization instruction and a second test scenario initialization instruction. The first test scenario initialization instruction is used to instruct the home gateway device to adjust its operating state to a preset initial operating state. Before constructing the test instruction set based on the test configuration data and interaction data template, the method further includes: Based on the initialization command of the first test scenario, the running state is adjusted to the preset initial running state; In addition, the second test scenario initialization instruction is sent to the Internet application platform, which instructs the Internet application platform to clean up the scheduled tasks.
6. The method according to claim 1, characterized in that, The test configuration data includes N test scenarios and M test tasks corresponding to the i-th test scenario among the N test scenarios. The M test tasks correspond to at least one interactive data template. The interactive data template includes preset fixed fields and variable fields. N and M are positive integers, and i∈[1,N]. The step of constructing a test instruction set based on the test configuration data and interaction data template includes: Based on the task field of the test task, the variable fields in the interaction data template corresponding to the test task are replaced to obtain the test instruction set corresponding to the test task; wherein, the variable fields include at least one of the following: the media access control address of the home gateway device, the Internet platform address, and the interaction instruction key.
7. The method according to claim 6, characterized in that, The test configuration data includes the number of home gateway devices sending the first type of test command in each batch, a first preset time interval between receiving the connection request and sending the first type of test command, and the number of threads interacting with the Internet application platform; the step of sending the first type of test command to the Internet application platform upon receiving a connection request from the Internet application platform based on the device information of the home gateway device includes: Upon receiving a connection request from the Internet application platform based on the device information of the home gateway device, the test configuration data is used to obtain the first number of threads interacting with the Internet application platform in the first target batch corresponding to the connection request, the second number of home gateway devices sending the first type of test instructions, and the first target time point for sending the first type of test instructions. The first target time point is determined by the time point of receiving the connection request and the first preset time interval. Based on the target test scenario corresponding to the connection request, the target test instruction set of the target test task corresponding to the target test scenario is stored in memory; Extract the first target thread corresponding to the first quantity from the task thread pool; Through the first target thread, the home gateway device corresponding to the second quantity is invoked to send the first type of test instruction to the Internet application platform at the first target time point.
8. The method according to claim 6, characterized in that, The test configuration data includes the number of home gateway devices that send the second type of test instructions in each batch, the second preset time interval between sending the first type of test instructions and sending the second type of test instructions, and the number of threads that interact with the Internet application platform; When the home gateway device is connected to the internet application platform, sending the second type of test command to the internet application platform includes: When the home gateway device is connected to the Internet application platform, the third number of threads interacting with the Internet application platform in the first target batch corresponding to the first type of test instruction, the fourth number of home gateway devices sending the second type of test instruction, and the second target time point for sending the second type of test instruction are obtained from the test configuration data. The second target time point is determined by the time point for sending the first type of test instruction and the second preset time interval. Based on the target test scenario corresponding to the connection request, the target test instruction set of the target test task corresponding to the target test scenario is stored in memory; Extract the second target thread corresponding to the third quantity from the task thread pool; The second target thread invokes the home gateway device corresponding to the fourth quantity to send the second type of test instruction to the Internet application platform at the second target time point.
9. The method according to claim 1, characterized in that, The process of generating performance indicator data for testing the internet application platform based on the connection request, the first type of test instruction, and the feedback data from the internet application platform to the second type of test instruction includes: Collect first resource usage data for each batch of connection requests in the target test scenario corresponding to the connection request, collect second resource usage data for the first type of test instructions in response to the connection request, and collect third resource usage data for the feedback data of the Internet application platform to the second type of test instructions; Based on the target test scenario, the first resource usage data, the second resource usage data, and the third resource usage data are statistically analyzed to obtain the performance index data of the tested Internet application platform.
10. The method according to claim 9, characterized in that, The method further includes: The system displays the first resource usage data, the second resource usage data, the third resource usage data, and the performance metrics data of the Internet application platform.
11. A testing apparatus, characterized in that, include: The acquisition module is used to acquire test configuration data and home gateway devices participating in the test, wherein the home gateway devices support the TR-069 communication protocol; The construction module is used to construct a test instruction set based on the test configuration data and interaction data template. The test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction that responds to the connection request of the Internet application platform participating in the test, and the second type of test instruction is an instruction that sends a data request to the Internet application platform. The sending module is configured to send the first type of test instruction to the Internet application platform when it receives a connection request sent by the Internet application platform based on the device information of the home gateway device; and to send the second type of test instruction to the Internet application platform when the home gateway device is connected to the Internet application platform. The generation module is used to generate performance index data for testing the Internet application platform based on the connection request, the first type of test instruction, and the feedback data of the Internet application platform to the second type of test instruction.
12. A testing system, characterized in that, include: The initialization module is used to obtain test configuration data; An environment deployment module is used to acquire home gateway devices participating in the test, the home gateway devices supporting the TR-069 communication protocol; and, the test configuration data also includes test scenario initialization instructions, the test scenario initialization instructions including a first test scenario initialization instruction and a second test scenario initialization instruction, the first test scenario initialization instruction being used to instruct the home gateway device to adjust its operating state to a preset initial operating state, and, based on the first test scenario initialization instruction, to adjust its operating state to a preset initial operating state; and to send the second test scenario initialization instruction and instruction information to the participating Internet application platform, the second test scenario initialization instruction being used to instruct the Internet application platform to clean up scheduled tasks, the instruction information carrying device configuration information, the instruction information being used to instruct the Internet application platform to send a connection request to the home gateway device based on the device configuration information, and to establish a connection with the home gateway device; The scenario management module is used to construct a test instruction set based on the test configuration data and interaction data template. The test instruction set includes a first type of test instruction and a second type of test instruction. The first type of test instruction is a test instruction that responds to the connection request of the Internet application platform participating in the test, and the second type of test instruction is an instruction that sends a data request to the Internet application platform. The task management module is used to receive connection requests sent by the Internet application platform based on the device information of the home gateway device using the Netty high-concurrency framework, and to send the first type of test instruction to the Internet application platform when the connection request is received; and to send the second type of test instruction to the Internet application platform when the home gateway device is connected to the Internet application platform. The monitoring and management module generates performance indicator data for testing the Internet application platform based on the connection request, the first type of test instruction, and the feedback data of the Internet application platform to the second type of test instruction; and displays the performance indicator data of the Internet application platform.
13. A computer device, characterized in that, include: A processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the test method as described in any one of claims 1-10.
Citation Information
Patent Citations
Server cluster, test method and device of server cluster and electronic equipment
CN115022328A
Performance test method and device, equipment and storage medium
CN116938780A