System-level test strategy generation method and system based on finished product test strategy
Through the system-level test strategy generation method based on the finished product test strategy, the problem of low efficiency in system-level test strategy editing is solved, and the system-level test program is quickly generated to ensure the comprehensiveness of the test and the convenience of complex system integration.
Patent Information
- Application Number
- CN202510664836.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-09-19
AI Technical Summary
The existing technology is inefficient and incomplete in editing system-level test strategies, making it difficult to effectively reuse finished product-level/component-level test strategies for system integration testing.
Through the system-level test strategy generation method based on the finished product test strategy, including model import, test strategy import, mapping relationship establishment, finished product set screening and test strategy division, the ICD is used to assign ID for rapid screening and rewriting of strategies to generate a system-level test program.
It realizes the rapid generation of system-level test programs, improves the efficiency of test strategy editing, ensures the comprehensiveness of testing, avoids communication failures caused by virtual signal replacement in traditional methods, and provides convenience for complex system integration testing.
Smart Images

Figure CN120670295A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automated testing, and in particular relates to a method and system for generating a system-level test strategy based on a finished product test strategy. Background Art
[0002] The quality of the test strategy directly affects the test effect of the tested product. Generally speaking, the more comprehensive the test, the better the test effect of the tested product. However, the more comprehensive the test, the more complex the editing of its test strategy and the greater the workload. In order to improve the efficiency of test strategy development and editing, reuse is an effective solution. At present, research in this technical field mainly focuses on test objects of the same level, divides them according to their functions, and then combines them to reuse test strategies. For example, Zhang Wei, Liao Tao, etc. sorted out common test operations and encoded them into test sub-items. Multiple test sub-items can construct a set of test programs. Selecting different test programs can form different test items (Application of Software Product Line in Electronic Countermeasure Automatic Test System, Computer Applications and Software, 2022, 39(09): 145-151). Existing patent 202310299428.X discloses a modular test case generation method and generation device for spacecraft software. It also proposes to use the commonality analysis method to obtain relatively independent test cases, thereby realizing the combined reuse of test programs. This solution is based on common test requirements analysis to ensure that all components to be tested have the identified common test requirements, and then code is developed based on the common test requirements.
[0003] The aforementioned test strategy reuse is applied to known products of the same type and belongs to finished product-level / component-level test reuse. When multiple finished products / components together form a system, system integration units fully utilizing finished product-level / component-level test procedures is an effective way to achieve fast and effective integrated testing. However, the industry's technical solutions to current needs are still immature. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and system for generating a system-level test strategy based on a finished product test strategy, aiming to solve the problems of low editing efficiency and incomplete testing of system-level test strategies.
[0005] The present invention is mainly achieved through the following technical solutions: A method for generating a system-level test strategy based on a finished product test strategy comprises the following steps: Step S1: Import the finished model and the corresponding signal-oriented test strategy into the test platform; Step S11: obtaining an electrical-ICD relationship based on the finished product model; Step S12: The test strategy is bound to the finished product modeling information. Each test action of the test strategy is bound to the finished product through the ICD to obtain a test action-ICD relationship. Step S13: According to the electrical-ICD relationship and the test action-ICD relationship, a mapping relationship between the electrical interface and the test strategy is obtained as the test action-electrical relationship; Step S2: forming a product set A based on model selection, and forming a product-level test strategy set T based on strategy selection; Step S3: Screen the finished products associated with the system under test. Based on the source and sink information in the electrical interface of the finished product model, screen all the source and sink end names that are not the names of the finished products of the current product to form a set B, where set B = set B1 + set B2. Among them: the elements in set B1 all exist in set A; the elements in set B2 do not exist in set A, and set B2 is the equipment outside the scope of the current system-level test; Step S4: Divide the finished product test strategy set T into set C1 and set C2 according to set B1 and set B2, and set T = set C1 + set C2; Wherein: Set C1 is the test strategy for replacing the virtual signals in the finished product level test with the real signals of other finished products in the system during the system integration test; Set C2 is the test strategy that needs to be maintained during integration testing; Step S5: System-level test strategy conversion processing.
[0006] In order to better implement the present invention, further, in step S1, the finished product model includes all external connectors and electrical interface definitions, as well as communication interface definitions bound to the electrical interfaces.
[0007] In order to better implement the present invention, further, the electrical interface definition includes: connector model, pin definition, source and sink.
[0008] In order to better implement the present invention, further, in step S1, the ICD includes two types: bus type and non-bus type, and the bus type ICD includes three levels: bus type, block / frame and signal / bit field, and assigns IDs to blocks / frames and signals / bit fields; the non-bus type ICD directly assigns IDs to signal types.
[0009] In order to better implement the present invention, further, in the step S4, in the finished product level test strategy set T, the finished product information of the electrical interface corresponding to each test strategy is retrieved. If all the finished product information exists in the set B1, the test strategy is included in the set C1. If at least one item of the finished product information exists in the set B2, the test strategy is included in the set C2.
[0010] In order to better implement the present invention, further, in the step S5, it is determined whether the test strategy in the set C1 is directly discarded or rewritten. If the test strategy describes that the corresponding finished product can be implemented without configuration, the test strategy is directly discarded; if the test strategy describes that parameter configuration is required, the test strategy needs to be analyzed and rewritten.
[0011] In order to better implement the present invention, further, in step S5, the principle of rewriting the test strategy is: treating the original test strategy as the output of the corresponding finished product in set B1 and matching the corresponding input settings.
[0012] In order to better implement the present invention, further, in step S5, determining whether the test strategies in set C1 are to be directly discarded or rewritten includes the following steps: Step S51: If the test strategy in set C1 is send, retain the test strategy; if the test strategy in set C1 is accept, proceed to step S52; Step S52: If the keyword of the test strategy exists in the keyword table, the test strategy is discarded; otherwise, the process goes to step S53; Step S53: Perform manual judgment. If the manual judgment is to abandon the test strategy, create a keyword for this type of test strategy and update the keyword table.
[0013] In order to better implement the present invention, further, it is applied to test the servo actuator system, including the following steps: Step T1: The servo actuator system includes two finished products, a controller and a servo, so the set A = {controller, servo}, and the finished product level test strategy set T = {controller status test, servo interface test, servo performance test}; Step T2: Query the source and sink information of the finished product electrical interface in set A to obtain set B = {controller, servo, flight control computer}, where set B1 = {controller, servo} and set B2 = {flight control computer}; Step T3: Divide the finished product test strategy set T according to set B1 and set B2, and obtain set C1 = {servo interface test, servo performance test 1}, and set C2 = {controller status test, servo performance test 2}; Step T4: For the servo interface tests in set C1, the periodic communication tests in the finished product tests do not require special configuration during system-level testing, so these tests are discarded. For finished product testing, the angle setting strategies need to be inversely transformed according to the ICD to convert them into instructions from the flight control computer to the servo controller. For the servo performance test 1 in set C1, it is necessary to send and receive servo deflection angle information. The test strategy conversion logic is consistent with the servo interface test.
[0014] The present invention is mainly achieved through the following technical solutions: A system-level test strategy generation system based on finished product test strategy is based on the above method and includes a model import module, a test strategy import module, a model selection module, a measurement selection module, a tested system associated finished product screening module, a mapping relationship module, a test strategy division module and a system-level test strategy conversion processing module; The model import module is used to import the finished product model into the test platform; The test strategy import module is used to import the corresponding signal development-oriented test strategy into the test platform; The model selection module is used to obtain a finished product set A according to the system composition; The measurement selection module is used to obtain a set of finished product level test strategies T; The tested system is associated with a finished product screening module for obtaining set B1 and set B2; The mapping relationship module is used to obtain the test action-electrical relationship; The test strategy division module is used to divide the finished product level test strategy set T into a set C1 and a set C2; The system-level test strategy conversion processing module is used to convert the test strategies in the set C1.
[0015] The beneficial effects of the present invention are as follows: (1) The present invention can directly generate a system-level test program through rapid configuration, and test designers can then perfect and form the final test program based on this. The present invention solves the problem of the lack of a solution for generating a system-level test strategy from a finished product-level test strategy. The present invention can comprehensively and quickly utilize existing finished product-level test strategies to form a system-level test strategy, providing convenience for complex system integration testing.
[0016] (2) Traditional strategy query is directly based on the ID of the object under test. The problem with this method is that for the same finished product under test, the state changes and the ICD changes, but its own ID remains unchanged. This will result in a large number of similar strategies when performing test strategy query, requiring users to manually screen, which is time-consuming and prone to errors. However, the present invention proposes a method of querying by assigning an ID to the ICD. There are two types of ICDs, one is bus type and the other is non-bus type. The bus type ICD is divided into three levels, including bus type (such as RS422, GJ set B289 set A, etc.), block / frame, and signal / bit field. In order to facilitate the search, it is necessary to assign an ID to the block / frame and signal / bit field. The non-bus type ICD can directly assign an ID to the signal type. The above method can achieve rapid screening of massive finished product-level test strategies and obtain the electrical port of the finished product-level under test object corresponding to each test strategy.
[0017] (3) When integrating test strategies, traditional thinking generally discards strategies that can replace virtual signals with other finished product real signals, which is prone to communication failures in practice. The present invention discovered this problem in practice and proposed a rewriting strategy screening method for virtual signal replacement, that is, screening and rewriting the strategies that need to be configured, which effectively solves the above-mentioned defects and has good practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a principle block diagram of the present invention; Figure 2 Flowchart for the system-level test strategy conversion process. DETAILED DESCRIPTION
[0019] Example 1: A method for generating a system-level test strategy based on a finished product test strategy is described. This method is based on a comprehensive finished product test strategy, and its test strategy development is signal-oriented, rather than instrument-oriented. Instrument-oriented test strategies require specific instrument operations, which imposes significant limitations on reuse within system integration units. This makes system integration testing extremely difficult when a large number of finished products are involved.
[0020] like Figure 1 As shown, it mainly includes the following steps: Step 1: Import the complete product / component model into the general test platform and import the corresponding signal-oriented test strategy.
[0021] Specifically, the finished model primarily includes all external connector and electrical interface definitions, as well as the communication interface definition (Interface Control File ICD) bound to the electrical interface. For convenience, this will be referred to as the "electrical-ICD relationship." The electrical interface definition must include at least the connector model, pin definition, source, and sink.
[0022] Specifically, the test strategy is a collection of test actions. The signal-oriented test strategy is bound to the product modeling information, meaning each test action is closely related to the product. Specifically, they are bound together through the ICD, which will be referred to as the test action-ICD relationship for convenience.
[0023] Based on the electrical-ICD relationship and the test action-ICD relationship, we can obtain the mapping relationship between the electrical interface and the test strategy, that is, through which physical channel each test strategy interacts with the current finished product, thereby obtaining the mapping relationship: test action-electrical.
[0024] ICDs fall into two categories: bus-type and non-bus-type. Bus-type ICDs are organized into three levels: bus type (such as RS422, GJB289A, etc.), block / frame, and signal / bit field. To facilitate search, IDs are assigned to the block / frame and signal / bit field. Non-bus-type ICDs simply assign IDs to the signal type. This method enables rapid screening of a large number of finished product test strategies and identifies the electrical port of the finished product under test corresponding to each test strategy.
[0025] Step 2: Select finished products according to the system composition (finished product model) to form a set A and a set T of finished product-level test strategies.
[0026] Step 3: Based on the source and sink information in the electrical interface of the finished product model, screen all source and sink end names that are not the names of the finished product of the current product to form Set B. Set B = Set B1 + Set B2. If the elements in Set B1 are in Set A, and the elements in Set B2 are not in Set A, then Set B2 contains devices outside the scope of the current system-level test.
[0027] Step 4: Following the division method for Sets B1 and B2, and based on the test action-electrical relationship formed in Step 1, divide the current finished product test strategy into two categories, Sets C1 and C2. Set T = Set C1 + Set C2. Set C1 represents the test strategy for system integration testing, where real signals from other finished products in the system replace the virtual signals used during finished product testing. Set C2 represents the test strategy that must be maintained during integration testing.
[0028] Regarding the division method of set C1 and set C2, retrieve the finished product information described in the electrical interface corresponding to each test strategy. If all of them are in set B1, then include the test strategy in set C1. If at least one item is in set B2, then include the test strategy in set C2.
[0029] Step 5: Test strategy conversion processing. The test strategies in set C1 cannot be directly discarded during integration testing and need to be considered case by case.
[0030] Analyze the test strategies in set C1. If the test strategy describes something that can be implemented by the corresponding finished product without configuration, then this test strategy can be discarded. If the test strategy describes something that requires special parameter configuration, then it needs to be analyzed and rewritten. The rewriting principle is to treat the original test strategy as the output of the corresponding finished product in set B1 and match the corresponding input settings.
[0031] It is technically difficult to determine which test strategies in set C1 need to be rewritten. We have proposed specific methods, such as Figure 2 As shown, the following steps are included: Step 5.1: Determine whether the policy is sent or accepted. If it is sent, the test policy is retained and the next one is determined. If it is accepted, proceed to step 5.2.
[0032] Step 5.2: Determine based on the keyword table. If the keyword for the test strategy is in the table, discard the test strategy. If no determination is made, proceed to step 5.3. Common troubleshooting keywords include "power-on cycle status transmission" and "periodic second pulse".
[0033] Step 5.3: Manual judgment: if it is discarded, create a keyword for this type of strategy and update the keyword table; if it is retained, judge the next test strategy.
[0034] The test strategy set finally formed in this way is the test strategy required for system integration testing, which is the basis for subsequent optimization and supplementation.
[0035] Example 2: A system-level test strategy generation method based on finished product test strategy, where the system under test is a servo actuator system, which includes two finished products: a controller and a servo. That is, the set A = {controller, servo}, and the strategy set T = {controller status test, servo interface test, servo performance test} Query the source and sink information of the finished product electrical interface in set A to obtain set B = {controller, servo, flight control computer}, where set B1 = {controller, servo} and set B2 = {flight control computer}.
[0036] The finished product test strategy set T is divided into sets B1 and B2. During finished product testing, the servo interface test and some performance tests require the test equipment to simulate the controller and connect the servo. Therefore, the set C1 = {Servo interface test, Servo performance test 1}. The controller status test requires the test equipment to simulate the flight control computer, and the flight control computer still requires test equipment simulation during system-level testing. Another part of the servo performance test requires the use of a servo loading platform. The strategies related to the servo loading platform are still retained during system-level testing. Therefore, the set C2 = {Controller status test, Servos performance test 2} For the servo interface tests in set C1, the periodic communication types in the finished product-level tests, such as state transfer tests, do not require special configuration during system-level testing, so these tests are directly discarded. For the strategies related to angle setting during finished product-level testing, they need to be inversely transformed according to ICD and converted into instructions from the flight control computer to the servo controller.
[0037] For the servo performance test 1 in set C1, it is necessary to send and receive servo deflection angle information. The test strategy conversion logic is consistent with the servo interface test.
[0038] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the scope of protection of the present invention.
Claims
1. A method for generating a system-level test strategy based on a finished product test strategy, characterized in that: The following steps are involved: Step S1: Import the finished model and the corresponding signal-oriented test strategy into the test platform; Step S11: obtaining an electrical-ICD relationship based on the finished product model; Step S12: The test strategy is bound to the finished product modeling information. Each test action of the test strategy is bound to the finished product through the ICD to obtain a test action-ICD relationship. Step S13: According to the electrical-ICD relationship and the test action-ICD relationship, a mapping relationship between the electrical interface and the test strategy is obtained as the test action-electrical relationship; Step S2: forming a product set A based on model selection, and forming a product-level test strategy set T based on strategy selection; Step S3: Screen the finished products associated with the system under test. Based on the source and sink information in the electrical interface of the finished product model, screen all the source and sink end names that are not the names of the finished products of the current product to form a set B, where set B = set B1 + set B2. Among them: the elements in set B1 all exist in set A; the elements in set B2 do not exist in set A, and set B2 is the equipment outside the scope of the current system-level test; Step S4: Divide the finished product test strategy set T into set C1 and set C2 according to set B1 and set B2, and set T = set C1 + set C2; Wherein: Set C1 is the test strategy for replacing the virtual signals in the finished product level test with the real signals of other finished products in the system during the system integration test; Set C2 is the test strategy that needs to be maintained during integration testing; Step S5: System-level test strategy conversion processing.
2. The method for generating a system-level test strategy based on a finished product test strategy according to claim 1, characterized in that: In step S1, the finished product model includes all external connectors and electrical interface definitions, as well as communication interface definitions bound to the electrical interfaces.
3. The method for generating a system-level test strategy based on a finished product test strategy according to claim 2, wherein: The electrical interface definition includes: connector model, pin definition, source and sink.
4. A method for generating a system-level test strategy based on a finished product test strategy according to any one of claims 1 to 3, characterized in that: In step S1, ICD includes two types: bus type and non-bus type. The bus type ICD includes three levels: bus type, block / frame and signal / bit field, and assigns IDs to blocks / frames and signals / bit fields; the non-bus type ICD directly assigns IDs to signal types.
5. The method for generating a system-level test strategy based on a finished product test strategy according to claim 1, characterized in that: In step S4, in the finished product level test strategy set T, the finished product information of the electrical interface corresponding to each test strategy is retrieved. If all the finished product information exists in set B1, the test strategy is included in set C1. If at least one item of the finished product information exists in set B2, the test strategy is included in set C2.
6. A method for generating a system-level test strategy based on a finished product test strategy according to claim 1 or 5, characterized in that: In step S5, it is determined whether the test strategy in set C1 should be directly discarded or rewritten. If the test strategy describes that the corresponding finished product can be implemented without configuration, the test strategy is directly discarded; if the test strategy describes that parameter configuration is required, the test strategy needs to be analyzed and rewritten.
7. The method for generating a system-level test strategy based on a finished product test strategy according to claim 6, characterized in that: In step S5, the principle of rewriting the test strategy is to treat the original test strategy as the output of the corresponding finished product in set B1 and match the corresponding input settings.
8. The method for generating a system-level test strategy based on a finished product test strategy according to claim 6, characterized in that: In step S5, determining whether the test strategies in set C1 are to be directly discarded or rewritten includes the following steps: Step S51: If the test strategy in set C1 is send, retain the test strategy; if the test strategy in set C1 is accept, proceed to step S52; Step S52: If the keyword of the test strategy exists in the keyword table, the test strategy is discarded; otherwise, the process goes to step S53; Step S53: Perform manual judgment. If the manual judgment is to abandon the test strategy, create a keyword for this type of test strategy and update the keyword table.
9. The method for generating a system-level test strategy based on a finished product test strategy according to claim 1, wherein: Applied to testing servo actuator systems, including the following steps: Step T1: The servo actuator system includes two finished products, a controller and a servo, so the set A = {controller, servo}, and the finished product level test strategy set T = {controller status test, servo interface test, servo performance test}; Step T2: Query the source and sink information of the finished product electrical interface in set A to obtain set B = {controller, servo, flight control computer}, where set B1 = {controller, servo} and set B2 = {flight control computer}; Step T3: Divide the finished product test strategy set T according to set B1 and set B2, and obtain set C1 = {servo interface test, servo performance test 1}, and set C2 = {controller status test, servo performance test 2}; Step T4: For the servo interface tests in set C1, the periodic communication tests in the finished product tests do not require special configuration during system-level testing, so these tests are discarded. For finished product testing, the angle setting strategies need to be inversely transformed according to the ICD to convert them into instructions from the flight control computer to the servo controller. For the servo performance test 1 in set C1, it is necessary to send and receive servo deflection angle information. The test strategy conversion logic is consistent with the servo interface test.
10. A system-level test strategy generation system based on a finished product test strategy, based on the method according to any one of claims 1 to 9, characterized in that: It includes model import module, test strategy import module, model selection module, measurement selection module, tested system associated finished product screening module, mapping relationship module, test strategy division module and system-level test strategy conversion processing module; The model import module is used to import the finished product model into the test platform; The test strategy import module is used to import the corresponding signal development-oriented test strategy into the test platform; The model selection module is used to obtain a finished product set A according to the system composition; The measurement selection module is used to obtain a set of finished product level test strategies T; The tested system is associated with a finished product screening module for obtaining set B1 and set B2; The mapping relationship module is used to obtain the test action-electrical relationship; The test strategy division module is used to divide the finished product level test strategy set T into a set C1 and a set C2; The system-level test strategy conversion processing module is used to convert the test strategies in the set C1.
Citation Information
Patent Citations
Modularization-based test case generation method and device for spacecraft software
CN116450503A