Automatic test system and test method
By designing the test management platform, the Internet of Things device management platform, the data gateway service layer and the test execution layer of the automated test system, the problem that existing technology is difficult to adapt to complex network environments is solved, the secure transmission and efficient distribution of test tasks are achieved, and the scalability and compatibility of the system are improved.
Patent Information
- Application Number
- CN202411944470.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-26
AI Technical Summary
Existing automated testing systems are difficult to adapt to complex network environments and cannot meet the needs of distributed laboratories, cross-regional collaboration, or cloud testing tasks.
An automated testing system was designed, including a test management platform, an IoT device management platform, a data gateway service layer and a test execution layer. Generate events to be tested through the cloud computing resource pool, and use the data gateway service layer to encrypt and message queue transmission to ensure the secure transmission and efficient distribution of test tasks in complex network environments.
It realizes full-link data protection for testing tasks in complex network environments, ensures the security of data transmission and reliable distribution in high concurrency environments, and is suitable for a variety of complex testing scenarios, improving the scalability, stability and compatibility of the test system.
Smart Images

Figure CN119854161A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automated testing technology, and in particular to an automated testing system and testing method. Background Art
[0002] Equipment testing can verify product performance, functions and quality. For example, through equipment testing, the reliability and stability of the product during the design phase can be analyzed to ensure that it meets the design requirements and complies with relevant industry standards. At the same time, equipment testing can also effectively detect defects that may occur during the production process and improve product consistency and market competitiveness. With the rapid development of electronic equipment, IoT equipment and industrial intelligence, the types of equipment and application scenarios are becoming increasingly diverse, and their complexity and precision requirements are also significantly improved. In the field of IoT devices, equipment testing not only verifies hardware performance, but also tests the communication capabilities of the equipment in a variety of network environments; in the field of industrial automation, it is necessary to test the long-term operating performance, energy consumption performance and environmental adaptability of the equipment.
[0003] In the prior art, equipment testing usually relies on an automated test system based on a local area network environment or a single laboratory environment. These systems are mainly connected to the test equipment through a host computer, and the equipment is controlled by a preset test task script, and test data is collected. The creation, execution, and result analysis of test tasks are all completed in the laboratory local area network, relying on the hardware equipment and network environment inside the laboratory, and have high controllability. This mode is suitable for relatively simple single-device testing and a small number of concurrent tasks. For example, in a laboratory environment, data interaction is achieved between the host computer and the test equipment through serial communication (such as RS-232, RS-485) or Ethernet, and the host computer controls the test instrument to execute the predefined test task script and record the performance data generated during the test.
[0004] However, with the increasing demand for electronic equipment testing, traditional automated testing systems are unable to meet the requirements of complex network environments. Traditional LAN testing modes are highly dependent on the network environment and are difficult to adapt to the needs of distributed laboratories, cross-regional collaboration, or cloud testing tasks. Based on this, an automated testing system is urgently needed to solve the technical problem that existing technologies are difficult to adapt to complex network environments. Summary of the invention
[0005] The present application provides an automated testing system and testing method to solve the technical problem that the prior art is difficult to adapt to complex network environments.
[0006] In a first aspect, the present application provides an automated testing system, including a test management platform, an IoT device management platform, a data gateway service layer, and a test execution layer; wherein:
[0007] The test management platform is used to generate a to-be-tested event containing test execution information based on a cloud computing resource pool, and publish the test event through the Internet of Things device management platform;
[0008] The data gateway service layer is used to, after determining that the event to be tested is published, encrypt the event to be tested by using a preset data encryption algorithm to obtain an encrypted test event, and send the encrypted test event to the test execution layer in the form of message queue data transmission;
[0009] The test execution layer is used to perform device testing based on the local area network according to the encrypted test event, and collect and obtain test data information, and send the test data information to the Internet of Things device management platform according to an information feedback method matching the test data information;
[0010] The Internet of Things device management platform is used to receive and store test data information of different events to be tested.
[0011] Optionally, in the test system as described above, the test management platform includes a test data display module;
[0012] The test management platform is also used for:
[0013] Acquire test data information matching the test execution information from the IoT device management platform, and visualize the test data information through the test data display module; wherein the test data information includes real-time test data and / or result test data.
[0014] Optionally, in the test system as described above, the test execution layer includes an instrument host computer and a test device;
[0015] The test execution layer is specifically used for:
[0016] Obtain the encrypted test event through the instrument host computer, and decrypt the encrypted test event according to a preset decryption algorithm to obtain the test execution information;
[0017] After determining that the test execution information meets the preset test parameter specifications, the instrument host computer obtains a test script matching the test execution information according to the test execution information through the instrument host computer;
[0018] Sending a test execution instruction carrying a test script through the instrument host computer so that the test device can perform device testing;
[0019] The test device is monitored by the instrument host computer, and first test data information is collected and acquired, and the first test data information is encrypted according to a preset data encryption algorithm;
[0020] The encrypted first test data information is sent to the data gateway service layer through the instrument host computer in the form of message queue data transmission, so as to send the first test data to the Internet of Things device management platform through the data gateway service layer.
[0021] Optionally, in the test system as described above, the test execution layer further includes an external monitoring module and a positioning tag module;
[0022] The test execution layer is further specifically used for:
[0023] Based on the execution of the device test, the second test data of the test device is collected and acquired through the external monitoring module, and the second test data information is sent to the Internet of Things device management platform through a preset wireless communication unit; and
[0024] Obtain the third test data of the test device through the positioning tag module according to the positioning base station, encrypt the third test data information according to a preset data encryption algorithm, and send the encrypted third test data information to the data gateway service layer in the form of message queue data transmission, so as to send the third test data to the Internet of Things device management platform through the data gateway service layer;
[0025] The second test data includes equipment energy consumption data, and the third test data includes equipment location information.
[0026] Optionally, in the test system as described above, the IoT device management platform includes a data storage module;
[0027] The IoT device management platform is specifically used for:
[0028] The data storage module receives and stores test data information of different events to be tested; wherein the test data information includes at least one of first test data information, second test data information and third test data information.
[0029] Optionally, in the test system as described above, the test management platform includes a test generation module and an information interaction module;
[0030] The test management platform is specifically used for:
[0031] The test generation module reads the test requirement information input by the user, obtains the test execution information according to the test requirement information, and generates a to-be-tested event containing the test execution information according to the cloud computing resource pool;
[0032] Through the information interaction module, according to a preset communication interface protocol, the event to be tested is sent to the Internet of Things device management platform, so that the Internet of Things device management platform can publish the test event.
[0033] Optionally, in the test system as described above, the IoT device management platform further includes an event publishing module;
[0034] The IoT device management platform is also specifically used for:
[0035] The event to be tested is published to a preset event topic through the event publishing module, so that the data gateway service layer can monitor it, thereby determining the publication of the event to be tested.
[0036] Optionally, in the test system as described above, the data gateway service layer includes an event monitoring module, a data encryption module and a message queue module;
[0037] The data gateway service layer is specifically used for:
[0038] By means of the event monitoring module, according to a preset event theme, the release of the event to be tested is monitored, and after determining that the event to be tested is released, the event to be tested is obtained;
[0039] By means of the data encryption module, a preset data encryption algorithm is adopted to encrypt the event to be tested, and an encrypted test event is obtained;
[0040] The encrypted test event is sent to the test execution layer through a message queue module in the form of message queue data transmission.
[0041] Optionally, in the test system as described above, the test equipment includes at least one of a DC power analyzer, a temperature rise data acquisition device, and a high and low temperature alternating damp heat test chamber;
[0042] The test execution layer is specifically used for:
[0043] The instrument host computer communicates with the DC power analyzer by using Telnet protocol to execute the test script through the DC power analyzer and complete the collection of the first test data information through the instrument host computer; and / or,
[0044] The instrument host computer communicates with the temperature rise data acquisition device by using the Web Socket protocol, so as to execute the test script through the temperature rise data acquisition device and complete the collection of the first test data information through the instrument host computer; and / or,
[0045] The instrument host computer communicates with the high and low temperature alternating humidity and heat test chamber using the UDP protocol to execute the test script through the high and low temperature alternating humidity and heat test chamber, and completes the collection of the first test data information through the instrument host computer.
[0046] In a second aspect, the present application provides a testing method, which is applied to a test execution layer, and the method includes:
[0047] Obtaining an encrypted test event from the data gateway service layer, and decrypting data of the encrypted test event according to a decryption algorithm corresponding to the encrypted test event to obtain test execution information;
[0048] After determining that the test execution information meets the preset test parameter specifications, obtaining a test script matching the test execution information according to the test execution information, and executing and monitoring the device test according to the test script;
[0049] Acquire the first test data information and / or the third test data information of the test device, encrypt the first test data information and / or the third test data information according to a preset data encryption algorithm, and send the encrypted first test data information and / or the third test data information to the data gateway service layer in the form of message queue data transmission, so as to send the first test data and / or the third test data information to the Internet of Things device management platform through the data gateway service layer; and / or,
[0050] Collect and obtain second test data of the test device, and send the second test data information to the Internet of Things device management platform.
[0051] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0052] The memory stores computer-executable instructions;
[0053] The processor executes the computer-executable instructions stored in the memory to implement the above method.
[0054] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement the above method when executed by a processor.
[0055] In a fifth aspect, the present application provides a program product, including a computer program, which implements the above method when executed by a processor.
[0056] The present application provides an automated testing system and testing method, which realizes the generation and management of test tasks through a test management platform. The test management platform generates events to be tested containing test execution information based on the cloud computing resource pool, so that the test tasks can make full use of the dynamic resource scheduling capabilities of cloud computing, and improve the flexibility and processing efficiency of test task creation. Through the encryption processing of the test events by the data gateway service layer, the full-link data protection of the test tasks in a complex network environment is realized. The data gateway service layer encrypts the test events through a preset data encryption algorithm, so that the data is confidential during the transmission process, preventing the risk of external eavesdropping or data tampering. At the same time, through the transmission form of the message queue, the data gateway service layer improves the reliability and transmission efficiency of the test event distribution. Not only does it ensure the security of data transmission, but it also optimizes the distribution of tasks in a high-concurrency environment, ensuring that the test tasks can be efficiently and stably delivered to the test execution layer.
[0057] The test execution layer controls the device to execute the test task based on the encrypted test event. At the same time, the test execution layer can collect the test data information of the test equipment in real time, and transmit the collected test data to the IoT device management platform according to the preset information feedback method. The closed-loop management of the test task is realized, making the collection and transmission of test data more efficient and secure, and providing a data basis for the subsequent data storage and analysis. The centralized management and traceability of the test data are realized through the reception and storage of the test data information by the IoT device management platform. This centralized management method improves the convenience of data access. Through the setting of the test management platform, the IoT device management platform, the data gateway service layer and the test execution layer, the equipment test automation in a complex network environment is realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] 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.
[0059] Figure 1 A schematic diagram of the structure of the automated testing system provided in the embodiment of the present application;
[0060] Figure 2 A schematic diagram of the overall architecture provided for an embodiment of the present application;
[0061] Figure 3 A schematic diagram of the connection structure between the instrument host computer and the test equipment provided in the embodiment of the present application;
[0062] Figure 4 A schematic diagram of the overall workflow of the test system provided in the embodiment of the present application;
[0063] Figure 5 A data flow diagram of data transmission provided in an embodiment of the present application;
[0064] Figure 6 A flow chart of a testing method provided in an embodiment of the present application;
[0065] Figure 7 A schematic diagram of a flow chart of a test performed by a host computer of an instrument provided in an embodiment of the present application;
[0066] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0067] 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
[0068] 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.
[0069] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0070] In the prior art, it relies on an automated test system based on a local area network, and controls the test equipment and collects test data through a direct connection between the host computer and the test equipment. Test tasks are executed with preset test scripts, and the test results are recorded in local storage devices. Under this framework, the creation, execution, and analysis of test tasks are all completed in the local area network environment within the laboratory. However, this approach is difficult to meet the needs of scenarios with complex tests and diverse network environments. For example, the transmission of test tasks and data is not encrypted, which makes the data vulnerable to external attacks or tampering during transmission, and cannot meet high security requirements. Furthermore, existing systems are usually set up for single laboratory scenarios, lack the ability to collaborate with cloud resources, and are less efficient in the execution of distributed laboratories or remote test tasks.
[0071] Based on the above problems and needs, the invention of this application is to provide an automated testing method for complex network environments. Specifically, a test management platform, an IoT device management platform, a data gateway service layer, and a test execution layer deployed in a local area network are set up. The test management platform is used to generate events to be tested, including test execution information, and pass it to the downstream part. The IoT device management platform is used for data transfer and storage, publishing test events and receiving and managing test data information fed back by the test execution layer, forming a unified data storage and management mechanism. The data gateway service layer, as a bridge for communication, realizes the secure transmission of events to be tested and test data through encryption algorithms and message queues. The test execution layer is the specific execution end of the test task, which is used to control the operation of the test equipment based on the test script, collect and feedback test data. Through the combination of cloud computing resource pool and local area network, a closed-loop operation of test tasks from cloud generation to device execution is realized, which adapts to the diverse scenarios involving public cloud services, third-party platforms and local area network devices in the laboratory. At the same time, the scalability, stability and compatibility of the test system are enhanced, making it suitable for different devices, complex network environments and diverse test needs.
[0072] The automated test system of this application is suitable for a variety of complex test scenarios, especially in test tasks involving multi-device collaboration, multi-protocol support and cross-network environments. In large laboratories, the system can efficiently manage and schedule a variety of test equipment, and realize the full process automation of test tasks from cloud generation to device execution; in the performance test of electronic products or industrial equipment, the system supports a variety of communication protocols (such as Telnet, WebSocket, UDP, etc.) through the instrument host computer, adapts to the interface specifications of equipment from different manufacturers, and ensures the compatibility and flexibility of the test; in dynamic environment tests that require real-time monitoring, such as high and low temperature humidity tests, energy consumption monitoring or equipment operation status analysis, the system collects environmental parameters or energy consumption data through an external monitoring module, and combines it with equipment performance data to provide support for testing and analysis. In addition, in the test environment where the cloud platform is combined with the local area network, the system can use cloud computing resource pools and distributed message queue technology to ensure the efficiency and security of test tasks and data during transmission, and is suitable for laboratories that rent public cloud services or require remote collaboration.
[0073] 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.
[0074] Figure 1 This is a schematic diagram of the structure of the automated testing system provided in the embodiment of the present application. Figure 1 As shown, the automated testing system realizes device testing automation and data management in a complex network environment through the collaborative work of the test management platform 11, the IoT device management platform 12, the data gateway service layer 13 and the test execution layer 14.
[0075] The test management platform 11 is used to generate test events containing test execution information based on the cloud computing resource pool, and publish test events through the Internet of Things device management platform 12 to ensure the distribution and execution of test tasks.
[0076] In this embodiment, the test management platform 11 provides computing power and flexible resource scheduling based on the cloud computing resource pool. The cloud computing resource pool is a virtualized computing environment that supports parallel processing and management of large-scale test tasks by dynamically allocating computing, storage and network resources. Exemplarily, the test management platform 11 can generate a test event containing test execution information according to the settings by calling the relevant services of the cloud computing resource pool. These test execution information usually include the type of test equipment, the specific parameters of the test task, the calling path of the test script, and the task priority, etc., to ensure that the test task can be executed as required.
[0077] After generating the event to be tested, the test management platform 11 sends the test event to the device management platform through the communication interface with the IoT device management platform 12. This process usually adopts a preset communication protocol to ensure the reliability and stability of data transmission. In this process, the test event can be further encapsulated and processed to adapt to the interface requirements of the device management platform and ensure that it can receive and identify test events. By generating and publishing test events through the test management platform 11, unified planning and publishing of test tasks can be achieved. This process also provides support for the dynamic scalability of the system, and can flexibly adjust resource allocation according to actual needs, laying the foundation for the operation of the subsequent test execution layer 14.
[0078] The data gateway service layer 13 is used to encrypt the event to be tested by using a preset data encryption algorithm after determining that the event to be tested is released to obtain an encrypted test event, and to send the encrypted test event to the test execution layer 14 in the form of message queue data transmission.
[0079] In this embodiment, the main function of the data gateway service layer 13 is to encrypt the event after the event to be tested is released, and send the encrypted test event to the test execution layer 14 through the transmission mechanism of the message queue. This process ensures the secure transmission of the event to be tested in a complex network environment, while improving the overall reliability and flexibility. First, the data gateway service layer 13 monitors the release of test events from the Internet of Things device management platform 12 in real time. When the event to be tested is released, the data gateway service layer 13 will immediately obtain the event. Exemplarily, after obtaining the test event, the test event is verified to verify its integrity and validity. The verification process is usually based on a preset event structure and parameter verification mechanism to ensure that the test event has not been tampered with and meets the predefined format requirements.
[0080] After determining that the event to be tested is published and passed the verification, the data gateway service layer 13 encrypts the event to be tested. The encryption process uses a preset data encryption algorithm, which may include symmetric encryption (such as Advanced Encryption Standard, referred to as AES) or asymmetric encryption (such as Remote Storage Engine, referred to as RSA) to ensure the confidentiality and integrity of the data during transmission. The choice of encryption algorithm usually depends on the security requirements and computing performance of the system. For example, the AES encryption algorithm is often used in encryption scenarios of large-scale data due to its high efficiency and wide applicability, while the RSA encryption algorithm is more suitable for encryption scenarios of sensitive tasks due to its flexibility in key management. The encrypted test event is called an encrypted test event, which has a higher security level and can effectively prevent data from being maliciously intercepted or tampered with during transmission. Through encryption processing, the data gateway service layer 13 ensures the security of test events in complex network environments.
[0081] After encryption is completed, the data gateway service layer 13 sends the encrypted test event to the test execution layer 14 through the message queue data transmission form. The message queue is an asynchronous communication mechanism. The setting of the message queue makes the data transmission efficient and reliable: on the one hand, the message queue can buffer the encrypted test events to be transmitted to avoid data loss due to network fluctuations; on the other hand, the message queue supports topic subscription and load balancing mechanisms, and can flexibly adapt to the concurrency requirements of the test execution layer 14. For example, Kafka can realize the distributed storage and consumption of messages through the partition mechanism, ensuring that the test events can be accurately routed to the target device in the multi-device test scenario. In summary, the data gateway service layer 13 realizes the secure distribution of encrypted test events, while ensuring the efficient delivery of test tasks in complex network environments. Through the encryption processing of test events and the transmission method based on message queues, the full-link data protection of test tasks is realized, and the reliability and security of the system in large-scale distributed test scenarios are enhanced.
[0082] The test execution layer 14 is used to perform device testing based on the local area network according to encrypted test events, and collect test data information, and send the test data information to the Internet of Things device management platform 12 according to an information feedback method matching the test data information.
[0083] In this embodiment, the test execution layer 14 receives encrypted test events in a local area network environment, executes device test tasks, and sends the collected test data information to the Internet of Things device management platform 12 according to a preset information feedback method. Specifically, the test execution layer 14 communicates with the data gateway service layer 13 through the local area network, and receives encrypted test events from the data gateway service layer 13 through a preset message queue mechanism. After receiving the encrypted test event, the test execution layer 14 first uses a decryption algorithm to decrypt the encrypted test event. The decryption algorithm is usually paired with the encryption algorithm used in the data gateway service layer 13. The completion of the decryption process ensures that the test execution layer 14 can correctly parse the test execution information in the test event, such as the test device type, test script path, test parameter configuration, and task priority.
[0084] After completing decryption and parsing, the test execution layer 14 sends test instructions to the target test device and starts the test script according to the parsed test execution information. During the test device's execution of the test instructions, the test execution layer 14 monitors the test data (such as operating status and performance data) of the test device in real time. The test execution layer 14 sends the test data information to the Internet of Things device management platform 12 through the local area network. During the data transmission process, the test execution layer 14 processes the test data according to the preset information feedback method, for example, defines the priority, distribution path and confirmation mechanism of the data, and ensures that the data can be correctly received and stored by the Internet of Things device management platform 12. The closed-loop management from the analysis of test events to the collection and feedback of test data is realized through the test execution layer 14. Through the analysis and transmission of encrypted data in the local area network, the execution of test tasks and the feedback of data are realized, which improves the flexibility and security of the test system.
[0085] The IoT device management platform 12 is used to receive and store test data information of different events to be tested.
[0086] In this embodiment, the IoT device management platform 12 receives test data information from the test execution layer 14, and stores and manages the data. Through data management capabilities, the IoT device management platform 12 realizes the unified reception, integration and storage of data generated by different test events in a complex network environment, providing support for subsequent data analysis and decision-making. The IoT device management platform 12 receives test data information from the test execution layer 14. Exemplarily, after the test execution layer 14 completes the test task through the local area network, the IoT device management platform 12 continuously monitors message topics related to the test data information (such as preset topics in MQTT or Kafka message queues). After monitoring new test data messages, the IoT device management platform 12 will immediately extract and verify the integrity and validity of the data to ensure that the data is not lost or tampered with during transmission.
[0087] After receiving the test data information, the IoT device management platform 12 stores the data in categories according to the test events. Test events are usually managed as task units. In order to improve the efficiency and reliability of data storage, distributed storage technology is usually adopted, such as NoSQL database (such as Mongo database) or distributed file system (such as Hadoop Distributed File System, referred to as: HDFS), to support the rapid writing and reading of large-scale data. For data with high real-time requirements, a memory database (such as Remote Dictionary Server, referred to as: Redis) can also be introduced for cache processing to ensure rapid response of data. At the same time, the IoT device management platform 12 realizes efficient organization of different test event data through data classification and index management. For example, the test data generated by different test devices can be associated and stored by device ID or event ID, and the timestamp and task priority of the test data are used as query conditions to support subsequent data retrieval and analysis. In this way, the IoT device management platform 12 can not only meet the centralized management needs of multi-source data, but also support multi-dimensional data query and analysis.
[0088] Furthermore, after the storage is completed, the IoT device management platform 12 can also perform status management and access control on the test data information. For example, the IoT device management platform 12 can archive or delete historical data according to the data lifecycle management strategy to avoid wasting storage resources. By introducing the access permission control mechanism, the IoT device management platform 12 can divide the data access permissions according to the user role to ensure the security and privacy of the test data. By receiving and storing the test data information of different events to be tested, the IoT device management platform 12 provides data management capabilities for the entire automated test system. Through the data reception and storage mechanism, the integration and security management of the test data are realized to ensure the integrity and traceability of the data.
[0089] This application realizes efficient generation and flexible management of test tasks through the test management platform 11, and improves the adaptability and expansion capabilities of test tasks by using the dynamic scheduling capabilities of the cloud computing resource pool, while improving the processing efficiency of task creation and distribution. Through the encryption processing and message queue transmission form of the data gateway service layer 13, full-link data protection of test tasks in complex network environments is realized, ensuring the security of data transmission and reliable distribution in high-concurrency environments. The test execution layer 14 accurately controls the device to execute test tasks based on encrypted test events, and collects test data in real time, ensuring the effectiveness of task execution and the efficiency of data collection, while realizing closed-loop management of test tasks. The Internet of Things device management platform 12 realizes centralized management and traceability of data by receiving and storing test data information, improving the convenience of data access and the support capabilities for subsequent analysis.
[0090] Furthermore, the test management platform 11 includes a test data display module.
[0091] The test management platform 11 is further used to obtain test data information matching the test execution information from the IoT device management platform 12, and visualize the test data information through the test data display module, wherein the test data information includes real-time test data and / or result test data.
[0092] In this embodiment, the function of the test management platform 11 is not limited to generating and issuing test tasks, but also includes the real-time monitoring and visual display of test results through the test data display module. After the test task is executed, the test management platform 11 obtains the test data information matching the test execution information through the communication interface with the Internet of Things device management platform 12. The test data information includes but is not limited to the performance test results, operating status, environmental monitoring data and key logs of task execution of the test equipment. These data are collected by the test execution layer 14 and transmitted to the Internet of Things device management platform 12. After classification and storage, they can be matched with specific test execution information through a unique test task identifier, thereby ensuring that the test management platform 11 can quickly retrieve the required test data.
[0093] After acquiring the test data information, the test management platform 11 visualizes and presents the data through the test data display module. Exemplarily, the visualization display module relies on modern data visualization technology (such as charts, real-time curves, dashboards, etc.) to present complex test data information in an intuitive form on the user interface. For example, for the performance data of the test equipment, the changing trend of indicators such as current, voltage or temperature can be displayed through a line graph; for the result data of the test task execution, a bar chart or pie chart can be used to display statistical information such as success rate and error distribution. This diverse visualization form enables users to quickly understand and analyze test results, improving the readability of test data.
[0094] In order to further enhance the accuracy and flexibility of data display, the test data display module can realize multi-dimensional query and filtering functions. Users can filter and sort the displayed data according to conditions such as the execution time of the test task, the identification of the test equipment or the task type. For example, in a large-scale parallel test scenario, users can set filtering conditions to focus only on the execution results of a specific device or task and quickly obtain key data. This flexible data display method can meet the personalized needs of different users and provide higher convenience for test management. At the same time, the test data display module can update data in real time. Through the dynamic data interface with the Internet of Things device management platform 12, the test management platform 11 can obtain the latest data in real time during the execution of the test task, and display the current test progress and device status in the form of dynamic charts. For example, in the device performance test, the user can monitor the changes in the operating parameters of the test equipment in real time and find potential problems in time. This real-time display capability not only improves the transparency of the test process, but also provides users with the possibility of dynamically adjusting test parameters or tasks, thereby improving the flexibility and coping ability of the test. In summary, through the test data display module in the test management platform 11, the test system realizes the integration from data acquisition to visual display. Through the dynamic acquisition and multi-dimensional display of test data information, not only the user's insight into the testing process is improved, but also the utilization value of test data is enhanced, providing solid support for subsequent analysis decisions and optimization improvements.
[0095] In one embodiment, the test management platform 11 includes a test generation module and an information interaction module. The test management platform 11 implements a complete functional chain from user demand input to task generation and release through the test generation module and the information interaction module, ensuring the flexibility, standardization and distribution efficiency of the test tasks. The test management platform 11 is specifically used for:
[0096] The test generation module reads the test requirement information input by the user, obtains the test execution information according to the test requirement information, and generates a to-be-tested event containing the test execution information according to the cloud computing resource pool;
[0097] Through the information interaction module, according to the preset communication interface protocol, the event to be tested is sent to the Internet of Things device management platform 12, so that the Internet of Things device management platform 12 can publish the test event.
[0098] In this embodiment, through the test generation module, the test management platform 11 can read the test requirement information input by the user. The test requirement information generally includes the type of test equipment, test objectives, test parameters, and execution conditions. The test generation module performs structured processing on the test requirement information input by the user through a preset parsing mechanism to ensure the standardization and integrity of the data format. For example, the test parameters in the test requirements may involve indicators such as voltage, current, and ambient temperature. The test generation module converts these parameters into a standard data structure that can be directly called according to the system's requirement format to ensure the processing and parsing of the task. After the structured processing is completed, the test generation module generates test execution information according to the user's requirement information. It generally includes the call path of the test script, the identification of the test equipment, the task priority, and the environmental constraints. This information clarifies the execution objectives and specific requirements of the test task. Based on the test execution information, the test generation module calls the cloud computing resource pool to generate a to-be-tested event containing the test execution information. The cloud computing resource pool supports parallel processing and dynamic adjustment of large-scale test tasks by dynamically allocating computing resources and storage resources. The test generation module interacts with the cloud computing resource pool interface to store the generated events to be tested in the resource pool, and classifies and marks the tasks for subsequent distribution and management. The test management platform 11 can be deployed in a cloud environment to implement scheduling of cloud computing resources.
[0099] Through the information interaction module, the test management platform 11 can send the generated events to be tested to the IoT device management platform 12. The information interaction module is responsible for establishing a stable communication connection with the IoT device management platform 12, and usually uses a preset communication interface protocol (such as HTTP, MQTT, WebSocket, etc.) to achieve reliable transmission of events. These protocols can ensure the integrity and transmission efficiency of data, and support flexible adaptation in different network environments. For example, in a scenario with high real-time requirements, the events to be tested can be quickly delivered to the IoT device management platform 12 through the publish / subscribe mechanism of the MQTT protocol; while in a complex network environment, the WebSocket protocol can ensure the bidirectionality and stability of data transmission. After the events to be tested are sent to the IoT device management platform 12 through the information interaction module, the IoT device management platform 12 further publishes test events for other modules to monitor and process. This process ensures that the test task can be accurately delivered to the execution layer. Furthermore, in this process, the information interaction module can also monitor and feedback the task transmission process, such as recording the sending status of the task, and resending the task under abnormal circumstances, to ensure the transmission reliability of the test task.
[0100] Figure 2 The overall architecture diagram provided for the embodiment of the present application is shown in FIG. Figure 2 As shown, the test execution layer 14 includes an instrument host computer and a test device. Through the collaboration between the instrument host computer and the test device, the test execution layer 14 can receive test tasks, parse execution information, control the test device, collect test data and complete data transmission. The test execution layer 14 is specifically used to:
[0101] Obtain the encrypted test event through the instrument host computer, and decrypt the encrypted test event data according to the decryption algorithm of the encryption algorithm to obtain the test execution information;
[0102] After determining that the test execution information meets the preset test parameter specifications, the instrument host computer obtains a test script matching the test execution information according to the test execution information;
[0103] Send test execution instructions carrying test scripts through the instrument host computer so that the test equipment can perform equipment testing;
[0104] Monitor the test equipment through the instrument host computer, collect and obtain the first test data information, and encrypt the first test data information according to a preset data encryption algorithm;
[0105] The encrypted first test data information is sent to the data gateway service layer 13 through the instrument host computer in the form of message queue data transmission, so as to send the first test data to the Internet of Things device management platform 12 through the data gateway service layer 13.
[0106] In this embodiment, the test execution layer 14 receives the encrypted test event from the data gateway service layer 13 through the instrument host computer. The instrument host computer is a software platform for managing test task execution and device control, with high compatibility and multi-protocol adaptability. After receiving the encrypted test event, the instrument host computer decrypts the event data according to the decryption algorithm matching the encryption algorithm. Through decryption, the instrument host computer can extract test execution information, for example, such information includes test device type, test parameters, test script path, and task priority. After decryption is completed, the instrument host computer performs preset parameter specification verification on the test execution information. The preset test parameter specification defines the basic requirements of the test task, such as the range of input parameters, the constraints of test conditions, and the availability status of the device. The purpose of this step is to ensure the validity of the test task and avoid test failure or device abnormality due to parameter errors. After the verification is passed, the instrument host computer obtains the test script matching the test task from the task library according to the test execution information. The test script is a program file for specifically controlling the test device, usually written in Python, Lua or other programmable languages, and can adapt to the communication protocols and functional requirements of different devices. This ensures the flexibility and scalability of the test tasks.
[0107] After obtaining the test script, the instrument host computer sends the test execution instruction to the test equipment and starts the equipment test process. The test execution instruction carries the test script, including key information such as test steps, equipment configuration parameters, and execution time. The instrument host computer establishes a stable connection to transmit test commands and data in real time through the communication interface with the test equipment. Wherein, the communication interface includes but is not limited to serial port communication (such as RS-485, RS-232) and network communication (such as UDP, WebSocket protocol, Telnet). The multi-protocol adaptation capability of the instrument host computer enables the test execution layer 14 to be compatible with test equipment of various types and manufacturers, meeting the test requirements of multiple scenarios. In the process of the test equipment executing the task, the instrument host computer monitors the operating status and test data of the equipment in real time. The monitoring content includes equipment operating parameters (such as voltage, current, temperature, etc.), test progress information, and equipment abnormal status (such as overload alarm, communication interruption). At the same time, the instrument host computer obtains the first test data information through the acquisition module, and the first test data information is usually the original performance data directly generated by the test equipment, such as current curve, power fluctuation data or environmental response data. Through real-time acquisition, the instrument host computer ensures the integrity and timeliness of the test data. To ensure the security of the test data during transmission, the instrument host computer encrypts the first test data information according to a preset data encryption algorithm. The encryption algorithm can be based on an end-to-end encryption strategy to protect the privacy and integrity of the data. The encrypted test data is sent to the data gateway service layer 13 in the form of message queue transmission, which can ensure the stability and accuracy of data transmission under high concurrency conditions. The encrypted first test data information is received by the data gateway service layer 13 and further processed and transmitted to the Internet of Things device management platform 12. Through this process, the execution of the test task and the secure transmission of data are ensured, providing accurate and reliable data support for the data storage and analysis of the Internet of Things device management platform 12.
[0108] Further, the test equipment includes but is not limited to automated test instruments and conventional instruments. Automated test instruments usually support remote control and programming interfaces, and the instrument host computer can establish direct communication with it through a preset communication protocol to achieve parameter configuration and task execution. Conventional test instruments usually do not have automated interfaces, and automated control can be achieved through expansion modules (such as external control modules) or simulated operations. The instrument host computer mainly uses external hardware control devices and manual script simulation operations for the control of conventional test instruments. Exemplarily, the instrument host computer performs simple signal triggering and on-off operations on conventional test instruments through external modules such as relay controllers or general purpose input / output interfaces (General Purpose Input / Output, referred to as GPIO interfaces). For example, the start / stop button, adjustment knob or other mechanical operation of the control instrument. The instrument host computer collects the output signals of conventional test instruments, such as voltage output or frequency change data, through external sensors or data acquisition cards (such as Data Acquisition Module, referred to as DAQ modules). After the collected data is processed and encrypted, it is sent to the data gateway service layer according to the same transmission process as the automated test instrument. Also, for some test instruments that do not have digital interfaces, the instrument host computer can combine image recognition technology or robotic arm operation to achieve simulated automated control. For example, the readings on the instrument display are captured by a camera or the knobs and buttons are operated by a robotic arm to complete the test task. The specific implementation method can adopt existing technology and will not be repeated here. This enables the host computer to adapt to various types of test equipment, meeting the control requirements of modern instruments while taking into account the automated testing capabilities of traditional instruments.
[0109] In a specific embodiment, Figure 3 The schematic diagram of the connection structure between the instrument host computer and the test equipment provided in the embodiment of the present application. Figure 3 As shown, the test equipment includes at least one of a DC power analyzer, a temperature rise data acquisition device, and a high and low temperature alternating damp heat test chamber. The test execution layer 14 communicates with these devices through the instrument host computer and sends test instructions to ensure that the device performs the predetermined task according to the test script and returns the first test data information. Through the communication capability supported by multiple protocols, the test execution layer 14 realizes efficient control and data acquisition of different test equipment, meeting the needs of diversified test scenarios. Then the test execution layer 14 is specifically used to:
[0110] The instrument host computer uses the Telnet protocol to communicate with the DC power analyzer to execute the test script through the DC power analyzer, and completes the collection of the first test data information through the instrument host computer;
[0111] The instrument host computer uses the Web Socket protocol to communicate with the temperature rise data acquisition device to execute the test script through the temperature rise data acquisition device and complete the collection of the first test data information through the instrument host computer;
[0112] The instrument host computer uses the UDP protocol to communicate with the high and low temperature alternating humidity test chamber to execute the test script through the high and low temperature alternating humidity test chamber, and completes the collection of the first test data information through the instrument host computer.
[0113] In this embodiment, when testing the DC power analyzer, the test execution layer 14 establishes a communication connection with the device through the instrument host computer using the Telnet protocol. Telnet is a text-based remote control protocol that can realize real-time command transmission to remote devices through a TCP / IP network. The test execution layer 14 sends a test script to the DC power analyzer through the Telnet protocol, and the test script includes specific test steps, device parameter settings, and output conditions, such as the voltage range, current size, and test duration of the control power output. After receiving the test script, the DC power analyzer starts to perform the specified task, such as recording power performance indicators, voltage stability, or load response characteristics. The test execution layer 14 monitors the operating status of the DC power analyzer in real time through the instrument host computer, and collects the first test data information generated by it. The first test data information includes voltage fluctuation data, current curves, or power output stability data.
[0114] For the temperature rise data acquisition device, the test execution layer 14 communicates with the device through the instrument host computer using the WebSocket protocol. The WebSocket protocol is a full-duplex communication protocol that can maintain the real-time and high efficiency of communication after the connection is established. The instrument host will send a test script through the WebSocket protocol, which may include parameters such as measurement time interval, target temperature change range, and acquisition frequency. After receiving the test script, the temperature rise data acquisition device begins to monitor the temperature rise curve or heat distribution status of the device in real time, and returns the collected data to the instrument host computer through the WebSocket protocol. The first test data information may include the dynamic change curve of the device temperature, the time constant of the heating and cooling process, and the performance of the device under extreme temperature conditions.
[0115] In the test of the high and low temperature alternating humidity and heat test chamber, the test execution layer 14 communicates with the device through the instrument host computer using the User Datagram Protocol (UDP). When the test task is executed, the instrument host computer sends a test script to the high and low temperature alternating humidity and heat test chamber through the UDP protocol. The script usually contains parameters such as the test temperature range, humidity conditions, alternating cycle, and equipment exposure time. The test chamber adjusts the internal environment according to the received test script and simulates the specified high and low temperature and humidity and heat conditions. The test execution layer 14 collects the first test data information generated during the operation of the equipment in real time through the instrument host computer, such as the ambient temperature curve, humidity change rate, and the operating status data of the equipment under extreme conditions.
[0116] In another embodiment, Figure 2 As shown, the test execution layer 14 also includes an external monitoring module and a positioning tag module. The test execution layer 14 is also specifically used for:
[0117] Based on the execution of the device test, the second test data of the test device is collected through the external monitoring module, and the second test data information is sent to the Internet of Things device management platform 12 through the preset wireless communication unit; and
[0118] Obtain the third test data of the test device according to the positioning base station through the positioning tag module, encrypt the third test data information according to a preset data encryption algorithm, and send the encrypted third test data information to the data gateway service layer 13 in the form of message queue data transmission, so as to send the third test data to the Internet of Things device management platform 12 through the data gateway service layer 13;
[0119] The second test data includes equipment energy consumption data, and the third test data includes equipment location information.
[0120] In this embodiment, the external monitoring module provides the test system with comprehensive operating status information during the operation of the test equipment through real-time monitoring and data collection. Specifically, the external monitoring module is responsible for collecting the second test data of the equipment during operation, and sending these data to the Internet of Things device management platform 12 through a preset wireless communication unit. The external monitoring module is composed of various sensor components, which can be independent of the internal monitoring unit of the test equipment to collect external state data or additional performance parameters during the operation of the equipment. For example, the power data consumed by the test equipment during operation can be collected in real time through an energy consumption sensor. By monitoring environmental data and operating data, the external monitoring module can provide a more comprehensive data perspective for the test task and effectively supplement the first test data information obtained in the equipment test. During the execution of the equipment test, the external monitoring module and the test equipment are synchronized. Through real-time perception of the equipment operation status, for example, the temperature and humidity sensor in the external module can collect real-time temperature and humidity data of the environment where the test equipment is located; in the energy consumption monitoring scenario, the energy consumption meter in the external module can record the power consumption fluctuation curve of the equipment under different working conditions. These data are collected in real time through external energy consumption sensors and transmitted to the IoT device management platform 12 via wireless communication (such as CAT1 or Wi-Fi) for unified storage and management.
[0121] The use of external monitoring modules not only improves the test system's ability to analyze equipment energy efficiency, but also provides basic data support for subsequent energy-saving optimization. Through the real-time collection and transmission of equipment energy consumption data, comprehensive monitoring of the energy efficiency of the test equipment is achieved, and the adaptability of the test system in complex application scenarios is enhanced. It should be noted here that the external monitoring module can be uniformly controlled and triggered by the host computer to perform monitoring tasks; it can also automatically collect data when the test equipment is running and according to the opening of the equipment. The specific implementation method can be flexibly set according to the specific laboratory LAN environment, and no specific restrictions are made here.
[0122] At the same time, through the positioning tag module, the location information of the test device (i.e., the third test data) can be obtained in real time. The positioning tag module relies on the support of the positioning base station to realize real-time tracking of the test device location information through communication protocols (such as LoRa, Wi-Fi or Bluetooth). The location information is usually expressed in the form of three-dimensional coordinates or area identification, which is used to reflect the specific position change of the test device in the test scene. In order to ensure the security of the data transmission process, after the positioning tag module collects the device location information, it will encrypt the third test data information according to the preset data encryption algorithm, and send the encrypted data to the data gateway service layer 13 in the form of message queue data transmission. In the data gateway service layer 13, the third test data is further integrated and processed, and then transmitted to the Internet of Things device management platform 12 for storage and management. Through the encrypted transmission of the device location information, the secure sharing of the device location information in a complex network environment is realized, and the reliability of the test system in dynamic monitoring and device management is improved. It should be noted here that the encryption of the positioning information can be done by a separate module, or it can be obtained and encrypted by the host computer. The specific implementation method can be flexibly set according to the specific laboratory LAN environment, and no specific restrictions are made here.
[0123] The second test data and the third test data together constitute a multi-dimensional monitoring of the operating status of the test equipment, providing support for the comprehensiveness and accuracy of the test system. Energy consumption data can reflect the operating efficiency and energy consumption of the equipment, while location information provides a basis for multi-device collaborative testing or equipment mobility analysis. This combination not only enhances the test system's ability to perceive the operating status of the test equipment, but also lays a solid foundation for subsequent test optimization and result analysis. At the same time, through the setting of the wireless communication unit, the stability and security of the test data in transmission are guaranteed, so that the system can adapt to the needs of different network environments.
[0124] In one embodiment, the IoT device management platform 12 includes a data storage module; the IoT device management platform 12 is specifically used for:
[0125] The test data information of different events to be tested is received and stored through the data storage module; wherein the test data information includes at least one of the first test data information, the second test data information and the third test data information.
[0126] In this embodiment, after the test execution layer 14 completes the device test and transmits the first test data information, the second test data information and the third test data information to the Internet of Things device management platform 12, the data storage module is responsible for receiving the data, classifying and storing them. The data storage module can associate the data from different test tasks with their corresponding test events through the task identification or device identification to achieve accurate data management. Exemplarily, in the process of storing data, the data storage module performs structured processing on the data. For different types of test data information, the data is layered and indexed according to preset storage rules. For example, the first test data information is stored according to the classification of device performance indicators, which is convenient for subsequent users to perform performance analysis; the second test data information and the third test data information are stored in groups according to the task running environment or device status, which is convenient for dynamic query of environmental data. In addition, it can also have a multi-dimensional data indexing function, such as based on index conditions such as test time, device identification, event type, etc., which provides convenience for the rapid retrieval and use of subsequent data. Further, the data storage module has security and data management capabilities while realizing reliable data storage. The data storage module can combine the authority management mechanism to limit the access rights of different users to the test data information, thereby protecting the confidentiality of the data. In addition, through the data integrity verification and management functions, the data storage module can effectively prevent data loss or tampering during data storage and call, ensuring the authenticity and consistency of the data. Through the data storage module, the IoT device management platform 12 realizes the centralized reception and storage of data information of different test events, providing a guarantee for the data flow of the entire automated test system. This not only improves the data utilization efficiency of the test system, but also provides data support for subsequent result analysis, visualization, and test optimization.
[0127] In one embodiment, the IoT device management platform 12 further includes an event publishing module. Then the IoT device management platform 12 is also specifically used for:
[0128] Through the event publishing module, the event to be tested is published to the preset event topic for the data gateway service to monitor, so as to determine the publication of the event to be tested.
[0129] In the present embodiment, the main function of the event publishing module is to publish the event to be tested to a preset event topic. The event topic is a logical classification unit for organizing and managing task data flows within the system. Each event to be tested will be assigned to an event topic after generation, so that the data gateway service can subscribe to and process the corresponding event according to the preset logic. For example, different types of test tasks can be published to different topics (such as electrical performance test topics, environmental monitoring test topics, etc.), so as to achieve classification management and distributed processing of tasks. After the event to be tested arrives at the Internet of Things device management platform 12, the event publishing module will perform normalization processing and format encapsulation on it. This process usually includes verification of the event data structure, supplementation of event attributes, and allocation of event priorities. For example, the event publishing module will check the integrity of the event to be tested to ensure that it contains necessary information such as test equipment identification, task script path, execution parameters, and timestamps. At the same time, the event publishing module will also assign event priorities according to the scheduling strategy, so as to ensure that high-priority tasks can be executed first when multiple tasks are processed in parallel. After normalization, the event to be tested is converted into a standard event format that meets the preset requirements, which is convenient for the identification and processing of subsequent modules.
[0130] The event publishing module publishes the test event to the specified event topic through a preset communication protocol (such as Message Queuing Telemetry Transport, MQTT for short). MQTT is a lightweight publish / subscribe message protocol suitable for low-bandwidth, high-latency network environments. According to the needs, the event publishing module can choose different protocols for task publishing. For example, in scenarios with high real-time requirements, the MQTT protocol can ensure the rapid publishing and timely monitoring of events; while in large-scale distributed test tasks, Kafka's partitioned storage and parallel consumption mechanism can improve the efficiency of task publishing and processing. The test events published to the event topic will be monitored in real time by the monitoring module of the data gateway service. Once the event is published, the data gateway service will obtain the event data by subscribing to the corresponding event topic, and perform subsequent encryption and task distribution. In order to further enhance the reliability of task publishing, the event publishing module can also track the task status and handle exceptions. For example, in the case of unstable network transmission, the event publishing module can detect the failure of event publishing and re-publish the task through a retry mechanism or failover strategy to ensure that the task will not be lost due to network interruption.
[0131] Next, in one embodiment, the data gateway service layer 13 includes an event monitoring module, a data encryption module and a message queue module, and the data gateway service layer 13 is specifically used for:
[0132] Through the event monitoring module, according to the preset event subject, monitor the release of the event to be tested, and obtain the event to be tested after confirming the release of the event to be tested;
[0133] Through the data encryption module, a preset data encryption algorithm is used to encrypt the test event and obtain the encrypted test event;
[0134] The encrypted test events are sent to the test execution layer 14 through the message queue module in the form of message queue data transmission.
[0135] In this embodiment, the data gateway service layer 13 monitors the release of the event to be tested in real time according to the preset event theme through the event monitoring module. The event monitoring module maintains a connection with the event publishing module by subscribing to the event theme in the Internet of Things device management platform 12. Once the release of the event to be tested is detected, the event monitoring module will immediately obtain the event data and perform preliminary verification to ensure that the data integrity and structure meet the preset specifications. The real-time nature of the event monitoring module ensures that the event to be tested can be quickly captured after being released, reducing the delay in task distribution. After obtaining the event to be tested, the data gateway service layer 13 encrypts the event through the data encryption module. The data encryption module uses a preset data encryption algorithm to encrypt the content of the event to be tested to generate an encrypted test event. Exemplarily, the data gateway service layer 13 can combine two encryption methods: using RSA to encrypt the key metadata of the task to ensure high security during the transmission process; using AES to encrypt large-capacity task data, thereby taking into account efficiency and security. Through encryption processing, the data gateway service layer 13 can effectively prevent the event to be tested from being intercepted, tampered with or leaked during the transmission process, providing reliable data protection for the execution of the test task.
[0136] After encryption is completed, the data gateway service layer 13 transmits the encrypted test event to the test execution layer 14 through the message queue module. The message queue module adopts a distributed asynchronous communication mechanism to support the reliable transmission of high-concurrency tasks. During the transmission process, the message queue module will segment and store the encrypted test event and generate a message identifier to ensure that the transmission task can be quickly restored in the event of a network interruption or node failure to avoid data loss. At the same time, the message queue module supports a multi-consumer subscription mechanism, so that multiple devices in the test execution layer 14 can monitor and receive tasks at the same time, thereby improving parallel processing capabilities. In summary, the event monitoring module ensures that the event to be tested can be quickly captured and verified; the data encryption module encrypts the event through a preset algorithm to ensure the security of task transmission; the message queue module uses an efficient and reliable transmission mechanism to ensure that the encrypted test event can smoothly reach the test execution layer 14. This not only improves the distribution efficiency and security of test tasks in complex network environments, but also enhances the system's scalability and adaptability.
[0137] Based on the above embodiments, the overall workflow of the test system is described here. Figure 4 The overall workflow diagram of the test system provided in the embodiment of the present application is as follows. Figure 4 As shown, including:
[0138] Create a test task and configure parameters: The user selects the specific product to be tested from the product list through the operation interface of the test management platform 11. Then, the user selects the test standard that matches the product type and test requirements from the preset standard library provided, such as industry standards, quality specifications or performance requirements. At the same time, the user selects the test cases required to cover the test task. The test cases define the test steps, expected results and test conditions in detail. The user selects the type of test instrument that matches the test task through the test management platform 11, and can also flexibly configure the test parameters according to the test requirements, such as voltage range, ambient temperature conditions or test time.
[0139] After completing the above configuration, the test management platform 11 sends the generated test event to the IoT device management platform 12 through the information interaction module. The IoT device management platform 12 publishes the test event to the preset MQTT event topic (mqtt-topic) through its event publishing module for the data gateway service layer 13 to monitor.
[0140] The data gateway service layer 13 monitors the test events in the mqtt-topic through the event monitoring module, and after receiving the event, assembles the data (including format conversion) and forwards the test event to the specified message topic (kafka-topic) of Kafka.
[0141] The instrument host computer of the test execution layer 14 monitors the test events in the kafka-topic in real time. After receiving the event, the instrument host computer parses the test event to extract the test execution information. Subsequently, the instrument host computer obtains the matching test script through the test execution information, starts the test script process, and controls the target test device to perform the test task according to the script instructions.
[0142] During the execution of the task by the test equipment, the instrument host computer monitors the equipment operation status in real time to ensure that the equipment operates according to the expected conditions. At the same time, the instrument host computer collects the first test data information generated by the test equipment, and according to the preset encryption algorithm, the instrument host computer encrypts the collected data. The encrypted first test data information is sent to the designated topic (kafka-topic) of the Kafka message queue through the instrument host computer. The data gateway service layer 13 monitors the topic in real time, integrates and formats the received test data, and then forwards the data to the Internet of Things device management platform 12.
[0143] The IoT device management platform 12 receives and stores the integrated test data through the data storage module. Meanwhile, the test management platform 11 reads the real-time test data from the IoT device management platform 12 through the test data display module, and displays the test progress and quality results using a visual interface.
[0144] When the test equipment completes all scheduled tasks, the instrument host computer stops the equipment and closes the test script process, and sends the task completion flag to the specified topic (kafka-topic) of the Kafka message queue for the data gateway service layer 13 to monitor. After receiving the task completion information, the data gateway service layer 13 forwards it to the Internet of Things device management platform 12 for recording and storage. And the instrument host computer analyzes and generates the final test result data (such as whether the test passes, performance indicator analysis results, etc.) according to the time parameters and execution conditions in the test task. The test result data is encrypted by the instrument host computer and transmitted to the data gateway service layer 13 again. After the data gateway service layer 13 completes the processing, it is forwarded to the Internet of Things device management platform 12 for storage.
[0145] The IoT device management platform 12 provides the stored test result data to the test management platform 11, and the test management platform 11 updates the execution result of each test case.
[0146] The test management platform 11 ultimately records the process and results of all test tasks, providing users with traceable test archives and improvement suggestions.
[0147] Figure 5 The data flow diagram of the data transmission provided in the embodiment of the present application is as follows. Here, the direction of data transmission is generally described. Figure 5 shown.
[0148] The data transmission embodiments include test event data transmission, instrument status data transmission and instrument jog control data transmission. Specific implementation process:
[0149] The test management platform 11 first generates an event to be tested, and sends the test event to the event-topic of the IoT device management platform 12 through the information interaction module. The data gateway service layer 13 monitors the event-topic through the event monitoring module, and after detecting the test event, uploads it to the task-info topic in the Kafka message queue. The task-info topic is used to distribute task information for subscription by the instrument host computer of the test execution layer 14.
[0150] The instrument host computer monitors the task-info topic in real time. When receiving a test event, the instrument host computer parses the event content, extracts the test parameters, and generates the corresponding Python test script based on the extracted information. The Python test script is sent to the target test device through the execution instruction of the instrument host computer to control the test device to perform specific test tasks.
[0151] During the test execution process, the instrument host computer issues instructions in real time, collects the test data generated by the test equipment, and uploads the collected first test data information to the task-data topic of the data gateway service layer 13. After the test is completed, the instrument host computer analyzes the collected test data, uploads the analysis results to the task-result topic, and uploads the original data to the task-origin-data topic.
[0152] The data gateway service layer 13 monitors the task-data, task-result and task-origin-data topics in real time, and integrates and formats the received data. After processing, the data gateway service layer 13 synchronizes the data to the event-topic of the IoT device management platform 12 for access and use by the test management platform 11. The test management platform 11 extracts real-time test data, test results and original data from the event-topic, and displays them to the user through a visual interface, so as to facilitate real-time monitoring of the progress of the test task.
[0153] During the execution of the test task, the instrument host computer regularly monitors the operating status and properties of the test equipment. For example, the operating status of the equipment (such as "idle", "running", "fault", etc.) and key parameters (such as voltage, current or temperature) are monitored. During the monitoring process, the instrument host computer regularly collects the status attribute data of the equipment and uploads it to the device-status topic of the data gateway service layer 13.
[0154] After receiving the data of the device-status topic, the data gateway service layer 13 forwards it to the device-attributes topic of the IoT device management platform 12. The IoT device management platform 12 manages the status attribute data of the test device through the device-attributes topic for real-time query and use by the test management platform 11. The test management platform 11 can display the current operating status and parameter information of the device in the visual interface by updating the device attribute data in real time.
[0155] During the execution of the test task, in order to meet temporary test requirements or manually adjust the device operating status, the automated test system supports the inching control function of the instrument. The user enters control commands, such as starting, pausing or adjusting device parameters, through the operation interface of the test management platform 11. The test management platform 11 sends these control commands to the device-control topic of the IoT device management platform 12.
[0156] The data gateway service layer 13 monitors the device-control topic, and after receiving the control command, it immediately synchronizes the command to the device-control topic in the Kafka message queue. The instrument host computer monitors the device-control topic in real time, parses the control command after receiving it, and generates specific control instructions according to the command content. For example, the control device starts a specific test program, adjusts working parameters, or enters a pause state. The instrument host computer then sends the generated control instruction to the test device to perform the corresponding control operation.
[0157] The entire inching control process is continuous, and the efficient collaboration between the data gateway service layer 13 and the instrument host computer ensures the real-time transmission of control commands and the timeliness of device response. The test management platform 11, through the inching control function, realizes the flexible adjustment and manual intervention capabilities of the operating status of the test equipment, providing a larger operating space for complex test scenarios.
[0158] Figure 6 A flow chart of a test method provided in an embodiment of the present application. Applied to the test execution layer, such as Figure 6 As shown, including:
[0159] S61, obtaining an encrypted test event from the data gateway service layer, and decrypting the encrypted test event according to a decryption algorithm corresponding to the encrypted test event to obtain test execution information;
[0160] S62, after determining that the test execution information meets the preset test parameter specifications, obtaining a test script matching the test execution information according to the test execution information, and executing and monitoring the device test according to the test script;
[0161] S63, collecting and acquiring the first test data information and / or the third test data information of the test device, and encrypting the first test data information and / or the third test data information according to a preset data encryption algorithm, and sending the encrypted first test data information and / or the third test data information to the data gateway service layer in the form of message queue data transmission, so as to send the first test data and / or the third test data information to the Internet of Things device management platform through the data gateway service layer;
[0162] S64, collecting and acquiring second test data of the test device, and sending the second test data information to the Internet of Things device management platform.
[0163] The process of the test execution layer obtaining encrypted test events and executing the test in this embodiment corresponds to the above-mentioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0164] In a specific embodiment, Figure 7 The following is a flow chart of the instrument host computer executing the test provided in the embodiment of the present application. Figure 7 As shown, including:
[0165] The instrument host computer subscribes to the preset Kafka-topic (task topic) through its monitoring module. When the data gateway service layer sends the event to be tested to the Kafka-topic, the instrument host computer monitors the topic in real time and receives the test task information. The task information includes test parameters, test equipment type, test script path and other information.
[0166] After receiving the test task, the instrument host computer decrypts the task information through the built-in decryption module to extract the test parameters and configuration data in the task. After decryption, the host computer verifies the extracted parameters, such as whether the parameter value is within the allowable range of the device and whether it meets the specification requirements of the test task. If the parameter verification fails, the verification failure information is sent back to Kafka-topic to implement subsequent data processing and decision analysis;
[0167] If the verification passes, the instrument host computer calls the test script generation module to generate a Python test script based on the decrypted test parameters. The script is a customized code for the target test device, which contains the specific execution logic and control instructions of the test task. The instrument host computer loads the generated test script as an independent process and starts it. By starting the script process, the task logic can be separated from the hardware operation, improving the efficiency and stability of task execution. The instrument host computer establishes a connection with the test device through the preset communication protocol and sends the control instructions in the test script.
[0168] During the test, the instrument host computer is responsible for real-time processing of test data, including: result file writing, data uploading and log recording. Among them, result file writing refers to writing the collected test data to the local result file in real time, which is convenient for subsequent local analysis and archiving; data uploading refers to sending the real-time collected test data to the data gateway service layer through Kafka-topic. When uploading data, the host computer will format and encrypt the test data; log recording refers to real-time recording of the steps and status information during the execution of the test script, such as the test start time, data collection progress, and possible error information.
[0169] When the test script is executed, the instrument host computer sends a stop test command to the test device and terminates the script process. Afterwards, the instrument host computer performs cleanup operations, including releasing system resources, resetting device status, and closing the communication connection with the device to ensure that the device can safely return to the initial state and prepare for the execution of subsequent test tasks.
[0170] The instrument host computer analyzes the first test data information generated during the test, such as statistically analyzing the performance indicators of the equipment or generating a test result report. After the analysis is completed, the host computer sends the test results to the data gateway service layer through Kafka-topic. After receiving the test results, the data gateway service layer will further process them and forward them to the IoT device management platform for data storage and decision analysis by the upper-level modules of the system.
[0171] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 8 includes: at least one processor 81 and a memory 82. The electronic device 8 also includes a communication component 83. The processor 81, the memory 82 and the communication component 83 are connected via a bus 84.
[0172] In the specific implementation process, at least one processor 81 executes the computer execution instructions stored in the memory 82, so that at least one processor 81 executes the test method executed by the electronic device side as above.
[0173] The specific implementation process of the processor 81 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0174] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0175] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0176] 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.
[0177] The above-mentioned functions implemented by the electronic device and the main control device introduce the scheme provided by the embodiment of the present invention. It can be understood that in order to implement the above-mentioned functions, the electronic device or the main control device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in the embodiment of the present invention, the embodiment of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present invention.
[0178] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0179] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0180] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in an electronic device or a main control device.
[0181] The present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0182] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0183] The division of units is only a logical function division, and there may be other divisions 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 an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0184] 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.
[0185] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0186] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0187] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0188] It should be further noted that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flow chart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0189] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0190] 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.
[0191] 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. An automated testing system, characterized in that: It includes test management platform, IoT device management platform, data gateway service layer and test execution layer; among them, The test management platform is used to generate a to-be-tested event containing test execution information based on a cloud computing resource pool, and publish the test event through the Internet of Things device management platform; The data gateway service layer is used to, after determining that the event to be tested is published, encrypt the event to be tested by using a preset data encryption algorithm to obtain an encrypted test event, and send the encrypted test event to the test execution layer in the form of message queue data transmission; The test execution layer is used to perform device testing based on the local area network according to the encrypted test event, and collect and obtain test data information, and send the test data information to the Internet of Things device management platform according to an information feedback method matching the test data information; The Internet of Things device management platform is used to receive and store test data information of different events to be tested.
2. The test system according to claim 1, characterized in that: The test management platform includes a test data display module; The test management platform is also used for: Acquire test data information matching the test execution information from the IoT device management platform, and visualize the test data information through the test data display module; wherein the test data information includes real-time test data and / or result test data.
3. The test system according to claim 1, characterized in that: The test execution layer includes an instrument host computer and test equipment; The test execution layer is specifically used for: Obtain the encrypted test event through the instrument host computer, and decrypt the encrypted test event according to a preset decryption algorithm to obtain the test execution information; After determining that the test execution information meets the preset test parameter specifications, the instrument host computer obtains a test script matching the test execution information according to the test execution information through the instrument host computer; Sending a test execution instruction carrying a test script through the instrument host computer so that the test device can perform device testing; The test device is monitored by the instrument host computer, and first test data information is collected and acquired, and the first test data information is encrypted according to a preset data encryption algorithm; The encrypted first test data information is sent to the data gateway service layer through the instrument host computer in the form of message queue data transmission, so as to send the first test data to the Internet of Things device management platform through the data gateway service layer.
4. The test system according to claim 3, characterized in that: The test execution layer also includes an external monitoring module and a positioning tag module; The test execution layer is further specifically used for: Based on the execution of the device test, the second test data of the test device is collected and acquired through the external monitoring module, and the second test data information is sent to the Internet of Things device management platform through a preset wireless communication unit; as well as, Obtain the third test data of the test device through the positioning tag module according to the positioning base station, encrypt the third test data information according to a preset data encryption algorithm, and send the encrypted third test data information to the data gateway service layer in the form of message queue data transmission, so as to send the third test data to the Internet of Things device management platform through the data gateway service layer; The second test data includes equipment energy consumption data, and the third test data includes equipment location information.
5. The test system according to claim 4, characterized in that: The IoT device management platform includes a data storage module; The IoT device management platform is specifically used for: The data storage module receives and stores test data information of different events to be tested; wherein the test data information includes at least one of first test data information, second test data information and third test data information.
6. The test system according to any one of claims 1 to 3, characterized in that: The test management platform includes a test generation module and an information interaction module; The test management platform is specifically used for: The test generation module reads the test requirement information input by the user, obtains the test execution information according to the test requirement information, and generates a to-be-tested event containing the test execution information according to the cloud computing resource pool; Through the information interaction module, according to a preset communication interface protocol, the event to be tested is sent to the Internet of Things device management platform, so that the Internet of Things device management platform can publish the test event.
7. The test system according to any one of claims 1 to 3, characterized in that: The IoT device management platform also includes an event publishing module; The IoT device management platform is also specifically used for: The event to be tested is published to a preset event topic through the event publishing module, so that the data gateway service layer can monitor it, thereby determining the publication of the event to be tested.
8. The test system according to claim 7, characterized in that: The data gateway service layer includes an event monitoring module, a data encryption module and a message queue module; The data gateway service layer is specifically used for: By means of the event monitoring module, according to a preset event subject, the release of the event to be tested is monitored, and after determining that the event to be tested is released, the event to be tested is obtained; By means of the data encryption module, a preset data encryption algorithm is adopted to encrypt the event to be tested, and an encrypted test event is obtained; The encrypted test event is sent to the test execution layer through a message queue module in the form of message queue data transmission.
9. The test system according to claim 3, characterized in that: The test equipment includes at least one of a DC power analyzer, a temperature rise data acquisition device, and a high and low temperature alternating damp heat test chamber; The test execution layer is specifically used for: The instrument host computer communicates with the DC power analyzer by using Telnet protocol to execute the test script through the DC power analyzer and complete the collection of the first test data information through the instrument host computer; and / or, The instrument host computer communicates with the temperature rise data acquisition device by using the Web Socket protocol, so as to execute the test script through the temperature rise data acquisition device and complete the collection of the first test data information through the instrument host computer; and / or, The instrument host computer communicates with the high and low temperature alternating humidity and heat test chamber using the UDP protocol to execute the test script through the high and low temperature alternating humidity and heat test chamber, and completes the collection of the first test data information through the instrument host computer.
10. A testing method, characterized in that: The method is applied to a test execution layer, and the method comprises: Obtaining an encrypted test event from the data gateway service layer, and decrypting data of the encrypted test event according to a decryption algorithm corresponding to the encrypted test event to obtain test execution information; After determining that the test execution information meets the preset test parameter specifications, obtaining a test script matching the test execution information according to the test execution information, and executing and monitoring the device test according to the test script; Acquire the first test data information and / or the third test data information of the test device, encrypt the first test data information and / or the third test data information according to a preset data encryption algorithm, and send the encrypted first test data information and / or the third test data information to the data gateway service layer in the form of message queue data transmission, so as to send the first test data and / or the third test data information to the Internet of Things device management platform through the data gateway service layer; and / or, Collect and obtain second test data of the test device, and send the second test data information to the Internet of Things device management platform.
Citation Information
Patent Citations
Mobile equipment software automation test cluster system and test method thereof
CN104978259A
Test method, system and device and storage medium
CN113806156A
Software architecture of server and distributed automatic test system
CN117955886A
Chip test information integration analysis method and system based on cloud
CN118487816A
Automated testing of add-on configurations for searching event data using a late-binding schema
US11714799B1