Method and device for generating satellite program control execution process test case

By establishing a satellite program control instruction library and process table, a test program sequence covering all paths is generated, which solves the problem of insufficient coverage of test cases in the existing technology, and improves the efficiency and effectiveness of satellite program control execution program testing.

CN119847935APending Publication Date: 2025-04-18SHANGHAI AEROSPACE COMP TECH INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510029685.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately select the minimum set test cases with comprehensive coverage, resulting in insufficient efficiency, coverage and effectiveness of satellite program-controlled execution program tests.

Method used

By collecting the command characteristics and execution process characteristics in the satellite program control process, establishing a program control output instruction library and program control instruction process table, setting test feature values ​​as needed, and generating a test program sequence covering all paths.

Benefits of technology

It realizes full coverage of satellite program-controlled instruction sequences, improves the efficiency, coverage and effectiveness of testing, and can quickly generate targeted test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847935A_ABST
    Figure CN119847935A_ABST
Patent Text Reader

Abstract

The invention discloses a method for generating a test case in a satellite program control execution process, which comprises the following steps of: classifying instructions by collecting instruction characteristics in the satellite program control process, and establishing a program control output instruction library; collecting execution process characteristics in a satellite program control process, and establishing a program control instruction process table; and setting a test characteristic value as required, reading the program control instruction process table according to the test characteristic value, and generating a corresponding test program sequence. All paths of the specified program control instruction sequence can be effectively covered, paths of the program control instruction sequence related to the specified test characteristic value can be accurately covered, and the efficiency, coverage and effectiveness of the satellite program control instruction sequence test are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of software testing, and in particular relates to a method and device for generating test cases for a satellite program-controlled execution process. Background Art

[0002] The satellite program control executive program is an automated program executed by the satellite to deal with various working conditions and safety states. It involves many parameters and state quantities, and the control process is complex. The satellite program control executive program test is a test for the correctness of the satellite program control executive program execution. The coverage and error detection capabilities of the test determine the test effect, but comprehensive coverage testing is a complicated process, so it is very important to determine how to accurately select the minimum set of test cases with comprehensive coverage. Summary of the invention

[0003] The purpose of the present invention is to provide a method and device for generating test cases for a satellite program-controlled execution process, which can quickly generate corresponding test cases in a targeted manner, accurately cover the paths of program-controlled instruction sequences related to specified test feature values, and improve the efficiency, coverage and effectiveness of satellite program-controlled instruction sequence testing.

[0004] To solve the above problems, the technical solution of the present invention is: A method for generating a test case for a satellite program control execution process, comprising: Collect the command features during satellite program control, classify the commands, and establish a program control output command library; Collecting execution process characteristics during satellite program control and establishing a program control instruction process table, wherein the program control instruction process table includes execution time, execution instruction, execution judgment parameter and jump logic; The test characteristic value is set as required, and according to the test characteristic value, the program control instruction process table is read to generate a corresponding test program sequence.

[0005] According to an embodiment of the present invention, classifying instructions and establishing a program-controlled output instruction library further includes: Establish a program control instruction format template to generate a unique identifier and value range for variable parameters; classify instructions into fixed instructions and variable instructions based on the classification standard of whether they contain variable parameters, and generate a fixed instruction library and a variable instruction library.

[0006] According to an embodiment of the present invention, reading the program control instruction process table according to the test characteristic value and generating the corresponding test program sequence further comprises: When the test characteristic value is a program-controlled instruction process, the generated test program sequence covers abnormal values, boundary values, normal values ​​of the variable parameter value range of the program-controlled instruction, and each jump branch of the program-controlled execution process; When the test characteristic value is a fixed instruction, the generated test program sequence covers the jump branches of the program control instructions involving the fixed instruction; When the test feature value is a variable instruction, the generated test program sequence covers the jump branches involved in the variable instruction, and the boundary values ​​and normal values ​​of the variable parameters of the variable instruction; When the test characteristic values ​​are in a logical correspondence, the generated test program sequence covers the abnormal values, boundary values, and normal values ​​of the variable parameters in the program control instruction format template, and the boundary values ​​and abnormal values ​​of the variable parameters in the variable instruction library; When the test feature value is jump logic, the generated test program sequence covers the true and false branches of the jump logic.

[0007] According to one embodiment of the present invention, when establishing a program control instruction format template, variable parameters are defined to include a frame header, a frame tail, a checksum, and various program control execution parameters; and the satellite working condition-related value range and the value range corresponding to the program control execution parameter type are set as the value range of the variable parameters.

[0008] According to an embodiment of the present invention, when establishing a program-controlled output instruction library, fixed instructions are numbered and stored as hexadecimal instruction codes; The variable instructions are encoded and stored in the following format: Instruction number, first fixed value + first variable parameter + second fixed value + second variable parameter + third fixed value.

[0009] According to an embodiment of the present invention, after the program-controlled instruction process table is established, the program-controlled instruction process table is read to generate a complete set of test cases covering normal values, abnormal values, boundary values ​​of all parameters, and all paths.

[0010] A device for generating test cases for satellite program-controlled execution process, comprising: The first data processing module is configured to collect instruction features during satellite program control, classify the instructions, and establish a program control output instruction library; The second data processing module is configured to collect execution process characteristics during satellite program control and establish a program control instruction process table, wherein the program control instruction process table includes execution time, execution instruction, execution judgment parameter and jump logic; The use case generation module is configured to set the test characteristic value as needed, read the program control instruction process table according to the test characteristic value, and generate a corresponding test program sequence.

[0011] A device for generating test cases for satellite program-controlled execution process, comprising: A memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the device for generating satellite program-controlled execution process test cases to execute the method for generating satellite program-controlled execution process test cases according to an embodiment of the present invention.

[0012] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a method for generating a satellite program-controlled execution process test case according to an embodiment of the present invention is implemented.

[0013] Due to the adoption of the above technical solution, the present invention has the following advantages and positive effects compared with the prior art: The method for generating a satellite program control execution process test case in an embodiment of the present invention collects instruction features in the satellite program control process, classifies instructions, and establishes a program control output instruction library; collects execution process features in the satellite program control process, and establishes a program control instruction process table; sets test feature values ​​as needed, reads the program control instruction process table according to the test feature values, and generates a corresponding test program sequence. It can effectively cover all paths of the specified program control instruction sequence, and can accurately cover the paths of the program control instruction sequence related to the specified test feature value, thereby improving the efficiency, coverage, and effectiveness of satellite program control instruction sequence testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 A flow chart of a method for generating a satellite program control execution process test case in one embodiment of the present invention; Figure 2 A block diagram of a device for generating a test case for a satellite program-controlled execution process in an embodiment of the present invention; Figure 3 The figure is a schematic diagram of a device for generating test cases for a satellite program-controlled execution process in one embodiment of the present invention. DETAILED DESCRIPTION

[0015] The following is a further detailed description of a method and device for generating a satellite program-controlled execution process test case proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description and claims.

[0016] Embodiment 1 The commonly used design methods for satellite program control execution sequence test cases are generally divided into the following two types: 1) Generate test cases by combining the routine execution path of the program-controlled execution sequence with the safe (abnormally open) execution path of the program-controlled execution sequence; 2) Full coverage of the execution path of the programmed execution sequence.

[0017] These methods either do not cover all aspects or execute redundant test cases, which is not conducive to improving test effectiveness and efficiency.

[0018] This embodiment provides a method for generating a satellite program control execution process test case. Figure 1 , the method comprises the following steps: S1: Collect the command features during satellite program control, classify the commands, and establish a program control output command library; S2: Collect the execution process characteristics of the satellite program control process and establish a program control instruction process table, which includes execution time, execution instructions, execution judgment parameters and jump logic; S3: Set the test characteristic value as needed, read the program control instruction process table according to the test characteristic value, and generate the corresponding test program sequence.

[0019] Through the above method, corresponding test cases can be quickly generated for the parameters or paths of modification or targeted testing, thereby achieving the generation of a minimum set of test cases with comprehensive coverage.

[0020] Specifically, in step S1, the command features in the satellite program control process are collected, the commands are classified, and a program control output command library is established. Satellite program control commands mainly include the following types: Payload repower, initialization, and restoration of normal observation mode: These instructions are used to ensure that all satellite payloads are adjusted to the latest working status and continue to perform scientific observation missions stably.

[0021] ‌Attitude change‌: When the satellite is executing the daily observation plan, if a scientific opportunity event that is not included in the daily observation plan occurs, the mission center needs to temporarily upload instructions to command the satellite to change its attitude and aim at the observation target‌.

[0022] ‌GPGGA‌: Used to output satellite system positioning data‌.

[0023] ‌GPRMC‌: used to output time, date, position, speed and other information‌.

[0024] ‌KSXT‌: Positioning and orientation data output statement, including the time, position, positioning and orientation related data of the GNSS receiver‌.

[0025] ‌HEADING‌: Used to set the heading and pitch angle offsets to correct the heading and pitch data output by the receiver‌.

[0026] ‌RTK Engine Configuration‌: Configure the RTK working mode or clear RTK parameters‌.

[0027] ‌RTCMB1CB2a version configuration‌: Configure whether to program the B1C&B2a signals of the BDS system satellite into the RTCM protocol.

[0028] Regardless of the role of these program-controlled instructions, in terms of their attributes, a program-controlled instruction format template is established to generate a unique identifier and value range for variable parameters; the instructions are classified into fixed instructions and variable instructions according to the classification standard of whether they contain variable parameters, and a fixed instruction library and a variable instruction library are generated. Among them, the variable parameters of the program-controlled instruction format template include frame headers, frame tails, checksums, and various program-controlled execution parameters; the variable parameter value range includes the set value range related to the satellite working conditions, and the value range corresponding to the parameter type. The details are shown in the following table: Correspondingly, the program control instruction format template can be expressed as: ZL001: Head, para1, para2, para3, check, End Head: 1000H, other para1: 55H, AAH, other para2: [1H, 5H] para3: [0000H, FFFFH] check: (Head+para1+para2+para3)&0xFFFF End: 0001H.

[0029] When establishing the program-controlled instruction output library, the program-controlled instructions are divided into fixed instructions and variable instructions, and the fixed instruction library and the variable instruction library are generated accordingly, which can be used to verify the correctness of the test results. The instruction numbers corresponding to the fixed instructions can be expressed as GK001, GK002, and the hexadecimal instruction codes are stored accordingly; the instruction numbers corresponding to the variable instructions can be expressed as KK001, KK002...., and the instruction code storage format is as follows: KK001, AAAA variable parameter 1 BBBB variable parameter 2 CCCC, where AAAA, BBBB, and CCCC are fixed parts, and the variable parameters in the instruction are named instruction number _CK1 and instruction number _CK2 in sequence.

[0030] In this way, the program control instruction output library can be expressed as: Fixed instructions: GK001: Fixed instruction 1 GK002: Fixed instruction 2 GK003: Fixed instruction 3 GK004: Fixed instruction 4 GK005: Fixed instruction 5 Variable instructions: KK001:1600,KK001_CK1 KK001_CK1=para3.

[0031] In step S2, the execution process characteristics of the satellite program control process are collected to establish a program control instruction process table; the program control instruction process table includes execution time, execution instructions, execution judgment parameters and jump logic. The execution process of satellite program control mainly includes the following contents: ‌Satellite launch and orbit entry‌: After the satellite is assembled on the ground, it is launched by rockets and other vehicles and enters the predetermined orbit. During this process, measurement, control and command of the launch site are required‌.

[0032] Orbit measurement and tracking: Once a satellite enters orbit, its orbit needs to be monitored and tracked in real time through measurement and control equipment on the ground and in space to ensure that the satellite's trajectory meets the design requirements.

[0033] ‌Attitude Control‌: Satellite attitude control refers to the real-time monitoring and control of the satellite's positioning, attitude, angular velocity and other parameters to ensure that the satellite maintains a stable attitude in orbit to meet various mission requirements‌.

[0034] Telemetry and remote control: The satellite sends various status parameters and data information to the ground through the telemetry and remote control system. The ground control center can control and adjust the satellite through remote control commands.

[0035] Mission execution and data transmission: The satellite performs corresponding tasks according to the mission requirements, such as taking images, collecting data, etc., and then transmits the data back to the ground control center for analysis and processing through designated methods.

[0036] Fault diagnosis and emergency response: When a satellite fails or experiences an abnormality, fault diagnosis must be performed and emergency measures must be taken in a timely manner to ensure the safe operation of the satellite.

[0037] ‌Long-term operation orbit‌: The satellite operates autonomously after launch and begins applying services until the end of its working life‌.

[0038] ‌Deorbit phase‌: The process of pushing a satellite away from its working orbit at the end of its life and re-entering the atmosphere to burn up.

[0039] The above program control execution process at least includes the execution instruction and its execution time, and its general format is as follows: Among them, the jump generally follows the following logic: a) Jump, which means jumping to the specified line in the program control instruction process table; b) Call, which means jumping to other program-controlled instruction processes. After the execution is completed, the subsequent lines will be executed; b) Wait, which means to wait for a specified time (in seconds) before executing the subsequent lines; c) End, indicating that the program control instruction process is ended.

[0040] In addition, during the program control execution process, execution judgment parameters will also appear, which have a logical relationship with variable parameters or set external parameters. Usually, execution judgment parameters are expressed as 1, 2, 3..., corresponding to execution condition 1, execution condition 2, execution condition 3, etc.

[0041] Based on the above program control execution process, the established program control instruction process table can be expressed as: {0, GK001, 1} {5, GK002, 2} {10,GK003,jumplogic1(para2,result1,time)} {time+15,GK004,checklogic1(para1),4} {time+20, KK001, 5} {200, GK005, end}.

[0042] In step S3, the test characteristic value is set as needed, and according to the test characteristic value, the program control instruction process table is read to generate the corresponding test program sequence. The test characteristic value here can be one of the program control execution process, program control instruction, fixed instruction, variable instruction, logical correspondence, execution judgment parameter, and jump logic. According to the set test characteristic value, the program control instruction process table is read to generate the corresponding test program sequence, which is divided into the following cases: When the test characteristic value is a program-controlled instruction process, the generated test program sequence covers abnormal values, boundary values, normal values ​​of the variable parameter value range of the program-controlled instruction, and each jump branch of the program-controlled execution process; When the test characteristic value is a fixed instruction, the generated test program sequence covers the jump branches of the program control instructions involving the fixed instruction; When the test feature value is a variable instruction, the generated test program sequence covers the jump branches involved in the variable instruction, and the boundary values ​​and normal values ​​of the variable parameters of the variable instruction; When the test characteristic values ​​are in a logical correspondence, the generated test program sequence covers the abnormal values, boundary values, and normal values ​​of the variable parameters in the program control instruction format template, and the boundary values ​​and abnormal values ​​of the variable parameters in the variable instruction library; When the test feature value is jump logic, the generated test program sequence covers the true and false branches of the jump logic.

[0043] The test program sequence includes input data and output data, and an example is given below: Set the test characteristic value to a program-controlled instruction, such as 55H, AAH or others. For the selected test characteristic value, the following test cases can be generated: Test case 1: Input: 1000 5501 0000 6501 0001 Output: {0, GK001, 1} {5, GK002, 2} {10, GK003, 3} {15, GK004, 4} {20, KK001, 5} KK001=1600 0000 Test Case 2 Input: 1000 AA01 0000 BA01 0001 Output: {0, GK001, 1} {5, GK002, 2} {10, GK003, 3} {15, NULL, 4} {20, KK001, 5} {200, GK005, end} KK001=1600 0000 Test case 3 Input: 1000 A501 0000 B501 0001 Output: {0, GK001, 1} {5, GK002, 2} {10, GK003, 3} {15, NULL, 4} {20, KK001, 5} {200, GK005, end} KK001=1600 0000 Through the satellite program control execution process test case generation method in this embodiment, a full set of test cases can be quickly generated based on the normal and abnormal ranges of all parameters and all paths, and the satellite program control instruction sequence has full test coverage; it can also quickly generate corresponding test cases for modified or targeted test parameters or paths (corresponding to test characteristic values); the generated test cases include test inputs (remote control commands, state parameters, external inputs, etc.), test results (sending commands, command sending time, etc.), and the test cases can be directly executed and the results compared. In short, this method can effectively cover all paths of the specified program control instruction sequence, and can accurately cover the paths of the program control instruction sequence related to the specified test characteristic value, thereby improving the efficiency, coverage and effectiveness of the satellite program control instruction sequence test.

[0044] Embodiment 2 Based on the same concept, this embodiment provides a device for generating test cases for a satellite program-controlled execution process. Figure 2 , the device comprises: The first data processing module is configured to collect instruction features during satellite program control, classify the instructions, and establish a program control output instruction library; The second data processing module is configured to collect execution process characteristics during satellite program control and establish a program control instruction process table, which includes execution time, execution instructions, execution judgment parameters and jump logic; The use case generation module is configured to set the test characteristic value as needed, read the program control instruction process table according to the test characteristic value, and generate the corresponding test program sequence.

[0045] The function of the device corresponds to the method in the above-mentioned embodiment 1, and its implementation method is similar, which will not be repeated here.

[0046] Embodiment 3 The above-mentioned second embodiment describes in detail the device for generating test cases for the satellite program-controlled execution process of the present invention from the perspective of modular functional entities. The following describes in detail the device for generating test cases for the satellite program-controlled execution process of the present invention from the perspective of hardware processing.

[0047] Please see Figure 3The satellite program-controlled execution process test case generation device 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 can be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the satellite program-controlled execution process test case generation device 500.

[0048] Furthermore, the processor 510 may be configured to communicate with the storage medium 530 and execute a series of instruction operations in the storage medium 530 on the satellite program-controlled execution process test case generation device 500 .

[0049] The satellite program-controlled execution process test case generation device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Vista, etc.

[0050] Those skilled in the art will understand that Figure 3 The structure of the device for generating satellite program-controlled execution process test cases shown does not constitute a limitation on the device for generating satellite program-controlled execution process test cases, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0051] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, cause the computer to execute the steps of the method for generating a satellite program-controlled execution process test case in the first embodiment.

[0052] If the module in the second embodiment is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of software. The computer software is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0053] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0054] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Even if various changes are made to the present invention, if these changes fall within the scope of the claims of the present invention and their equivalents, they still fall within the protection scope of the present invention.

Claims

1. A method for generating a test case for a satellite program-controlled execution process, characterized in that: include: Collect the command features during satellite program control, classify the commands, and establish a program control output command library; Collecting execution process characteristics during satellite program control and establishing a program control instruction process table, wherein the program control instruction process table includes execution time, execution instruction, execution judgment parameter and jump logic; The test characteristic value is set as required, and according to the test characteristic value, the program control instruction process table is read to generate a corresponding test program sequence.

2. The method for generating a satellite program control execution process test case as claimed in claim 1, characterized in that: Classifying the instructions and establishing a program-controlled output instruction library further includes: Establish a program control instruction format template to generate a unique identifier and value range for variable parameters; classify instructions according to the classification standard of whether they contain variable parameters, and divide them into fixed instructions and variable instructions, and generate a fixed instruction library and a variable instruction library.

3. The method for generating a satellite program control execution process test case as claimed in claim 2, characterized in that: According to the test characteristic value, reading the program control instruction process table and generating the corresponding test program sequence further comprises: When the test characteristic value is a program-controlled instruction process, the generated test program sequence covers abnormal values, boundary values, normal values ​​of the variable parameter value range of the program-controlled instruction, and each jump branch of the program-controlled execution process; When the test characteristic value is a fixed instruction, the generated test program sequence covers the jump branches of the program control instructions involving the fixed instruction; When the test feature value is a variable instruction, the generated test program sequence covers the jump branches involved in the variable instruction, and the boundary values ​​and normal values ​​of the variable parameters of the variable instruction; When the test characteristic values ​​are in a logical correspondence, the generated test program sequence covers the abnormal values, boundary values, and normal values ​​of the variable parameters in the program control instruction format template, and the boundary values ​​and abnormal values ​​of the variable parameters in the variable instruction library; When the test feature value is jump logic, the generated test program sequence covers the true and false branches of the jump logic.

4. The method for generating a satellite program control execution process test case as claimed in claim 2, characterized in that: When establishing a program control instruction format template, variable parameters are defined including a frame header, a frame tail, a checksum, and various program control execution parameters; and the satellite working condition-related value range and the value range corresponding to the program control execution parameter type are set as the value range of the variable parameters.

5. The method for generating a satellite program control execution process test case as claimed in claim 2, characterized in that: When establishing a program-controlled output instruction library, the fixed instructions are numbered and stored as hexadecimal instruction codes; The variable instructions are encoded and stored in the following format: Instruction number, first fixed value + first variable parameter + second fixed value + second variable parameter + third fixed value.

6. The method for generating a satellite program control execution process test case as claimed in claim 1, characterized in that: After the program-controlled instruction process table is established, the program-controlled instruction process table is read to generate a complete set of test cases covering normal values, abnormal values, boundary values ​​of all parameters, and all paths.

7. A device for generating a satellite program-controlled execution process test case, which implements the method for generating a satellite program-controlled execution process test case as claimed in claims 1 to 6, characterized in that: include: The first data processing module is configured to collect instruction features during satellite program control, classify the instructions, and establish a program control output instruction library; The second data processing module is configured to collect execution process characteristics during satellite program control and establish a program control instruction process table, wherein the program control instruction process table includes execution time, execution instruction, execution judgment parameter and jump logic; The use case generation module is configured to set the test characteristic value as needed, read the program control instruction process table according to the test characteristic value, and generate a corresponding test program sequence.

8. A device for generating test cases for satellite program-controlled execution process, characterized in that: include: A memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the satellite program-controlled execution process test case generation device to execute the satellite program-controlled execution process test case generation method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a satellite program-controlled execution process test case as described in any one of claims 1 to 6 is implemented.