Automatic testing method and system
By designing an automated test system, using signal shielding boxes, wireless equipment and programmable attenuators, the automation and efficiency of RVR performance testing of WIFI equipment is achieved, and the problems of high site costs and cumbersome manual operations in the existing test methods are solved, and the testing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411878350.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-28
AI Technical Summary
When conducting RVR performance testing of WIFI equipment, existing automated testing methods and systems have problems such as high site cost, cumbersome manual operations and error-prone, resulting in low testing efficiency and low accuracy.
Design an automated test system, including a signal shielding box, wireless equipment, antennas, program-controlled attenuator and main control device, through the main control device, gradually adjusts the attenuation value and test parameters according to the test configuration file, automatically detects the connectivity of the wireless equipment and performs tests, and obtains test data to generate test results for RVR performance.
It improves the comprehensiveness and automation of RVR performance testing, enhances the testing efficiency and effect, reduces manual operation errors and site costs, and simulates signal attenuation at different distances in a laboratory environment to ensure the accuracy of the test results.
Smart Images

Figure CN119727945A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic testing technology, and in particular to an automatic testing method and system. Background Art
[0002] With the booming development of IoT (The Internet of Things), wireless transmission networks have been widely used. IoT includes WIFI (Wireless Fidelity), which is a wireless LAN technology based on the IEEE 802.11 standard that allows electronic devices to transmit and connect data within a certain range through radio waves. WIFI technology is widely used in homes, offices and public places, providing high-speed and convenient network connections. WIFI networks usually use 2.4GHz and 5GHz radio frequency bands for data transmission.
[0003] The WIFI protocol includes multiple versions, such as IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, IEEE802.11ac, IEEE 802.11ax and IEEE 802.11ah. Summary of the invention
[0004] The present application provides an automated testing method and system to improve calibration accuracy.
[0005] In a first aspect, the present application provides an automated testing system, comprising:
[0006] A first signal shielding box, and a first wireless device located inside the first signal shielding box;
[0007] a second signal shielding box, and a second wireless device located inside the second signal shielding box;
[0008] an antenna located inside the second shielding box and connected to the second wireless device;
[0009] a programmable attenuator located outside the first signal shielding box and the second signal shielding box and connected to the first wireless device and the antenna;
[0010] a router located outside the first signal shielding box and the second signal shielding box and connected to the first wireless device and the programmable attenuator;
[0011] A main control device is located outside the first signal shielding box and the second signal shielding box and is connected to the router by wire. The main control device performs a step-by-step adjustment test within a preset attenuation range and a test parameter range according to a test configuration file.
[0012] In some embodiments, the programmable attenuator is connected to the first wireless device and the antenna via a radio frequency cable.
[0013] In some embodiments, the router is connected to the first wireless device and the programmable attenuator via a wired network connection, and the router is connected to the main control device via a wired network connection.
[0014] In a second aspect, the present application further provides an automated testing method, which is applied to the automated testing system described in the first aspect, and the method comprises the steps of:
[0015] The main control device controls the programmable attenuator to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, and controls the first wireless device to gradually adjust the test parameter within the test parameter range according to the test configuration file;
[0016] The main control device controls the first wireless device to detect whether the first wireless device is connected to the second wireless device;
[0017] When it is determined that the first wireless device and the second wireless device are connected, the main control device controls the first wireless device and the second wireless device to perform corresponding tests under test conditions corresponding to the current attenuation value and the current test parameters;
[0018] The master control device acquires test data from the first wireless device, the test data including a corresponding test signal sent by the first wireless device to the second wireless device under the current attenuation value and the current test parameter, and a response signal generated to the second wireless device under the current attenuation value and the current test parameter, the response signal being transmitted through an antenna;
[0019] The main control device obtains a test result according to all the attenuation values in the preset attenuation range and the test data corresponding to all the test parameters in the test parameter range.
[0020] In some embodiments, before the master control device controls the programmable attenuator to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, and controls the first wireless device to gradually adjust the test parameter within the test parameter range according to the test configuration file, the master control device includes:
[0021] The main control device obtains a test configuration file, and parses the test configuration file to obtain the preset attenuation range and the test parameter range;
[0022] The main control device performs initialization settings according to the test parameter range and the preset attenuation range.
[0023] In some embodiments, the main control device controls the programmable attenuator to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, including:
[0024] The main control device controls the programmable attenuator to increase the attenuation value progressively by a preset value within the preset attenuation range according to the first initial attenuation value in the test configuration file, until the maximum attenuation value of the preset attenuation range is reached; or,
[0025] The main control device controls the programmable attenuator to decrease the attenuation value by a preset value within the preset attenuation range according to the second initial attenuation value in the test configuration file, until the minimum attenuation value of the preset attenuation range is reached; the second initial attenuation value is greater than the first initial attenuation value.
[0026] In some embodiments, it also includes:
[0027] When it is determined that there is no connection between the first wireless device and the second wireless device, the main control device skips performing corresponding tests according to the current attenuation value and the current test parameters, and reduces the attenuation value of the programmable attenuator until the connectivity detection result shows that the first wireless device and the second wireless device are connected.
[0028] In some embodiments, the main control device obtains the test result according to all the attenuation values in the preset attenuation range and the test data corresponding to all the test parameters in the test parameter range, including:
[0029] The main control device generates a relationship curve according to the test data; the relationship curve is a curve of the relationship between the wireless signal strength and the data transmission rate.
[0030] In some embodiments, the main control device generates a relationship curve according to the test data, including:
[0031] The main control device obtains a test data table according to the test data, and generates the relationship curve according to the test data table through a preset tool.
[0032] In some embodiments, after the main control device generates the relationship curve according to the test data, the method includes:
[0033] The main control device sends the relationship curve to the target terminal and initiates a notification.
[0034] This application provides. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 It is a structural diagram of an automated testing system provided in an embodiment of the present application.
[0037] Figure 2 It is a flow chart of the automated testing method provided in the embodiment of the present application.
[0038] Figure 3 This is a flowchart of an automated testing method for this application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0040] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0041] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, the known process will not be elaborated in detail to avoid unnecessary details that make the description of the present application embodiment obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.
[0042] Bandwidth and frequency point are two important concepts in wireless communication, and they play a key role in communication systems. Bandwidth refers to the frequency range occupied by wireless signals, usually in Hertz (Hz). Bandwidth determines the frequency range that can be used for data transmission. A larger bandwidth can provide a higher data transmission rate. For example, in the IEEE 802.11 standard, the bandwidth can be 20MHz or 80MHz, etc. The frequency point refers to the specific frequency used to send and receive wireless signals in a specific frequency band. The selection of the frequency point takes into account multiple factors, including the availability of the frequency band, interference conditions, capacity requirements, etc. For example, in the IEEE 802.11 standard, the frequency point can be the 2.4GHz or 5GHz band.
[0043] In order to evaluate and establish the communication performance benchmark of WIFI protocols (such as IEEE 802.11ah) in actual environments, RVR (Rate versus Range) testing is required. RVR testing is a wireless performance benchmark that measures the change of wireless rate with communication distance. It is often used to analyze characteristics such as wireless rate value, performance inflection point, performance rate reduction, and extreme conditions for maintaining communication. RVR testing measures the transmission rate performance of WIFI devices by simulating signal attenuation at different distances. RVR testing can pre-select a straight line as the test path in an open external field, and set multiple evenly distributed sampling points on the test path. These sampling points are used to measure the wireless rate between WIFI devices at different distances. During the test, multiple groups of different test conditions are divided according to different wireless parameter combinations. For each group of test conditions, the wireless rate between wireless devices is measured at several sampling points until the communication is disconnected due to signal attenuation. The core of RVR testing is to simulate signal attenuation by adjusting the attenuator, so as to evaluate the transmission rate performance of WIFI devices at different distances. This method can effectively help identify factors that affect network performance and optimize signal resource allocation in wireless coverage areas. In addition, the automated RVR automated test system can integrate data acquisition, processing and visualization functions, making the test process more efficient and convenient. Through this automated test method, it can be ensured that in actual applications, WIFI devices can maintain stable and reliable communication performance under various environmental conditions, which is of great significance for improving user experience and network stability. However, this test first requires an open external site, which increases the site cost. Secondly, it needs to be carried out by manual testing, which has high labor costs and cumbersome and error-prone operation process. In addition, the cumbersome operation process makes the overall test take a long time, resulting in susceptibility to external factors, thereby affecting the test efficiency and consistency of the test results. In order to solve the above problems, the RVR test can be carried out in the open environment of the external site, and replaced with a laboratory shielded environment built by a shielding box and a programmable attenuator 60 for RVR testing. Although the laboratory shielded environment for RVR testing solves the site and outing costs, the cumbersome test process, low test efficiency and low test accuracy have not been solved.
[0044] The automated testing method and system of the present application are described below in conjunction with the accompanying drawings to solve the above-mentioned problems.
[0045] Reference Figure 1 As shown, Figure 1 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 includes:
[0046] A first signal shielding box 10, and a first wireless device 30 located inside the first signal shielding box 10;
[0047] A second signal shielding box 20, and a second wireless device 40 located inside the second signal shielding box 20;
[0048] an antenna 50 located inside the second shielding box and connected to the second wireless device 40;
[0049] a programmable attenuator 60 located outside the first signal shielding box 10 and the second signal shielding box 20 and connected to the first wireless device 30 and the antenna 50;
[0050] a router 70 located outside the first signal shielding box 10 and the second signal shielding box 20 and connected to the first wireless device 30 and the programmable attenuator 60;
[0051] A main control device 80 located outside the first signal shielding box 10 and the second signal shielding box 20 and connected to the router 70 by wire, the main control device 80 performs a step-by-step adjustment test within a preset attenuation range and a test parameter range according to a test configuration file.
[0052] Specifically, the first wireless device 30 is a companion test device or an AP (Access Point) device, the second wireless device 40 is a device to be tested or a STA (Station) device, and the main control device 80 can be a computer, a PLC (Programmable Logic Controller), a tablet, etc. The first signal shielding box 10 is used to shield the electromagnetic interference of external electromagnetic waves on the first wireless device 30, and the second signal shielding box 20 is used to shield the electromagnetic interference of external electromagnetic waves on the second wireless device 40 and the antenna 50. The main control device 80 located outside the first signal shielding box 10 and the second signal shielding box 20 is used to adjust the test parameters of the first wireless device 30 according to the test parameter range of the test configuration file. The programmable attenuator 60 located outside the first signal shielding box 10 and the second signal shielding box 20 and connected to the first wireless device 30 and the antenna 50 is used to attenuate and adjust the output power of the second wireless device 40 within a preset attenuation range based on the expansion of the main control device 80.
[0053] In some embodiments, the programmable attenuator 60 is connected to the first wireless device 30 and the antenna 50 via a radio frequency cable 92, thereby improving network stability in the RVR performance test and further improving test stability.
[0054] In some embodiments, the router 70 is connected to the first wireless device 30 and the programmable attenuator 60 via a wired network connection, and the router 70 is connected to the main control device 80 via a wired network connection, thereby improving the test system's ability to resist electromagnetic interference and the stability of the transmission signal.
[0055] The automated testing channel of this application is as follows Figure 1 The first test channel includes a first test channel and a second test channel. The first test channel is a test control channel formed by connecting a router 70, a first device under test, a programmable attenuator 60, a main control device 80 and an Ethernet cable 91 (such as a Cat5 network cable, i.e., a fifth category cable), wherein the first device under test is placed in a first shielding box. Figure 1 As shown, the second test channel is an RF signal channel formed by connecting the first device under test, the second device under test, the programmable attenuator 60 and the RF cable 92, wherein the second device under test is placed in the second shielding box. The first test channel is used to provide reliable test control and acquisition functions, that is, to apply specific test conditions and collect test data corresponding to the samples. The second test channel is a working channel for performing RVR performance testing, that is, a test channel. Figure 1 As shown, the main control device 80 is connected to the router 70 via an Ethernet cable 91, the router 70 is connected to the first device under test via an Ethernet cable 91, and the router 70 is connected to the programmable attenuator 60 via an Ethernet cable 91. The programmable attenuator 60 is connected to the first device under test via a radio frequency cable 92, and the programmable attenuator 60 is connected to the second device under test via a radio frequency cable 92.
[0056] By adjusting the test parameters of the first wireless device 30 and the attenuation value of the programmable attenuator 60 through the main control device 80, the second wireless device 40 can be tested under the same test parameters and the same attenuation value. The main control device 80 automatically and gradually adjusts the test parameters and attenuation values according to the test configuration file, and can obtain test data corresponding to different test parameters and different attenuation values within the preset attenuation range and the test parameter range. The test result of the RVR performance of the second wireless device 40 is generated according to the high-density test data, thereby improving the comprehensiveness and automation of the RVR performance test, and further improving the test efficiency and test effect of the RVR performance.
[0057] Reference Figure 1 and Figure 2 As shown, Figure 2 1 is a flow chart of the automated testing method provided in the embodiment of the present application. The automated testing method is applied to the automated testing system described in the above embodiment, such as Figure 2 As shown, the method comprises the steps of:
[0058] S100, the main control device 80 controls the programmable attenuator 60 to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, and controls the first wireless device 30 to gradually adjust the test parameter within the test parameter range according to the test configuration file;
[0059] S200, the main control device 80 controls the first wireless device 30 to detect whether the first wireless device 30 is connected to the second wireless device 40;
[0060] S300, when it is determined that the first wireless device 30 and the second wireless device 40 are connected, the main control device 80 controls the first wireless device 30 and the second wireless device 40 to perform corresponding tests under test conditions corresponding to the current attenuation value and the current test parameters;
[0061] S400, the main control device 80 obtains test data from the first wireless device 30, the test data including the first wireless device 30 sending a corresponding test signal to the second wireless device 40 under the current attenuation value and the current test parameter, and a response signal generated to the second wireless device 40 under the current attenuation value and the current test parameter, the response signal being transmitted through the antenna 50;
[0062] S500: The main control device 80 obtains a test result according to all the attenuation values in the preset attenuation range and the test data corresponding to all the test parameters in the test parameter range.
[0063] Specifically, Figure 1 and Figure 2As shown, the test configuration file includes program statements written based on the Python programming language to implement the automated testing method of the present application. The present application can import or store the test configuration file into the main control device 80, and the main control device 80 opens the test configuration file, and the test configuration file includes a preset attenuation range and a test parameter range, wherein the preset attenuation range includes a minimum attenuation value and a maximum attenuation value, and the test parameter range includes a bandwidth range and a frequency range. The main control device 80 controls the programmable attenuator 60 to gradually adjust the attenuation value within the preset attenuation range according to the test configuration file, and the main control device 80 controls the first wireless device 30 to gradually adjust the bandwidth range and / or frequency range within the test parameter range according to the test configuration file. Whenever the master control device 80 controls the programmable attenuator 60 to complete an adjustment of the attenuation value, and / or the master control device 80 controls the first wireless device 30 to complete an adjustment of the test parameters, the master control device 80 will initiate a connectivity detection initiation instruction to the first wireless device 30. After receiving the connectivity detection initiation instruction, the first wireless device 30 will detect whether it is connected to the second wireless device 40 to obtain a connectivity detection result, and the first wireless device 30 will send the connectivity detection result to the master control device 80. If the connectivity detection result received by the master control device 80 shows that the first wireless device 30 and the second wireless device 40 are connected, then the master control device 80 controls the first wireless device 30 and the second wireless device 40 to perform corresponding tests under the test conditions corresponding to the current attenuation value and the current test parameters, that is, the first wireless device 30 sends the corresponding test signal to the second wireless device 40 under the current test parameters, and the second wireless device 40 receives the test signal and feeds back a response signal to the first wireless device 30, and transmits the response signal generated by the second wireless device 40 through the antenna 50 under the current attenuation value. The first wireless device 30 will receive the response signal returned by the second wireless device 40 through the antenna 50. In this way, the first wireless device 30 will obtain corresponding test data according to the test signal and response signal corresponding to the current attenuation value and the current test parameter. The first wireless device 30 sends the test data corresponding to the current attenuation value and the current test parameter to the main control device 80. In this way, the main control device 80 can obtain the test data corresponding to all attenuation values in the preset attenuation range and all test parameters in the test parameter range. Then, the main control device 80 processes and analyzes all the test data to obtain the corresponding test results.
[0064] In the present application, the main control device 80 adjusts the test parameters of the first wireless device 30 and the attenuation value of the programmable attenuator 60. Under the same test parameters and the same attenuation value, the second wireless device 40 can be tested. The main control device 80 automatically and gradually adjusts the test parameters and attenuation values according to the test configuration file, and can obtain test data corresponding to different test parameters and different attenuation values within the preset attenuation range and the test parameter range. The test result of the RVR performance of the second wireless device 40 is generated according to the high-density test data, thereby improving the comprehensiveness and automation of the RVR performance test, and further improving the test efficiency and test effect of the RVR performance.
[0065] In some embodiments, the main control device 80 controls the programmable attenuator 60 to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, and controls the first wireless device 30 to gradually adjust the test parameter within the test parameter range according to the test configuration file, before the main control device 80 controls the programmable attenuator 60 to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, including:
[0066] S010, the main control device 80 obtains a test configuration file, and parses the test configuration file to obtain the preset attenuation range and the test parameter range;
[0067] S020. The main control device 80 performs initialization settings according to the test parameter range and the preset attenuation range.
[0068] Specifically, the user can write and modify the test configuration file by the main control device 80, or download the test configuration file from the server. The test configuration file can be in .ini (initialization) format, .cfg format, .conf format or .txt format, etc. The preset attenuation range and test parameter range of the test configuration file can be customized by the user according to the needs. After the main control device 80 obtains the test configuration file, it parses the test configuration file to obtain the environment variables, that is, the preset attenuation range and the test parameter range. Then, the main control device 80 creates a global test environment, instantiates the device management class, and initializes the test parameters, so as to complete the initialization setting to ensure the consistency and repeatability of the test environment.
[0069] For example, the ConfigParser module of the Python standard library can be used to parse the test configuration file in the .ini format. The conftest mechanism provided by the pytest framework is used to create different test conditions in combination with the variable values obtained from the test configuration file (i.e., different test parameters and attenuation values in the following embodiments), so that the first wireless device 30 to be tested is placed in different test environments, which improves the maintainability of the test while avoiding repeated definition of the same pre-operation or configuration information in each test configuration file, thereby improving the test efficiency.
[0070] In some embodiments, the main control device 80 controls the programmable attenuator 60 to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, including:
[0071] The main control device 80 controls the programmable attenuator 60 to increase the attenuation value progressively by a preset value within the preset attenuation range according to the first initial attenuation value in the test configuration file, until the maximum attenuation value of the preset attenuation range is reached; or,
[0072] The main control device 80 controls the programmable attenuator 60 to decrease the attenuation value by a preset value within the preset attenuation range according to the second initial attenuation value in the test configuration file, until the minimum attenuation value of the preset attenuation range is reached; the second initial attenuation value is greater than the first initial attenuation value.
[0073] Specifically, starting from a lower first initial attenuation value, the main control device 80 will gradually increase the attenuation value (progressive adjustment) according to the preset value until the maximum attenuation value of the preset attenuation range is reached. Alternatively, starting from a higher second initial attenuation value, the main control device 80 will gradually reduce the attenuation value (decremental adjustment) according to the preset value until the minimum attenuation value of the preset attenuation range is reached. In this embodiment, each method has its preset starting point (the first initial attenuation value or the second initial attenuation value), and a fixed amount of change for each adjustment (preset attenuation difference), and these adjustments are performed within the preset attenuation range. In this way, the programmable attenuator 60 can accurately adjust the signal strength according to the instructions of the main control device 80 to meet various test requirements.
[0074] For example, the programmable attenuator 60 has a knob to adjust the added attenuation value, and the minimum adjustable value is 1 db, because Figure 1 As shown, the programmable attenuator 60 is connected in series in the wireless link, so the entire wireless link will also follow the attenuation. Of course, the main control device 80 can also use a program to control the programmable attenuator 60 according to the test configuration file to change the added attenuation value. For example: the preset attenuation range is from 3db to 70db, and the preset value is 3db. The program will control the second wireless device 40 to work at a bandwidth of 2MHz and a frequency of 903Mhz. At the beginning, the attenuation value of the programmable attenuator 60 is controlled to be 3db, and the wireless rate is measured once. Then, the attenuation value of the programmable attenuator 60 is controlled to be 6db, and the wireless rate is measured again until the attenuation value of the programmable attenuator 60 is 69, and the wireless rate is measured once, and then the end. The program sets the device's RF working bandwidth to 2MHz and the frequency to 905Mhz, and the test is performed according to the above process.
[0075] In some embodiments, it also includes:
[0076] When it is determined that there is no connection between the first wireless device 30 and the second wireless device 40, the main control device 80 skips performing corresponding tests according to the current attenuation value and the current test parameters, and reduces the attenuation value of the programmable attenuator 60 until the connectivity detection result shows that the first wireless device 30 and the second wireless device 40 are connected.
[0077] Specifically, the connection between the first wireless device 30 and the second wireless device 40 may be disconnected for various reasons. For example, insufficient signal strength, interference, excessive load on the first wireless device 30, or active disconnection of the second wireless device 40 may all lead to disconnection. When the connection is disconnected, the test script program running on the main control device 80 needs to detect this abnormal situation and handle it. If not handled, the test script program may cause many failures and abnormalities due to the inability to continue communication, which may cause the program to crash. In order to prevent this from happening, the test script program can automatically lower the attenuation value of the program-controlled attenuator 60 to ensure that the signal strength is moderate, so that the wireless connection between the first wireless device 30 and the second wireless device 40 can be re-established. In this way, even if the wireless connection between the first wireless device 30 and the second wireless device 40 is disconnected, the program can continue to run and remain stable. The automatic adjustment mechanism of this embodiment helps to improve the reliability and stability of the network, reduce the risk of program crashes caused by connection problems, and because the program can avoid program crashes caused by wireless connection problems, ensure the continuity of the test and improve the test efficiency.
[0078] In some embodiments, the main control device 80 obtains the test result according to all the attenuation values in the preset attenuation range and the test data corresponding to all the test parameters in the test parameter range, including:
[0079] The main control device 80 generates a relationship curve according to the test data; the relationship curve is a curve of the relationship between the wireless signal strength and the data transmission rate.
[0080] Specifically, the relationship curve may be an amplitude-frequency characteristic curve, which is a curve used to describe the relationship between wireless signal strength and data transmission rate in wireless communication.
[0081] In some embodiments, the main control device 80 generates a relationship curve according to the test data, including:
[0082] The main control device 80 obtains a test data table according to the test data, and generates the relationship curve according to the test data table through a preset tool.
[0083] Specifically, the main control device 80 can use panads in Python to efficiently save all test data in batches to a test data table (such as an Excel table), and use a preset tool (such as Matplot Lib) to automatically generate a relationship curve. That is, the test data is saved in batches to an Excel file using the pandas library. Pandas is a powerful data processing library that provides a to_excel() method that can export a large amount of test data to an Excel file.
[0084] Assuming that your test data is stored in one or more CSV files, you can use pandas to read these files. If the data is stored in a database, you can also read it through pandas. Process the data as needed, such as cleaning, grouping, calculations, etc. Use pandas's to_excel method to save the processed data to an Excel spreadsheet. To process the collected data using MATLAB or other programming tools, first, you need to convert the data into a format suitable for drawing, such as converting the amplitude to decibel (dB) units. If necessary, you can filter or smooth the data to reduce noise interference and improve the clarity of the RVR curve. Use MATLAB's drawing functions, such as plot or semilogx, to draw the amplitude-frequency characteristic curve. For RVR curves, it is usually necessary to draw them in a logarithmic coordinate system to better show the changes in frequency response. During the drawing process, you can set the x-axis to frequency (Hz) and the y-axis to amplitude (dB), and make sure to use a logarithmic scale to reflect the dynamic range of the frequency response. Users can easily view and analyze data, intuitively obtain the changing trend of a single RVR curve, or compare the differences between multiple RVR curves to quickly grasp the communication characteristics and key performance indicators of the second device under test under different WIFI protocols.
[0085] In some embodiments, after the main control device 80 generates the relationship curve according to the test data, the following steps are performed:
[0086] The main control device 80 sends the relationship curve to the target terminal and initiates a notification.
[0087] Specifically, after the main control device 80 generates the corresponding relationship curve through the above embodiment through the test script program, it can automatically send the relationship curve to the target terminal according to the test script program and initiate a notification to prompt the staff. For example, a custom robot is created in the DingTalk group so that messages can be sent. By obtaining the Webhook address of the DingTalk robot, the automatic push of messages can be realized. This address is used to receive message push requests from the test script program. The requests library can be used to send a POST request, and the relationship curve can be sent to the DingTalk robot as the message content so that all relevant personnel can receive the notification. This embodiment automatically pushes the relationship curve and initiates a notification. This automated notification reduces the time and effort of manual operations, allowing team members to focus more on core tasks and improve work efficiency. This automated notification can ensure the timely delivery of information and avoid delays in manual sending. This automated notification can avoid errors caused by manual message sending, ensure the accuracy and consistency of information transmission, and reduce the error rate of manual sending.
[0088] It should be noted that, in the process of applying the attenuation value of the wireless link, it is usually necessary to gradually increase the attenuation value from the first initial attenuation value until the preset maximum attenuation value is reached (or gradually reduce the attenuation value from the second initial attenuation value until the preset minimum attenuation value is reached). At each attenuation value, the connectivity and uplink and downlink rate tests of the wireless link need to be repeated to simulate the attenuation of wireless signals at different distances.
[0089] It should be noted that in the process of applying and adjusting the test parameters (including frequency and bandwidth) of the wireless link, it is usually necessary to gradually increase the bandwidth (or frequency) from a smaller initial bandwidth (or frequency) until the preset maximum bandwidth (or frequency) is reached, or to gradually reduce the bandwidth (or frequency) from a larger initial bandwidth (or frequency) until the preset minimum bandwidth (or frequency) is reached. Under each test parameter, the connectivity and uplink and downlink rate tests of the wireless link need to be repeated to simulate the performance of the wireless signal under different test parameters.
[0090] Figure 3 This is a flow chart of an example of the automated testing method for this application. Figure 1 and Figure 3As shown, the present application uses a programmable attenuator 60 to apply an initial attenuation value. The present application uses two signal shielding boxes, which are respectively placed in the first wireless device 30 and the second wireless device 40. These shielding boxes are used to isolate external signals and ensure the purity of the test environment. Inside each shielding box, the first wireless device 30 and the second wireless device 40 are respectively placed, and the antenna 50 located inside the second shielding box and wirelessly connected to the second wireless device 40. Outside the shielding box, the first wireless device 30 and the antenna 50 are connected by a radio frequency line to ensure the stability of signal transmission. A controllable attenuator (programmable attenuator 60) is used to connect between the first wireless device 30 and the antenna 50 to simulate signal attenuation. Outside the shielding box, the first wireless device 30 is connected to the switch through a wired connection switch to facilitate data transmission and control. Finally, the switch is connected to the main control device 80 for data processing and result analysis. By adjusting the programmable attenuator 60 to simulate the signal attenuation at different distances, the transmission rate performance at different attenuation values is recorded to perform uplink and downlink performance tests, and the attenuation value of the programmable attenuator 60 is gradually increased to simulate the signal attenuation caused by the increase in distance. That is, after applying the initial attenuation value, the connectivity of the wireless link between the first wireless device 30 and the second wireless device 40 is detected. This can be achieved by sending a test signal and checking the quality of the received signal, and can also be completed through a Ping test, that is, the first wireless device 30 sends a test signal to the second wireless device 40, and checks whether the second wireless device 40 can respond successfully. A successful response proves that the wireless link is connected, otherwise it is not connected. If the connectivity test is successful, that is, the wireless link is connected, you can start measuring the uplink and downlink wireless rates; if the connectivity test fails, that is, the wireless link is not connected, you need to adjust the attenuation value and retest. Measuring the uplink and downlink wireless rates is usually done through a dedicated network performance testing tool, such as using the iperf tool, configuring the iperf server on the first wireless device 30, the client on the second wireless device 40, and the first wireless device 30 sends and receives data packets of a specific size and calculates the transmission rate. Repeat the above test steps under different attenuation values in the preset attenuation range and different test parameters in the test parameter range according to the test requirements to evaluate the performance of the wireless link under different test conditions. After the test is completed, all collected test data is saved to a file or database for subsequent analysis and reporting. The test data includes key performance indicators such as connectivity success rate under different attenuation values, uplink and downlink rates calculated based on test signals and response signals, and RSSI (Received Signal Strength Indicator).
[0091] This application can customize the test parameter range and preset attenuation range, that is, automatically generate the global control information of the current test from the configuration file. This application implements the provision of an uplink and downlink wireless rate test interface and a specific test condition creation and cleanup interface for the wireless link between the first wireless device 30 and the second wireless device 40, automatically covers all sampling point ranges, and automatically issues a DingTalk group notification after the test is completed to achieve unattended and automatic notification. Automatically save test data to Excel, and automatically generate RVR curves to achieve data backtracking and visualization.
[0092] Through the variable design in the test configuration file in .ini format and Configparser parsing, the environment information, device attributes, and test range information are read. Through a simple configuration method, the user can easily pass the test task to the automated execution engine of the main control device 80, that is, the test script program, and quickly start the test, providing a unified interface method, flexibly meeting different device attributes, different environmental requirements or task requirements, without changing the code. The test script program of this application uses a custom encapsulated device management module, a wireless rate test module, combined with a pytest framework and a custom pytest plug-in, to automatically perform tests on the preset attenuation range and test parameter range, and automatically sends a DingTalk group notification when the test ends. The device management module encapsulates the control operation implementation details of different types of DUTs and provides a unified control interface to the outside. The wireless rate measurement module encapsulates connectivity checks, command line measurement rate control, exception handling, and communication recovery, ensuring that it can be fully tested, and when the communication is disconnected, it can automatically clean up the environment and restore it to a controllable state without being forced to terminate the automation midway, and it can also ensure the feasibility of each wireless rate measurement, reduce unnecessary empty runs, and waste time, and can also regulate the stability of wireless rate measurement through fine control of command line options, thereby ensuring the consistency of test data. The test script program of this application executes the test configuration file to cover the communication disconnection without interrupting the automatic execution, and can adjust the wireless rate measurement option to achieve true unattended operation and flexibly control the test accuracy. Since the open environment is limited by objective conditions, the sampling density of the test will not be high. If the laboratory environment wants to achieve high-density sampling and manual data recording, a lot of costs and resources need to be invested. The automated test system of this application can complete high-density sampling of all permutations and combinations of bandwidth, frequency point, and attenuation value, and can configure the sampling density according to user needs and automatically record test data. In addition, since the test cycle of the open environment is calculated in days, the test cycle of the laboratory environment is calculated in hours, and the automated test system of this application is calculated in minutes, it effectively supports high-density sampling, automatically draws a highly fitting real relationship curve, improves the fine-grainedness of the relationship curve scale, accurately reveals its performance change trend, performance inflection point and performance reduction rate, and helps users who do not have data analysis and drawing capabilities to intuitively obtain test conclusions. The accuracy and intuitiveness of the test results help ordinary users directly obtain test conclusions.
[0093] In specific implementation, the above units or modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The above units or modules can refer to the previous method embodiments to implement data collection for supply chain management projects, which will not be repeated here.
[0094] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a readable storage medium of a main control device 80, and loaded and executed by a processor to implement the above method embodiments. The readable storage medium of the main control device 80 may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0095] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the data acquisition system and its corresponding units described above can refer to the description of the automated testing method in the above embodiment, and will not be repeated here.
[0096] The above is a detailed introduction to an automated testing method and system provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An automated testing system, characterized in that: include: A first signal shielding box, and a first wireless device located inside the first signal shielding box; a second signal shielding box, and a second wireless device located inside the second signal shielding box; an antenna located inside the second shielding box and connected to the second wireless device; a programmable attenuator located outside the first signal shielding box and the second signal shielding box and connected to the first wireless device and the antenna; a router located outside the first signal shielding box and the second signal shielding box and connected to the first wireless device and the programmable attenuator; A main control device is located outside the first signal shielding box and the second signal shielding box and is connected to the router by wire. The main control device performs a step-by-step adjustment test within a preset attenuation range and a test parameter range according to a test configuration file.
2. The automated testing system according to claim 1, wherein: The programmable attenuator is connected to the first wireless device and the antenna via a radio frequency cable.
3. The automated testing system according to claim 1, wherein: The router is connected to the first wireless device and the programmable attenuator via a wired network connection, and the router is connected to the main control device via a wired network connection.
4. An automated testing method, characterized in that: Applied to the automated testing system according to any one of claims 1 to 3, the method comprises the steps of: The main control device controls the programmable attenuator to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, and controls the first wireless device to gradually adjust the test parameter within the test parameter range according to the test configuration file; The main control device controls the first wireless device to detect whether the first wireless device is connected to the second wireless device; When it is determined that the first wireless device and the second wireless device are connected, the main control device controls the first wireless device and the second wireless device to perform corresponding tests under test conditions corresponding to the current attenuation value and the current test parameters; The master control device acquires test data from the first wireless device, the test data including a corresponding test signal sent by the first wireless device to the second wireless device under the current attenuation value and the current test parameter, and a response signal generated to the second wireless device under the current attenuation value and the current test parameter, the response signal being transmitted through an antenna; The main control device obtains a test result according to all the attenuation values in the preset attenuation range and the test data corresponding to all the test parameters in the test parameter range.
5. The automated testing method according to claim 4, characterized in that: The main control device controls the programmable attenuator to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, and controls the first wireless device to gradually adjust the test parameter within the test parameter range according to the test configuration file, including: The main control device obtains a test configuration file, and parses the test configuration file to obtain the preset attenuation range and the test parameter range; The main control device performs initialization settings according to the test parameter range and the preset attenuation range.
6. The automated testing method according to claim 4, characterized in that: The main control device controls the programmable attenuator to gradually adjust the attenuation value within a preset attenuation range according to the test configuration file, including: The main control device controls the programmable attenuator to increase the attenuation value progressively by a preset value within the preset attenuation range according to the first initial attenuation value in the test configuration file, until the maximum attenuation value of the preset attenuation range is reached; or, The main control device controls the programmable attenuator to decrease the attenuation value by a preset value within the preset attenuation range according to the second initial attenuation value in the test configuration file, until the minimum attenuation value of the preset attenuation range is reached; the second initial attenuation value is greater than the first initial attenuation value.
7. The automated testing method according to claim 4, characterized in that: Also includes: When it is determined that there is no connection between the first wireless device and the second wireless device, the main control device skips performing corresponding tests according to the current attenuation value and the current test parameters, and reduces the attenuation value of the programmable attenuator until the connectivity detection result shows that the first wireless device and the second wireless device are connected.
8. The automated testing method according to claim 4, characterized in that: The main control device obtains a test result according to all the attenuation values in the preset attenuation range and the test data corresponding to all the test parameters in the test parameter range, including: The main control device generates a relationship curve according to the test data; the relationship curve is a curve of the relationship between the wireless signal strength and the data transmission rate.
9. The automated testing method according to claim 8, characterized in that: The main control device generates a relationship curve according to the test data, comprising: The main control device obtains a test data table according to the test data, and generates the relationship curve according to the test data table through a preset tool.
10. The automated testing method according to claim 9, characterized in that: After the main control device generates the relationship curve according to the test data, the following steps are included: The main control device sends the relationship curve to the target terminal and initiates a notification.