Acquisition and control module testing method, equipment, storage medium and program product

By configuring thread groups to batch call the basic service interface of the procurement and control platform equipment, automated batch testing of the procurement and control module of the procurement and control platform equipment is realized, solving the problems of inefficient testing and large human resource occupation in the existing technology, and improving the Test efficiency and safety.

CN115550216BActive Publication Date: 2025-02-18AGRICULTURAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211175084.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-02-18
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

In the prior art, the equipment managed by the procurement and control platform needs to be tested separately. The test efficiency is low, it occupies a large amount of human resources, and the testing steps are cumbersome and the operation risks are high.

Method used

By obtaining the equipment information of the equipment managed by the procurement and control platform and the basic service interface information of the procurement and control module, a thread group is configured to control the basic service interface of the batch call equipment of the procurement and control platform, and batch testing of the procurement and control module is automatically carried out.

Benefits of technology

It realizes automated batch testing of the procurement and control modules of the equipment managed by the procurement and control platform, saving time and labor costs, and improving testing efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550216B_ABST
    Figure CN115550216B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, storage medium and program product for testing a collection and control module, which obtains the device information of each device under test managed by the collection and control platform and the external basic service interface information of the collection and control module installed by each device under test; according to the device information and basic service interface information of the device under test, a group of thread groups are configured for the same type of basic service interfaces of different devices under test, and the thread group is used to control the collection and control platform to batch call the basic service interface of the device under test; in response to the instruction of running the thread group, the thread group is executed to control the collection and control platform to batch call the basic service interface of the device under test, and obtain the call result information returned by the device under test to the collection and control platform; according to the call result information, the test results of the collection and control modules of each device under test are determined. The thread group is used to realize the automatic batch testing of the collection and control modules of the devices under test managed by the collection and control platform, saving time and labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium and program product for testing an acquisition and control module. Background Art

[0002] The acquisition and control platform can provide unified acquisition and control capabilities for multi-cloud environments and heterogeneous IT architectures, and provide out-of-the-box service interfaces to achieve unified acquisition and control scheduling in distributed, cross-center, and multi-network environments. The acquisition and control platform is the key to achieving automated operation of managed devices. Due to the large number of managed devices, it has also become the focus and difficulty of operation and maintenance and testing.

[0003] The acquisition and control platform usually needs to manage a large number of devices, and the operating system categories of the devices are different. The existing technology requires that the acquisition and control capabilities of each device be tested separately. The test efficiency is low, it takes up a lot of human resources, and the test steps are cumbersome and the operation risks are relatively high. Summary of the invention

[0004] The present application provides a method, device, storage medium and program product for testing an acquisition and control module, so as to realize automated batch testing of acquisition and control modules of devices to be tested managed by an acquisition and control platform.

[0005] In a first aspect, the present application provides a method for testing an acquisition and control module, comprising:

[0006] Obtain the device information of each device under test managed by the acquisition and control platform, as well as the external basic service interface information of the acquisition and control modules installed on each device under test;

[0007] According to the device information of the device under test and the basic service interface information, a group of thread groups are configured for the same type of basic service interfaces of different devices under test; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of the device under test;

[0008] In response to an instruction to run the thread group, the thread group is executed to control the acquisition and control platform to batch call the basic service interface of the device under test, and obtain the call result information returned by the device under test to the acquisition and control platform;

[0009] The test results of the acquisition and control modules of each device under test are determined according to the call result information.

[0010] In an optional design, the basic service interface includes:

[0011] Restart the acquisition and control module interface, update the acquisition and control module interface, and install the local monitoring module interface;

[0012] The configuring of a group of thread groups for the same type of basic service interfaces of different devices under test includes:

[0013] Configure the first thread group for the restart acquisition and control module interface of different devices under test;

[0014] Configure the second thread group for updating the acquisition and control module interface for different devices under test;

[0015] The third thread group is configured for installing local monitoring module interfaces of different devices under test.

[0016] In an optional design, executing the thread group includes:

[0017] The thread groups are executed in sequence according to the first thread group, the second thread group, and the third thread group; wherein the next thread group is executed after all threads in the previous thread group are executed.

[0018] In an optional design, executing the thread group includes:

[0019] For the currently executed thread group, if it is determined that the call result information corresponding to any device under test in the previous thread group is failed, the thread corresponding to the device under test in the currently executed thread group is skipped.

[0020] In an optional design, configuring a group of thread groups for the same type of basic service interfaces of different devices under test according to the device information of the device under test and the basic service interface information includes:

[0021] A Jmeter thread group is created for each type of basic service interface, and the device information of the device to be tested is passed as a parameter to each Jmeter thread group, so that each Jmeter thread group can run the Jmeter script according to the device information of the device to be tested to control the acquisition and control platform to batch call the basic service interface of the corresponding type of the device to be tested.

[0022] In an optional design, determining the test result of the acquisition and control module of each device to be tested according to the call result information includes:

[0023] According to the calling result information, the calling result information indicates that the device under test and the basic service interface whose calling failed are determined, and a test report is generated.

[0024] In a second aspect, the present application provides a collection and control module testing device, comprising:

[0025] The acquisition module is used to obtain the device information of each device under test managed by the acquisition and control platform, as well as the external basic service interface information of the acquisition and control module installed on each device under test;

[0026] A thread group configuration module is used to configure a group of thread groups for the same type of basic service interfaces of different devices under test according to the device information of the device under test and the basic service interface information; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of the device under test;

[0027] An execution module, configured to execute the thread group in response to an instruction to run the thread group, so as to control the acquisition and control platform to batch call the basic service interface of the device under test, and obtain the call result information returned by the device under test to the acquisition and control platform;

[0028] The analysis module is used to determine the test results of the acquisition and control modules of each device under test according to the call result information.

[0029] In an optional design, the basic service interface includes:

[0030] Restart the acquisition and control module interface, update the acquisition and control module interface, and install the local monitoring module interface;

[0031] When configuring a group of thread groups for the same type of basic service interfaces of different devices under test, the thread group configuration module is used to:

[0032] Configure the first thread group for the restart acquisition and control module interface of different devices under test;

[0033] Configure the second thread group for updating the acquisition and control module interface for different devices under test;

[0034] The third thread group is configured for installing local monitoring module interfaces of different devices under test.

[0035] In an optional design, when executing the thread group, the execution module is used to:

[0036] The thread groups are executed in sequence according to the first thread group, the second thread group, and the third thread group; wherein the next thread group is executed after all threads in the previous thread group are executed.

[0037] In an optional design, when executing the thread group, the execution module is used to:

[0038] For the currently executed thread group, if it is determined that the call result information corresponding to any device under test in the previous thread group is failed, the thread corresponding to the device under test in the currently executed thread group is skipped.

[0039] In an optional design, when configuring a group of thread groups for the same type of basic service interfaces of different devices under test according to the device information of the device under test and the basic service interface information, the thread group configuration module is used to:

[0040] A Jmeter thread group is created for each type of basic service interface, and the device information of the device to be tested is passed as a parameter to each Jmeter thread group, so that each Jmeter thread group can run the Jmeter script according to the device information of the device to be tested to control the acquisition and control platform to batch call the basic service interface of the corresponding type of the device to be tested.

[0041] In an optional design, when determining the test result of the acquisition and control module of each device under test according to the call result information, the analysis module is used to:

[0042] According to the calling result information, the calling result information indicates that the device under test and the basic service interface whose calling failed are determined, and a test report is generated.

[0043] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0044] The memory stores computer-executable instructions;

[0045] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.

[0046] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0047] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.

[0048] The acquisition and control module testing method, equipment, storage medium and program product provided by the present application obtain the device information of each device under test managed by the acquisition and control platform, and the external basic service interface information of the acquisition and control module installed by each device under test; according to the device information and basic service interface information of the device under test, a group of thread groups are configured for the same type of basic service interfaces of different devices under test; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of the device under test; in response to the instruction of running the thread group, the thread group is executed to control the acquisition and control platform to batch call the basic service interface of the device under test, and obtain the call result information returned by the device under test to the acquisition and control platform; according to the call result information, the test results of the acquisition and control modules of each device under test are determined. The acquisition and control modules of the devices under test managed by the acquisition and control platform are automatically tested in batches through the thread group, saving time and labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0050] Figure 1 A schematic diagram of an application scenario of a method for testing a collection and control module provided in an embodiment of the present application;

[0051] Figure 2 A flowchart of a method for testing a collection and control module provided in one embodiment of the present application;

[0052] Figure 3 A structural diagram of a sampling and control module testing device provided in one embodiment of the present application;

[0053] Figure 4 A structural diagram of an electronic device provided in one embodiment of the present application.

[0054] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0056] First, the technical terms involved in this application are explained:

[0057] Procurement and control platform: It provides unified procurement and control capabilities for multi-cloud environments and heterogeneous IT architectures, and provides out-of-the-box service interfaces to achieve unified procurement and control scheduling in distributed, cross-center, and multi-network environments.

[0058] Apache Jmeter: It is a Java-based testing tool developed by the Apache organization for testing software.

[0059] The procurement and control platform is the key to achieving automated operation of the managed equipment. Due to the huge number of devices it manages, it has also become the focus and difficulty of operation, maintenance and testing.

[0060] The acquisition and control platform usually needs to manage a large number of devices, and the operating system categories of the devices are different. The existing technology requires that the acquisition and control capabilities of each device be tested separately. The test efficiency is low, it takes up a lot of human resources, and the test steps are cumbersome and the operation risks are relatively high.

[0061] In order to solve the above technical problems, the present application provides a method for testing acquisition and control modules, so as to realize automated batch testing of acquisition and control modules of the devices to be tested managed by the acquisition and control platform. Specifically, the device information of each device to be tested managed by the acquisition and control platform and the external basic service interface information of the acquisition and control modules installed by each device to be tested can be obtained; according to the device information and basic service interface information of the device to be tested, a group of thread groups are configured for the same type of basic service interfaces of different devices to be tested; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of the device to be tested; in response to the instruction to run the thread group, the thread group is executed to control the acquisition and control platform to batch call the basic service interface of the device to be tested, and obtain the call result information returned by the device to be tested to the acquisition and control platform; according to the call result information, the test results of the acquisition and control modules of each device to be tested are determined. The acquisition and control modules of the devices to be tested managed by the acquisition and control platform can be automatically tested in batches through the thread group, saving time and manpower costs.

[0062] The specific application scenarios of this application are as follows Figure 1 As shown, it includes a procurement and control platform server, multiple devices under test managed by the procurement and control platform, and a control end, the control end is used to execute the procurement and control module testing method provided in the present application, obtain the device information of each device under test managed by the procurement and control platform, and the external basic service interface information of the procurement and control module installed on each device under test; according to the device information and basic service interface information of the device under test, a group of thread groups are configured for the same type of basic service interfaces of different devices under test; wherein the thread group is used to control the procurement and control platform to batch call the basic service interface of this type of the device under test; in response to the instruction to run the thread group, the thread group is executed to control the procurement and control platform to batch call the basic service interface of this type of the device under test, and obtain the call result information returned by the device under test to the procurement and control platform; according to the call result information, the test results of the procurement and control modules of each device under test are determined.

[0063] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0064] Figure 2This is a flow chart of the acquisition and control module testing method provided in the embodiment of the present application. This embodiment provides an acquisition and control module testing method, and its execution device is an electronic product such as a terminal device or a server. The specific steps of the acquisition and control module testing method are as follows:

[0065] S201, obtaining device information of each device under test managed by the acquisition and control platform, and external basic service interface information of the acquisition and control module installed in each device under test.

[0066] In this embodiment, the acquisition and control module installed on the device under test communicates with the acquisition and control platform server through the acquisition and control module, so that the acquisition and control platform can manage and uniformly control each device under test, including the supervision and control of the device under test. The acquisition and control module is configured with multiple service interfaces, each of which can implement a specific service. The acquisition and control platform can call the interface service of the acquisition and control module to implement the corresponding service.

[0067] In order to test the functions of the acquisition and control modules installed in each device under test, it is possible to test whether the external basic service interface of the acquisition and control module installed in each device under test can be called normally. If the basic service interface of the acquisition and control module installed in a certain device under test cannot be called normally, it can be determined that the function of the acquisition and control module is abnormal.

[0068] In this embodiment, the device information of each device under test managed by the acquisition and control platform can be obtained, including but not limited to one or more of the machine name, operating system type, machine IP address, and machine status.

[0069] In addition, it is also necessary to obtain the external basic service interface information of the acquisition and control modules installed on each device under test, including but not limited to service interface identification information such as interface domain name and port number. Optionally, the basic service interface may include but is not limited to one or more of the following: restarting the acquisition and control module interface, updating the acquisition and control module interface, and installing the local monitoring module interface. The restarting the acquisition and control module interface is used to control the restart of the acquisition and control module. The updating the acquisition and control module interface is used to send the acquisition and control module installation package and update instructions to control the acquisition and control module update. The installing the local monitoring module interface is used to send the local monitoring module installation package and installation instructions, and control the acquisition and control module to install the monitoring module locally on the device under test. The monitoring module is used to collect the target parameters of the device under test, including but not limited to parameters such as CPU usage and memory usage.

[0070] S202. According to the device information of the device under test and the basic service interface information, configure a group of thread groups for the same type of basic service interfaces of different devices under test; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of the device under test.

[0071] In this embodiment, in order to realize automated batch testing of the acquisition and control modules of the equipment under test and reduce manual operations, a group of thread groups are configured for the same type of basic service interfaces of different equipment under test. The thread groups are used to control the acquisition and control platform to batch call the basic service interfaces of this type of equipment under test. One group of thread groups includes multiple threads, and each thread is used to control the acquisition and control platform to call the basic service interface of this type of equipment under test. Through the operation of the thread group, manual operation of the basic service interface of each equipment under test can be avoided.

[0072] Optionally, when the basic service interface includes a restart acquisition and control module interface, an update acquisition and control module interface, and an installation local monitoring module interface, a first thread group can be configured for the restart acquisition and control module interface of different devices under test, the first thread group including multiple threads, each thread being used to control the acquisition and control platform to call the restart acquisition and control module interface corresponding to the device under test; a second thread group can be configured for the update acquisition and control module interface of different devices under test, the second thread group including multiple threads, each thread being used to control the acquisition and control platform to call the update acquisition and control module interface corresponding to the device under test; a third thread group can be configured for the installation local monitoring module interface of different devices under test, the third thread group including multiple threads, each thread being used to control the acquisition and control platform to call the installation local monitoring module interface corresponding to the device under test.

[0073] Optionally, when configuring a group of thread groups for the same type of basic service interfaces of different devices under test, a Jmeter thread group can be created for each type of basic service interface, and the device information of the device under test is passed as a parameter (array type parameter) to each Jmeter thread group, so that each Jmeter thread group can run the Jmeter script according to the device information of the device under test to control the acquisition and control platform to batch call the basic service interface of the corresponding type of the device under test. For example, each thread in the first thread group runs a Jmeter script for each device under test according to the device information of the device under test, and the Jmeter script is used to control the acquisition and control platform to call the restart acquisition and control module interface corresponding to the device under test for testing. Optionally, the user can select certain devices under test, and pass the device information parameters of these devices under test into each Jmeter thread group, so that only the devices under test selected by the user are tested.

[0074] S203, in response to an instruction to run the thread group, executing the thread group to control the acquisition and control platform to batch call the basic service interface of the device under test of this type, and obtain the call result information returned by the device under test to the acquisition and control platform.

[0075] In this embodiment, the user only needs to control the execution thread group to start the automatic batch test of the basic service interface of the acquisition and control module of the device under test, without manually operating the basic service interface of each device under test. For a thread group, the threads included therein are run in sequence, that is, the control acquisition and control platform is controlled to call the basic service interface of the corresponding type of each device under test in sequence. Optionally, the next thread can be executed after one thread is executed. Of course, multiple threads can also be executed simultaneously. Each time the basic service interface of the device under test is called, the call result information will be returned, such as whether the call is successful. The call result information for different basic service interfaces is different. For restarting the acquisition and control module interface, it can return whether the restart is successful, etc. For updating the acquisition and control module interface, it can return whether it is updated, the current acquisition and control module version, etc. For installing the local monitoring module interface, it can return whether the installation is successful, the monitoring module version, whether the monitoring module is working normally (some target parameters of the device under test can be returned), etc.

[0076] Optionally, on the basis of the above embodiment, if the first thread group is configured for the restart acquisition and control module interface of different devices under test, the second thread group is configured for the update acquisition and control module interface of different devices under test, and the third thread group is configured for the installation of local monitoring module interface of different devices under test, each thread group can be executed in the order of the first thread group, the second thread group, and the third thread group; the next thread group can be executed after all threads in the previous thread group have been executed. Among them, the restart acquisition and control module interface is more basic than the update acquisition and control module interface, and the update acquisition and control module interface is more basic than the installation of the local monitoring module interface. Therefore, the thread groups are executed in the order of the first thread group, the second thread group, and the third thread group, that is, the most basic restart acquisition and control module interface is tested first, the secondary update acquisition and control module interface is tested, and finally the installation of the local monitoring module interface is tested, so as to achieve step-by-step testing.

[0077] Furthermore, on the basis of executing each thread group in the order of the first thread group, the second thread group, and the third thread group, for the currently executed thread group, if it is determined that the call result information corresponding to any device under test in the previous thread group is failed, the thread corresponding to the device under test in the currently executed thread group is skipped.

[0078] In this embodiment, since the restart acquisition and control module interface is more basic than the update acquisition and control module interface, and the update acquisition and control module interface is more basic than the installation local monitoring module interface, if the restart acquisition and control module interface of a certain device under test cannot be called normally, there is no need to call the update acquisition and control module interface and the installation local monitoring module interface of the device under test later. If the update acquisition and control module interface of a certain device under test cannot be called normally, there is no need to call the installation local monitoring module interface of the device under test later. Therefore, for the currently executed thread group, if it is determined that the call result information corresponding to a certain device under test in the previous thread group is failed, skip the thread corresponding to the device under test in the currently executed thread group, and continue to execute the threads corresponding to other subsequent devices under test. For example, when the second thread group is currently executed, for a certain device under test A, determine whether the call result information corresponding to the device under test A in the first thread group is failed. If it is failed, it means that the restart acquisition and control module interface of the device under test A cannot be called normally, so there is no need to execute the thread corresponding to the device under test A in the second thread group.

[0079] S204: Determine the test result of the acquisition and control module of each device to be tested according to the call result information.

[0080] In this embodiment, statistical analysis can be performed based on the collected call result information to obtain the test results of the acquisition and control modules of each device under test. Optionally, a test report can be generated for the statistical analysis results.

[0081] Optionally, based on the call result information, statistical analysis can be performed to determine the failed device under test and its basic service interface whose call failed, and generate a test report to facilitate users to quickly and easily identify devices with abnormal acquisition and control module functions.

[0082] The acquisition and control module testing method of this embodiment obtains the device information of each device under test managed by the acquisition and control platform, and the external basic service interface information of the acquisition and control module installed on each device under test; according to the device information and basic service interface information of the device under test, a group of thread groups are configured for the same type of basic service interfaces of different devices under test; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of the device under test; in response to the instruction of running the thread group, the thread group is executed to control the acquisition and control platform to batch call the basic service interface of the device under test, and obtain the call result information returned by the device under test to the acquisition and control platform; according to the call result information, the test results of the acquisition and control modules of each device under test are determined. The thread group is used to realize the automated batch testing of the acquisition and control modules of the devices under test managed by the acquisition and control platform, saving time and labor costs.

[0083] Figure 3The structure diagram of the acquisition and control module testing device provided in the embodiment of the present application is provided. The acquisition and control module testing device provided in this embodiment can execute the processing flow provided in the acquisition and control module testing method embodiment, such as Figure 3 As shown, the acquisition and control module testing device 300 includes: an acquisition module 301, a thread group configuration module 302, an execution module 303, and an analysis module 304.

[0084] The acquisition module 301 is used to acquire the device information of each device under test managed by the acquisition and control platform, and the external basic service interface information of the acquisition and control module installed in each device under test;

[0085] The thread group configuration module 302 is used to configure a group of thread groups for the same type of basic service interfaces of different devices under test according to the device information of the device under test and the basic service interface information; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of the device under test of this type;

[0086] An execution module 303 is used to execute the thread group in response to an instruction to run the thread group, so as to control the acquisition and control platform to batch call the basic service interface of the device under test, and obtain the call result information returned by the device under test to the acquisition and control platform;

[0087] The analysis module 304 is used to determine the test results of the acquisition and control modules of each device under test according to the call result information.

[0088] In an optional design, the basic service interface includes:

[0089] Restart the acquisition and control module interface, update the acquisition and control module interface, and install the local monitoring module interface;

[0090] When configuring a group of thread groups for the same type of basic service interfaces of different devices under test, the thread group configuration module 302 is used to:

[0091] Configure the first thread group for the restart acquisition and control module interface of different devices under test;

[0092] Configure the second thread group for updating the acquisition and control module interface for different devices under test;

[0093] The third thread group is configured for installing local monitoring module interfaces of different devices under test.

[0094] In an optional design, when executing the thread group, the execution module 303 is used to:

[0095] The thread groups are executed in sequence according to the first thread group, the second thread group, and the third thread group; wherein the next thread group is executed after all threads in the previous thread group are executed.

[0096] In an optional design, when executing the thread group, the execution module 303 is used to:

[0097] For the currently executed thread group, if it is determined that the call result information corresponding to any device under test in the previous thread group is failed, the thread corresponding to the device under test in the currently executed thread group is skipped.

[0098] In an optional design, when configuring a group of thread groups for the same type of basic service interfaces of different devices under test according to the device information of the device under test and the basic service interface information, the thread group configuration module 302 is used to:

[0099] A Jmeter thread group is created for each type of basic service interface, and the device information of the device to be tested is passed as a parameter to each Jmeter thread group, so that each Jmeter thread group can run the Jmeter script according to the device information of the device to be tested to control the acquisition and control platform to batch call the basic service interface of the corresponding type of the device to be tested.

[0100] In an optional design, when determining the test result of the acquisition and control module of each device under test according to the call result information, the analysis module 304 is used to:

[0101] According to the calling result information, the calling result information indicates that the device under test and the basic service interface whose calling failed are determined, and a test report is generated.

[0102] The acquisition and control module testing device of the embodiment of the present application can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0103] Figure 4 FIG. 1 shows a hardware structure diagram of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 400 is used to implement the operation corresponding to the electronic device in any of the above method embodiments. The electronic device 400 of this embodiment may include: a memory 401, a processor 402 and a communication interface 403.

[0104] The memory 401 is used to store computer programs. The memory 401 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk.

[0105] The processor 402 is used to execute the computer program stored in the memory to implement the method in the above embodiment. For details, please refer to the relevant description in the above method embodiment. The processor 402 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the invention can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0106] Optionally, the memory 401 can be independent or integrated with the processor 402. When the memory 401 is a device independent of the processor 402, the electronic device 400 may further include a bus. The bus is used to connect the memory 401 and the processor 402. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0107] The communication interface 403 is used to transmit instructions and / or data.

[0108] The electronic device provided in this embodiment can be used to execute the acquisition and control module testing method in the above-mentioned embodiment. Its implementation method and technical effect are similar, and this embodiment will not be repeated here.

[0109] In addition, this embodiment further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the method described in the above embodiment.

[0110] In addition, this embodiment also provides a computer program product, including a computer program (computer execution instructions), and the computer program is executed by a processor to implement the method described in the above embodiment.

[0111] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0113] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0114] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0115] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0116] The above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, rather than to limit them. Although the embodiments of the present application are described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0117] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0118] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for testing a collection and control module, characterized in that: Applied to the control end, including: Obtain the device information of each device under test managed by the acquisition and control platform and the external basic service interface information of the acquisition and control module installed on each device under test; According to the device information of the device under test and the basic service interface information, a group of thread groups are configured for the same type of basic service interfaces of different devices under test; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of the device under test; In response to an instruction to run the thread group, the thread group is executed to control the acquisition and control platform to batch call the basic service interface of the device under test, and obtain the call result information returned by the device under test to the acquisition and control platform; Determine the test result of the acquisition and control module of each device under test according to the call result information; The basic service interface includes: restart acquisition and control module interface, update acquisition and control module interface and install local monitoring module interface; the restart acquisition and control module interface is used to control the restart of the acquisition and control module, the update acquisition and control module interface is used to send acquisition and control module installation package and update instructions to control the acquisition and control module update, the install local monitoring module interface is used to send local monitoring module installation package and installation instructions to control the acquisition and control module to install the monitoring module locally on the device under test, and the monitoring module is used to collect the target parameters of the device under test; The configuring of a group of thread groups for the same type of basic service interfaces of different devices under test includes: A first thread group is configured for the restart acquisition and control module interface of different devices under test; the first thread group includes a plurality of first threads, each of which is used to control the acquisition and control platform to call a restart acquisition and control module interface corresponding to a device under test; A second thread group is configured for the update acquisition and control module interface of different devices under test; the second thread group includes a plurality of second threads, each of which is used to control the acquisition and control platform to call an update acquisition and control module interface corresponding to a device under test; A third thread group is configured for the installation local monitoring module interface of different devices under test; the third thread group includes a plurality of third threads, each of which is used to control the acquisition and control platform to call the installation local monitoring module interface corresponding to a device under test; The executing the thread group includes: The three thread groups are executed in sequence according to the order of the first thread group, the second thread group and the third thread group; wherein the next thread group is executed after all threads in the previous thread group are executed.

2. The method according to claim 1, characterized in that The executing the thread group includes: For the currently executed thread group, if it is determined that the call result information corresponding to any device under test in the previous thread group is failed, the thread corresponding to the device under test in the currently executed thread group is skipped.

3. The method according to claim 1 or 2, characterized in that: The configuring a group of thread groups for the same type of basic service interfaces of different devices under test according to the device information of the device under test and the basic service interface information includes: A Jmeter thread group is created for each type of basic service interface, and the device information of the device to be tested is passed as a parameter to each Jmeter thread group, so that each Jmeter thread group runs a Jmeter script according to the device information of the device to be tested to control the acquisition and control platform to batch call the basic service interface of the corresponding type of the device to be tested.

4. The method according to claim 1 or 2, characterized in that: Determining the test result of the acquisition and control module of each device to be tested according to the calling result information includes: According to the calling result information, the calling result information indicates that the device under test and the basic service interface whose calling failed are determined, and a test report is generated.

5. A sampling and control module testing device, characterized in that: include: The acquisition module is used to obtain the device information of each device under test managed by the acquisition and control platform and the external basic service interface information of the acquisition and control module installed on each device under test; A thread group configuration module is used to configure a group of thread groups for the same type of basic service interfaces of different devices under test according to the device information of the device under test and the basic service interface information; wherein the thread group is used to control the acquisition and control platform to batch call the basic service interface of this type of device under test; the basic service interface includes: a restart acquisition and control module interface, an update acquisition and control module interface and an install local monitoring module interface; the restart acquisition and control module interface is used to control the restart of the acquisition and control module, the update acquisition and control module interface is used to send down the acquisition and control module installation package and update instructions to control the acquisition and control module update, the install local monitoring module interface is used to send down the local monitoring module installation package and installation instructions to control the acquisition and control module to install the monitoring module locally on the device under test, and the monitoring module is used to collect the target parameters of the device under test; An execution module, configured to execute the thread group in response to an instruction to run the thread group, so as to control the acquisition and control platform to batch call the basic service interface of the device under test, and obtain the call result information returned by the device under test to the acquisition and control platform; An analysis module, used to determine the test results of the acquisition and control modules of each device under test according to the call result information; The thread group configuration module is used to configure a group of thread groups for the same type of basic service interfaces of different devices under test, and is specifically used to: configure a first thread group for the restart acquisition and control module interface of different devices under test; the first thread group includes multiple first threads, each of the first threads is used to control the acquisition and control platform to call a restart acquisition and control module interface corresponding to a device under test; configure a second thread group for the update acquisition and control module interface of different devices under test; the second thread group includes multiple second threads, each of the second threads is used to control the acquisition and control platform to call an update acquisition and control module interface corresponding to a device under test; configure a third thread group for the installation of local monitoring module interfaces of different devices under test; the third thread group includes multiple third threads, each of the third threads is used to control the acquisition and control platform to call an installation of local monitoring module interface corresponding to a device under test; When executing the thread groups, the execution module is specifically used to: execute the three thread groups in the order of the first thread group, the second thread group and the third thread group; wherein the next thread group is executed after all threads in the previous thread group are executed.

6. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.

8. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 4 when being executed by a processor.

Citation Information

Patent Citations

  • An interface-based online verification method and device

    CN109766228A