Unmanned aerial vehicle downlink information test case automatic generation method and system

By automatically parsing the ICD configuration file to generate test case data, the problem of time-consuming and error-prone manual test case generation in UAV ground station software development is solved, and efficient and accurate test case automatic generation is achieved.

CN120803537APending Publication Date: 2025-10-17SHENYANG AIRCRAFT DESIGN INST AVIATION IND CORP OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510826342.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

During the software development process of drone ground stations, generating test cases for downlink communication data is time-consuming and has a high probability of error. Existing technologies rely on manual operations and are inefficient.

Method used

By parsing the ICD configuration file to generate message configuration information, the test case data is automatically generated and saved in hexadecimal format. The UI design module is used to realize human-computer interaction and automatically process the bytes or bits of the ICD protocol to generate test cases.

Benefits of technology

It reduces time and labor costs, lowers the probability of errors, and improves the efficiency and accuracy of test case generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803537A_ABST
    Figure CN120803537A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of aerospace, and particularly relates to an unmanned aerial vehicle downlink information test case automatic generation method and system. The method comprises the following steps: step 1, acquiring an ICD configuration file under a set path, and analyzing the ICD configuration file to generate message configuration information; step 2, generating test case data for each field of the message configuration information; and step 3, storing the test case data in a test case file according to a set format. According to the unmanned aerial vehicle downlink information test case automatic generation method, the test case can be automatically generated, the invested time cost and labor cost can be reduced during testing, the error probability is reduced, and the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of aerospace technology, and particularly relates to a method and system for automatically generating test cases for downlink information of a UAV. BACKGROUND

[0002] In the development of software for a UAV ground station, a large amount of downlink communication data is often required, and each of the communication data packets is based on an ICD protocol. Each ICD protocol is composed of a plurality of bytes or bits, and each byte or bit has a specific meaning. Therefore, when performing a function test, a test case needs to be generated for each byte or bit having a specific meaning.

[0003] Each test case needs to convert the decimal value of the byte or bit into hexadecimal, and then manually generate a complete test data. The byte or bit may generate 2-5 test cases or more test cases. In the past, such work was manually completed, which required a lot of time and manpower, and the error probability was also very high.

[0004] Therefore, there is an urgent need for a technical solution to overcome or alleviate at least one of the above-mentioned defects of the prior art. SUMMARY

[0005] The purpose of the present application is to provide a method and system for automatically generating test cases for downlink information of a UAV to solve at least one problem existing in the prior art.

[0006] The technical solution of the present application is:

[0007] The first aspect of the present application provides a method for automatically generating test cases for downlink information of a UAV, comprising:

[0008] Step 1: Obtain an ICD configuration file under a set path, parse the ICD configuration file to generate message configuration information;

[0009] Step 2: Generate test case data for each field of the message configuration information;

[0010] Step 3: Save the test case data in a test case file according to a set format.

[0011] In the preferred embodiment of the present application, in step 1, obtaining an ICD configuration file under a set path, parsing the ICD configuration file to generate message configuration information, comprises:

[0012] Determine whether the set path exists, if yes, traverse all ICD configuration files under the set path, and the ICD configuration files are written according to a set format;

[0013] The ICD configuration file is parsed line by line to obtain message configuration information;

[0014] The message configuration information is stored.

[0015] In the preferred embodiment of the present application, each line of data in the ICD configuration file includes a start byte, an end byte, a start bit, an end bit, a field name, a physical upper limit, a physical lower limit, and a data type.

[0016] In the preferred embodiment of the present application, in step two, test case data is generated for each field of the message configuration information, including:

[0017] The numerical range of each field of the message configuration information is obtained, and the field is defined by byte or bit;

[0018] Test case data is generated for the physical upper limit, the physical lower limit, and the data type of each field.

[0019] In the preferred embodiment of the present application, test case data is generated for the physical upper limit, the physical lower limit, and the data type of each field, including:

[0020] When the data type is an enumeration type, all enumeration values are generated;

[0021] When the data type is not an enumeration type, the maximum value, the second maximum value, the intermediate value, the second minimum value, and the minimum value are generated according to the physical precision.

[0022] In the preferred embodiment of the present application, the test case data is in decimal format.

[0023] In the preferred embodiment of the present application, in step three, the test case data is saved to a test case file in a set format, including:

[0024] It is determined whether a test case file exists;

[0025] If yes, the test case file is emptied, and the test case data is saved to the test case file in hexadecimal format;

[0026] If no, a new test case file is created, and the test case data is saved to the test case file in hexadecimal format.

[0027] In the preferred embodiment of the present application, the test case file is named by ICD number.

[0028] The second aspect of the present application provides a UAV downlink information test case automatic generation system based on the UAV downlink information test case automatic generation method as described above, including:

[0029] ICD parsing module, configured to obtain an ICD configuration file under a set path, parse the ICD configuration file to generate message configuration information;

[0030] Use case data generation module, configured to generate test case data for each field of the message configuration information;

[0031] Use case data saving module, configured to save the test case data into a test case file in a set format.

[0032] In the preferred embodiment of the present application, further comprising:

[0033] UI design module, configured to realize the man-machine interaction function of the unmanned aerial vehicle downlink information test case automatic generation system by designing a UI interface.

[0034] The present application has at least the following beneficial technical effects:

[0035] The unmanned aerial vehicle downlink information test case automatic generation method of the present application can automatically generate test cases, reduce the time cost and labor cost during testing, reduce the error probability, and improve the work efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 is a flow chart of the unmanned aerial vehicle downlink information test case automatic generation method of an embodiment of the present application;

[0037] Figure 2 is a flow chart of the ICD configuration file parsing of an embodiment of the present application;

[0038] Figure 3 is a flow chart of the test case data generation of an embodiment of the present application;

[0039] Figure 4 is a flow chart of the test case data saving of an embodiment of the present application;

[0040] Figure 5 is a schematic diagram of the unmanned aerial vehicle downlink information test case automatic generation system of an embodiment of the present application;

[0041] Figure 6 is a UI design schematic diagram of the ICD layout of an embodiment of the present application;

[0042] Figure 7 is a UI design schematic diagram of the test case generation of an embodiment of the present application;

[0043] Figure 8 is a schematic diagram of the test case file of an embodiment of the present application. DETAILED DESCRIPTION

[0044] For the purpose, technical solutions and advantages of the embodiments of the present application, the technical solutions of the embodiments of the present application will be described in more detail below. In the drawings, the same or similar notations represent the same or similar elements or elements with the same or similar functions throughout. The described embodiments are part of the embodiments of the present application, not all embodiments. The embodiments described below by reference to the drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application. The embodiments of the present application will be described in detail below with reference to the drawings.

[0045] The embodiments of the present application will be described in detail below with reference to the drawings. Figures 1 to 8 The present application will be further described in detail.

[0046] The first aspect of the present application provides a method for automatically generating test cases for unmanned aerial vehicle downlink information, as shown in the following steps: Figure 1 As shown in the following steps:

[0047] Step one, get the ICD configuration file under the set path, parse the ICD configuration file to generate message configuration information;

[0048] Step two, generate test case data for each field of the message configuration information;

[0049] Step three, save the test case data to the test case file according to the set format.

[0050] The method for automatically generating test cases for unmanned aerial vehicle downlink information of the present application, first, in step one, get the ICD configuration file under the set path, parse the ICD configuration file to generate message configuration information, including:

[0051] Determine whether the set path exists, if yes, traverse all ICD configuration files under the set path, the ICD configuration file is written according to the set format;

[0052] Parse the ICD configuration file line by line to get the message configuration information;

[0053] Save the message configuration information.

[0054] As shown in the following steps: Figure 2As shown, all ICD configuration files in a specific directory are parsed. Each ICD configuration file is written in a specified format. Each line of data in the ICD configuration file contains information such as the start byte, end byte, start bit, end bit, field name, physical upper limit, physical lower limit, and data type. Each line of data is parsed and saved to the memory storage area where the class variable is located.

[0055] The automatic generation method of the UAV downlink information test case of this application, in step 2, such as Figure 3 As shown, several important parameters are used to generate test case data. Specifically, test case data is generated for each field of the message configuration information, including:

[0056] Get the value range of each field of the message configuration information. The fields are defined in bytes or bits.

[0057] Generate test case data for the physical upper limit, physical lower limit, and data type of each field, where:

[0058] When the data type is an enumeration type, all enumeration values ​​are generated;

[0059] When the data type is not an enumeration type, the maximum value, second maximum value, middle value, second minimum value, and minimum value are generated according to the physical precision.

[0060] In this embodiment, the generated test case data is in decimal format.

[0061] The method for automatically generating test cases for downlink information of drones in this application, in step 3, saves the test case data into a test case file according to a set format, including:

[0062] Determine whether the test case file exists;

[0063] If yes, clear the test case file and save the test case data in hexadecimal format to the test case file;

[0064] If not, create a new test case file and save the test case data in hexadecimal format to the test case file.

[0065] like Figure 4 As shown, the generated test case data is saved in a specific test case data file. When processing, it is necessary to determine whether the test case file exists, and then save the data according to the set format. In this embodiment, the test case file is named with the ICD number.

[0066] Based on the above-mentioned method for automatically generating test cases for downlink information of drones, the second aspect of this application provides a system for automatically generating test cases for downlink information of drones, such as Figure 5As shown, comprising:

[0067] ICD analysis module, for obtaining ICD configuration file under the set path, the ICD configuration file is parsed to generate message configuration information;

[0068] Use case data generation module, for each field of message configuration information generates test case data;

[0069] Case data saving module, for saving test case data into test case file according to the set format.

[0070] The unmanned aerial vehicle downlink information test case automatic generation system of the application further comprises: a UI design module for realizing the man-machine interaction function of the unmanned aerial vehicle downlink information test case automatic generation system through designing a UI interface.

[0071] The UI interface designed by the UI design module is the main interface of man-machine interaction. When designing the UI interface, the operation logic, operation habit and interface beauty of the user are mainly considered, so as to ensure that the system design has personality and characteristics, and the operation is simple. In the embodiment, the ICD multi-selection box layout effect is as shown in the figure Figure 6 Through the interface, the user selects the ICD configuration file to be parsed. When the user generates test case data, he only needs to select the ICD configuration file for which he wants to generate test case data. Clicking the "generate test case" button (such as Figure 7 ), the test case data can be saved to the specified test case file directory (such as Figure 8 ).

[0072] The unmanned aerial vehicle downlink information test case automatic generation method and system of the application automatically parses the standard ICD configuration file, generates specific decimal test case data according to the different data types of each byte or bit, and finally converts the decimal test case data into hexadecimal, generates hexadecimal ICD data packet and saves it into the test case file. The application can automatically parse the ICD configuration file, and automatically generate test case data according to each byte or bit in each ICD protocol. When saving the test case data, the test case data of the same ICD protocol is saved in a separate file, and the meaning of the byte or bit is indicated at the same time. This way of automatically generating test case can reduce the time cost and labor cost in testing, reduce the probability of error, and improve work efficiency.

[0073] The above is only a specific embodiment of the application, but the protection scope of the application is not limited thereto. Any changes or replacements within the technical range disclosed in the application can be easily thought of by those skilled in the art, which should be covered within the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.

Claims

1. A method for automatically generating test cases for downlink information of unmanned aerial vehicles, characterized in that: include: Step 1: Obtain the ICD configuration file under the set path, and parse the ICD configuration file to generate message configuration information; Step 2: Generate test case data for each field of the message configuration information; Step 3: Save the test case data into a test case file according to a set format.

2. The method for automatically generating test cases for downlink information of a drone according to claim 1, characterized in that: In step 1, the ICD configuration file under the set path is obtained, and the ICD configuration file is parsed to generate message configuration information, including: Determine whether the set path exists. If so, traverse all ICD configuration files under the set path, and the ICD configuration files are written according to the set format; Parsing the ICD configuration file line by line to obtain message configuration information; The message configuration information is saved.

3. The method for automatically generating test cases for downlink information of unmanned aerial vehicles according to claim 2 is characterized in that: Each line of data in the ICD configuration file includes: a start byte, an end byte, a start bit, an end bit, a field name, a physical upper limit, a physical lower limit, and a data type.

4. The method for automatically generating test cases for downlink information of a drone according to claim 1, characterized in that: In step 2, test case data is generated for each field of the message configuration information, including: Obtaining a value range for each field of the message configuration information, where the field is defined in terms of bytes or bits; Generate test case data for the physical upper limit, physical lower limit, and data type of each field.

5. The method for automatically generating test cases for downlink information of unmanned aerial vehicles according to claim 4 is characterized in that: Generate test case data for the physical upper limit, physical lower limit, and data type of each field, including: When the data type is an enumeration type, all enumeration values ​​are generated; When the data type is not an enumeration type, the maximum value, second maximum value, middle value, second minimum value, and minimum value are generated according to the physical precision.

6. The method for automatically generating test cases for downlink information of a drone according to claim 5, characterized in that: The test case data is in decimal format.

7. The method for automatically generating test cases for downlink information of a drone according to claim 1, characterized in that: In step three, the test case data is saved in a test case file according to a set format, including: Determine whether the test case file exists; If so, after clearing the test case file, save the test case data in the test case file in hexadecimal format; If not, create a new test case file and save the test case data in the test case file in hexadecimal format.

8. The method for automatically generating test cases for downlink information of a drone according to claim 7, characterized in that: The test case file is named with the ICD number.

9. A system for automatically generating test cases for downlink information of unmanned aerial vehicles, based on the method for automatically generating test cases for downlink information of unmanned aerial vehicles according to any one of claims 1 to 8, characterized in that: include: An ICD parsing module is used to obtain an ICD configuration file under a set path and parse the ICD configuration file to generate message configuration information; A test case data generation module, configured to generate test case data for each field of the message configuration information; The test case data saving module is used to save the test case data into a test case file according to a set format.

10. The automatic generation system of UAV downlink information test cases according to claim 9 is characterized in that: Also includes: The UI design module is used to realize the human-computer interaction function of the automatic generation system of drone downlink information test cases by designing the UI interface.

Citation Information

Patent Citations

  • Network data static test system and method for unmanned aerial vehicle control station

    CN113505054A