Automated testing method and device
Through automated testing methods and devices, multiple GNSS devices are automatically tested, which solves the problems of low testing efficiency and long data analysis time in the existing technology, realizes efficient data processing and report generation, and improves the market's product functions and Performance satisfaction.
Patent Information
- Application Number
- CN202210588482.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-05-26
AI Technical Summary
The existing testing methods based on GNSS devices require manual intervention and confirmation by testers, resulting in inefficient testing and long data analysis time, which cannot meet the high market requirements for product functions and performance.
Provide an automated testing method and device, through the collaborative work of the client and the server, realize automated testing of multiple GNSS devices, use preset test cases and parameters to test, and analyze and report the test data, and monitor the system. Resource usage to optimize processing efficiency.
It simplifies the operation process of testers, reduces data analysis time, improves data processing efficiency, automatically generates test reports, avoids human errors, and shortens the product development iteration cycle.
Smart Images

Figure CN114968784B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more particularly to an automated testing method and device. Background Art
[0002] As the construction of GNSS systems in various countries gradually improves, the market share of domestic GNSS manufacturers has gradually increased, and product shipments have also hit new highs. The warming market has also driven new customer demands. Customers have also extracted higher requirements for product functions and performance. In order to meet the functional and performance requirements of GNSS equipment from different customer companies, the company needs to develop a large number of test cases to conduct all-round testing of the test equipment. More requirements have been put forward for the number of testers and data analysis capabilities.
[0003] Currently, GNSS device-based tests are all performed on a single test case. After the test data is recorded, it is processed and analyzed, and then the tester checks the processing results and feeds them back to the R&D personnel for iteration. Each case test process requires the tester to intervene and confirm, which brings great challenges to the testing work. Summary of the invention
[0004] The present application provides an automated testing method and apparatus, which realizes automated testing of multiple GNSS devices simultaneously.
[0005] This application provides an automated testing method, which is applied to the client, including:
[0006] When test requests of multiple GNSS devices are received at the same time, for any GNSS device, the GNSS device is tested in sequence according to a preset order using one or more selected test cases;
[0007] Whenever a test case is completed, the test data of the GNSS device is uploaded to the server.
[0008] In an exemplary embodiment, each test case includes preconfigured test parameters.
[0009] In an exemplary embodiment, the GNSS device is tested in sequence according to a preset order using one or more selected test cases, including:
[0010] The GNSS device is tested according to the pre-configured test parameters of the selected test case.
[0011] In an exemplary embodiment, the preconfigured test parameters include the on-off duration of the radio frequency relay switch and the on-off duration of the power supply relay switch.
[0012] This application provides an automated testing method, which is applied to the server side, including:
[0013] Receive test data from GNSS equipment, analyze the received test data, and generate a test report.
[0014] In an exemplary embodiment, analyzing the received test data includes:
[0015] The received test data is compared with a preset threshold value corresponding to the test data, and the comparison result is analyzed to determine whether the test data meets the test requirements.
[0016] In an exemplary embodiment, before analyzing the test data, the process includes:
[0017] Monitor the current system resource usage;
[0018] When multiple test data are received simultaneously, the test data to be analyzed simultaneously is determined according to the current system resource usage.
[0019] The present application provides an automated testing device, including a memory and a processor.
[0020] The memory is used to store programs for automated testing;
[0021] The processor is used to read and execute the program for automated testing, and perform the following operations:
[0022] When test requests of multiple GNSS devices are received at the same time, for any GNSS device, the GNSS device is tested in sequence according to a preset order using one or more selected test cases;
[0023] Whenever a test case is completed, the test data of the GNSS device is uploaded to the server.
[0024] In an exemplary embodiment, each test case includes preconfigured test parameters.
[0025] In an exemplary embodiment, the GNSS device is tested in sequence according to a preset order using one or more selected test cases, including:
[0026] The GNSS device is tested according to the pre-configured test parameters of the selected test case.
[0027] In an exemplary embodiment, the preconfigured test parameters include the on-off duration of the radio frequency relay switch and the on-off duration of the power supply relay switch.
[0028] The present application provides an automated testing device, including a memory and a processor.
[0029] The memory is used to store programs for automated testing;
[0030] The processor is used to read and execute the program for automated testing, and perform the following operations:
[0031] Receive test data from GNSS equipment, analyze the received test data, and generate a test report.
[0032] In an exemplary embodiment, analyzing the received test data includes:
[0033] The received test data is compared with a preset threshold value corresponding to the test data, and the comparison result is analyzed to determine whether the test data meets the test requirements.
[0034] In an exemplary embodiment, before analyzing the test data, the process includes:
[0035] Monitor the current system resource usage;
[0036] When multiple test data are received simultaneously, the test data to be analyzed simultaneously is determined according to the current system resource usage.
[0037] This application includes the following advantages:
[0038] At least one embodiment of the present application can configure multiple GNSS test cases at one time and can connect to multiple GNSS devices at one time; it simplifies the operating process of testers, and the data analysis function can effectively reduce the data analysis time of testers.
[0039] At least one embodiment of the present application can maximize processing efficiency by monitoring the current system resource usage when server resources are limited.
[0040] At least one embodiment of the present application supports a data analysis function, which directly provides test results by comparing threshold parameters given in advance, thereby improving data processing efficiency.
[0041] At least one embodiment of the present application can directly generate a test report, avoiding manual writing of the test report, effectively reducing the time spent by testers in writing the test report, and avoiding human errors.
[0042] Of course, any product implementing the present application does not necessarily need to achieve all of the advantages described above at the same time.
[0043] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by implementing the present application. Other advantages of the present application can be realized and obtained by the schemes described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0045] Figure 1 A flowchart of an automated testing method for a client according to an embodiment of the present application;
[0046] Figure 2 A flowchart of the automated testing method for the server side of the embodiment of the present application;
[0047] Figure 3 A schematic diagram of an automated testing system according to an embodiment of the present application;
[0048] Figure 4 A schematic diagram of an automated testing device according to an embodiment of the present application;
[0049] Figure 5 Schematic diagram of another automated testing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] Figure 1 Flow chart of the automated testing method of an embodiment of the present application, such as Figure 1 As shown, the automated testing method of this embodiment includes steps S11-S12:
[0051] S11. When test requests of multiple GNSS devices are received at the same time, for any GNSS device, the GNSS device is tested in sequence according to a preset order using one or more selected test cases;
[0052] S12. Whenever a test case is completed, the test data of the GNSS device is uploaded to the server.
[0053] In an exemplary embodiment, each test case includes preconfigured test parameters.
[0054] In an exemplary embodiment, the GNSS device is tested in sequence according to a preset order using one or more selected test cases, including:
[0055] The GNSS device is tested according to the pre-configured test parameters of the selected test case.
[0056] In an exemplary embodiment, the preconfigured test parameters include the on-off duration of the radio frequency relay switch and the on-off duration of the power supply relay switch.
[0057] Before testing the GNSS device, check whether the client's peripheral devices (i.e., RF relay switch and power relay switch) are connected normally, whether the power supply is stable, and check the device connection port to prevent it from being occupied by other programs.
[0058] The embodiment of the present application realizes automatic testing of multiple GNSS devices at the same time by selecting test cases in a preset order for any GNSS device when test requests of multiple GNSS devices are received at the same time. The operation process of testers is simplified, and the data analysis function can effectively reduce the data analysis time of testers.
[0059] Figure 2 This is a flow chart of the automated testing of the server side of the embodiment of the present application, such as Figure 2 As shown, including steps S21-S22:
[0060] S21, receiving test data of the GNSS device;
[0061] S22. Analyze the received test data and generate a test report.
[0062] In an exemplary embodiment, the test data is mainly the protocol clauses supported by the GNSS device protocol document (including positioning, orientation, satellite tracking data and the number of tracked satellites, observation values of tracked satellites and other related protocols). Since there are many protocols, all tests need to configure the board according to the test requirements (for example, after the current test case is completed, the device to be tested will be configured according to the configuration requirements of the next test case. However, for multiple devices corresponding to a test case, the configurations of multiple devices are consistent.) to meet the test and analysis of the current function. Since the board supports many output protocols, but the throughput of the device is limited, the board needs to be configured according to the test needs to avoid other problems such as loss of subsequent data, jamming, insufficient CPU computing power, etc. due to the limitation of port data throughput, which makes it impossible to evaluate the test purpose.
[0063] In an exemplary embodiment, analyzing the received test data includes:
[0064] The received test data is compared with a preset threshold value corresponding to the test data, and the comparison result is analyzed to determine whether the test data meets the test requirements.
[0065] Theoretically, the startup time of the device should be roughly the same under different power-on and power-off times, so the threshold is set to a fixed value.
[0066] The given other related thresholds are basically universal parameters and are independent of the test case. For example, the threshold for the number of data loss and the threshold for the length of time the observation value is lost are independent of the case, as well as the size of the positioning error.
[0067] In an exemplary embodiment, after generating a test report, the following steps are included:
[0068] Send the test report to relevant personnel.
[0069] In an exemplary embodiment, before analyzing the test data, the process includes:
[0070] Monitor the current system resource usage;
[0071] When multiple test data are received simultaneously, the test data to be analyzed simultaneously is determined according to the current system resource usage.
[0072] The embodiment of the present application can automatically analyze the test data and automatically generate the test report by analyzing the received test data, thus avoiding manual data analysis and test report writing. This improves data processing efficiency, effectively reduces the time testers spend writing test reports, and avoids human errors.
[0073] Figure 3 Schematic diagram of the GNSS device automated test system of the embodiment of the present application. The automated test system includes a test PC and a server. The satellite signal source is connected to the RF relay switch, the RF relay is connected to the test PC via a serial port line, and the power relay switch is connected to the test PC via a serial port line. Device 1, device 2, and device n are connected to the test PC via a serial port line, the RF relay switch and the power relay switch are connected to the test device respectively, and the power supply is connected to the power relay switch. Device 1, device 2, and device n are GNSS devices. The test PC is connected to the server via a network.
[0074] The test PC includes a client program (the client program is used for the automated testing of the client mentioned above). The test end program is mainly responsible for collecting, selecting and editing test cases, and then testing the device under test according to the set case parameters. After the data recording is completed, the data is uploaded to the server and the server program is notified. The program tests the next case in the case sequence until all cases are tested and recorded.
[0075] The server includes a server-side program (the server-side program is used for the automated testing of the server-side mentioned above).
[0076] After receiving the notification sent by the client, the corresponding data processing process is started according to the current system test resource usage to avoid too much or too little starting at one time, which may cause the system to freeze or not be fully utilized. After the processing is completed, the processing results are added to the corresponding test report, and the data analysis module is started to analyze the test result data to check whether the corresponding indicators meet the test requirements. After all test data analysis is completed, the analysis results are sent through the email sending module.
[0077] The peripheral equipment mainly includes two relay switches (i.e., RF relay switch and power relay switch), which are mainly used to control the power-on and power-off conditions of the equipment. The system is configured according to the case setting parameters to meet the operating conditions of the equipment under test in different situations.
[0078] The test steps are as follows:
[0079] 1. Start the test program, communicate with the server program, and confirm that the server is running normally.
[0080] 2. Add the computer ports and baud rate configurations corresponding to all devices under test to the port device configuration list.
[0081] 3. To add a test case, you can directly select an existing test case in the list box or edit and add a new test case and add it to the list of test cases to be tested.
[0082] 4. The test program will parse the collected test case configuration content and store it in a new configuration list in a fixed format. Finally, two tables are formed: the test case configuration list and the device port configuration list under test. Each time, one test case list item and one device port configuration list under test are sent.
[0083] 5. When starting the test, the test program will pass the first item of the test case list and the port configuration list of the device to be tested as parameters to the test process and start the main test process.
[0084] 6. The main test process first starts the power relay switch and RF relay switch threads, and keeps the device switch on. Then, according to the port device list, thread monitoring function threads of the ports of the device under test are established in turn. A new file is created to store the data of the corresponding ports of the device under test.
[0085] 7. The main test process configures the board output content according to the parameters, and performs the test after the configuration is successfully detected.
[0086] 8. The main test process starts recording data and turns off the power relay switch at the same time (taking the power-off test as an example, the RF relay switch state remains unchanged). After a certain period of power outage, the power relay switch is started according to the parameters. This part of the function is realized through a combination of loops, timers, semaphores and specific function functions.
[0087] 9. After the power-on time of the test main process reaches the preset time, turn off the power relay switch and repeat the above operations until the preset number of tests is reached.
[0088] 10. Test that the main process closes all file handles and device port listening thread functions.
[0089] 11. The test main process uploads the above data to the server.
[0090] 12. After uploading is completed, establish communication with the server program and send the processing items and parameters to the server, and then disconnect. The server data processing program processes the group of data according to the received parameters and generates a test report.
[0091] 13. After step 10, the main test process notifies the test program that the current test is over. The test program starts to send the second item of the test case configuration list and the port configuration list of the device to be tested as parameters to the main test process and start the test. (jump to step 5)
[0092] 14. Repeat the above steps until all test cases are completed.
[0093] 15. After all test cases are completed, the test program (client) notifies the server that all current test cases are completed. After receiving the notification, the server first processes the data. After processing, it sends the shared path of the server address where the test report is located via email.
[0094] In step 2, a test case consists of the following parts:
[0095] Device under test: mainly through providing ports and port configuration parameters to achieve the configuration of the device under test, mainly by providing some instructions, which are sent to the device under test before starting the test, so that the device can run according to the test status.
[0096] Relay configuration parameters: mainly used to control the power-on and power-off time of the device under test, the power-on and power-off conditions of the device under test, and the power-on and power-off signal conditions.
[0097] It should be noted that for multiple devices, the devices under test are configured according to the second part of the parameters (ie, the relay configuration parameters), and the test contents executed by all the devices under test are consistent.
[0098] In step 7, configuration instructions are sent to the GNSS device under test according to the test case requirements, such as configuring the board to turn on the RTK positioning function or orientation function, and sending relevant protocol instruction requests at the same time. By processing and analyzing the output data, it is confirmed whether the positioning and orientation accuracy of the board meets the test requirements.
[0099] The configuration parameters of the board are included in the test case. When adding a test case, you can modify the original test case or modify the parameters in the process of adding a new test case.
[0100] The GNSS equipment automated test system has the following advantages:
[0101] Simplify the tester's operation process. The data analysis function can effectively reduce the tester's data analysis time;
[0102] Increase data processing efficiency and generate test reports. The test report generation function can effectively reduce the time testers spend writing test reports and avoid human errors;
[0103] Release testing human resources and shorten product development iteration cycle.
[0104] Figure 4 Schematic diagram of an automated testing device according to an embodiment of the present application. Figure 4 As shown, the automatic testing device of this embodiment includes a memory and a processor.
[0105] The memory is used to store programs for automated testing;
[0106] The processor is used to read and execute the program for automated testing, and execute the automated testing method applied to the client.
[0107] Figure 5 Schematic diagram of an automated testing system according to an embodiment of the present application. Figure 5 As shown, the automatic testing system of this embodiment includes a memory and a processor.
[0108] The memory is used to store programs for automated testing;
[0109] The processor is used to read and execute the program for automated testing, and execute the automated testing method applied to the server side.
[0110] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the specific embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.
[0111] Any features shown and / or discussed in this application may be implemented alone or in any appropriate combination.
[0112] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of steps described herein, the method or process should not be limited to the steps in the specific order described. As will be appreciated by those of ordinary skill in the art, other sequences of steps are also possible.
[0113] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
Claims
1. An automated testing method, applied to a client, characterized in that: When test requests of multiple GNSS devices are received at the same time, for any GNSS device, the GNSS device is tested in sequence according to a preset order using one or more selected test cases; Whenever a test case is completed, the test data of the GNSS device is uploaded to the server; Each test case includes relay configuration parameters, and the relay configuration parameters are set to control the power-off time of the device under test, the power-off condition of the device under test, and the power-off signal condition; The method tests the GNSS device in sequence according to a preset order through one or more selected test cases, including: passing an item in a pre-established test case configuration list and a pre-established device under test port configuration list as parameters to a test process in a preset order, and starting a test main process; the test main process is configured to start a power relay switch and a radio frequency relay switch thread, and keep the device switch in an on state, and then sequentially establish thread listening function threads of the device under test port according to the device under test port configuration list and set a file for storing data of the corresponding port of the GNSS device under test; after successfully configuring the board card output content of the GNSS device according to the parameters, start testing and record data, control the power relay switch and the radio frequency relay switch to be turned on and off according to the relay configuration parameters of the test case, and close all thread listening function threads after reaching a predetermined number of tests; The test case configuration list includes parsed test case configuration content stored in a predetermined format; the device under test port configuration list includes computer ports corresponding to all devices under test.
2. An automated testing method, applied to a server, characterized in that: Receive test data from GNSS equipment, analyze the received test data, and generate a test report; The test data is obtained in the following test manner: Testing the GNSS device in sequence according to a preset order using one or more selected test cases; Each test case includes relay configuration parameters, and the relay configuration parameters are set to control the power-off and power-on time of the device under test, the power-off and power-on conditions of the device under test, and the power-off and power-on signal conditions; Among them, the GNSS device is tested in sequence according to a preset order through one or more selected test cases, including: passing an item in a pre-established test case configuration list and a pre-established device under test port configuration list as parameters to the test process in a preset order, and starting the test main process; the test main process is set to start the power relay switch and the radio frequency relay switch thread, and keep the device switch in an on state, and then sequentially establish the thread listening function thread of the device under test port according to the device under test port configuration list and set a file for storing data corresponding to the port of the GNSS device under test; after the board card output content of the GNSS device is successfully configured according to the parameters, start testing and record data, control the power relay switch and the radio frequency relay switch to be turned on and off according to the relay configuration parameters of the test case, and close all thread listening function threads after reaching a predetermined number of tests; The test case configuration list includes parsed test case configuration content stored in a predetermined format; the device under test port configuration list includes computer ports corresponding to all devices under test.
3. The method of claim 2, analyzing the received test data, comprising: The received test data is compared with a preset threshold value corresponding to the test data, and the comparison result is analyzed to determine whether the test data meets the test requirements.
4. The method according to claim 2, before analyzing the test data, comprises: Monitor the current system resource usage; When multiple test data are received simultaneously, the test data to be analyzed simultaneously is determined according to the current system resource usage.
5. An automated testing device, comprising a memory and a processor, characterized in that: The memory is used to store programs for automated testing; The processor is used to read and execute the program for automated testing, and to perform the method according to claim 1.
6. An automated testing device, comprising a memory and a processor, characterized in that: The memory is used to store programs for automated testing; The processor is used to read and execute the program for automated testing, and to perform the method according to any one of claims 2 to 4.
