Test-oriented custom interface generation method

By decomposing the test strategy by design level, filtering the minimum execution unit of sending or receiving type, and generating a custom interface, the problem of custom interface generation is solved that is not related to the test strategy, and efficient and beautiful interface automatic generation is achieved.

CN120371295APending Publication Date: 2025-07-25CHENGDU AIRCRAFT INDUSTRY GROUP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510324796.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, custom interface generation is not related to the test strategy, resulting in the missing interface content generated, affecting the setting and query of key parameters during the test process, and the manual configuration is large and the efficiency is low.

Method used

By decomposing the test strategy to the minimum execution unit at the design level, filtering units with sending or receiving types, grab key signals, building custom controls, forming priority configuration tables, and using fuzzy queries to generate a custom interface.

Benefits of technology

It realizes rapid and automatic generation of custom interfaces based on test strategies, improves generation efficiency, reduces useless controls, improves human-computer interaction effect, and avoids inefficiency and omissions of manual configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371295A_ABST
    Figure CN120371295A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automatic testing, in particular to a test-oriented custom interface generation method, which comprises the following steps of: decomposing a test strategy into minimum execution units according to a design level; the type of each minimum execution unit is inquired and determined, and only the minimum execution unit with the sending or receiving type is reserved; capturing a key signal in each remaining minimum execution unit; respectively constructing two types of self-defined controls of sending and receiving; constructing a priority configuration table; traversing the captured key signal, and querying in a priority configuration table by adopting a fuzzy query mode to obtain an available custom control set; and forming a user-defined interface. Through the generation method, the automatic generation of the user-defined interface can be quickly realized based on the existing test strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automated testing, and particularly to a method for generating a custom interface for testing. Background Art

[0002] When developing a signal-oriented test system, in addition to generating a test report through automated testing, the process variables are also monitored in real time during the test execution. The real-time monitoring of the input window control and the output process variables can effectively improve the system test efficiency. To quickly and flexibly adapt to different test strategies and meet the observation requirements for key process variables, it is necessary to custom-generate the required display interface.

[0003] Traditional custom interface generation is independent of specific test strategies. Generally, the parameters to be controlled and observed are designed in advance according to the test requirements, and then the corresponding controls are designed based on the characteristics of these parameters, and then the parameters are channel-bound to the corresponding controls. The entire process is completed manually, and there are two problems: 1) The test strategy development process is independent of the custom interface, resulting in the lack of content presented in the custom interface, which affects the setting and query of key parameters during the test process.

[0004] 2) For complex test programs, the manual configuration workload is large and the efficiency is low.

[0005] In the prior art, some interface generation methods have also been proposed. For example, the Chinese invention patent document with the publication number CN106462402A and the Chinese invention patent document with the publication number CN111966393A. However, the focuses of the above two technical solutions are different. The Chinese invention patent document with the publication number CN106462402A focuses on creating controls and editing and setting the rules and functions related to the controls. The Chinese invention patent document with the publication number CN111966393A focuses on using an XML description file to record and generate a custom interface. However, the above two technical solutions are also independent of specific test strategies. Summary of the Invention

[0006] To solve the above technical problems, the present invention proposes a method for generating a custom interface for testing, which can quickly realize the automatic generation of a custom interface based on existing test strategies.

[0007] The present invention is implemented by adopting the following technical solutions: A method for generating a custom interface for testing includes the following steps: Decompose the test strategy according to the design hierarchy to the smallest execution unit; Query and determine the type of each smallest execution unit, and only retain the smallest execution units with send or receive types; Grab the key signals in each remaining minimum execution unit; Construct custom controls of two types, namely sending and receiving, respectively; Construct a priority configuration table; Traverse the grabbed key signals and query them in the priority configuration table in the way of fuzzy query to obtain a set of available custom controls; Form a custom interface.

[0008] The test strategy includes three levels: strategy, step and action according to the design level. The action is the minimum execution unit, and the custom interface generation is implemented at the step level.

[0009] Query and determine the type of each minimum execution unit, and only retain the minimum execution units with the sending or receiving type. Specifically, it means: collect all the minimum execution units in the current step; query the value of the key attribute ActionType of each minimum execution unit under the current step, and only retain the actions whose key attribute ActionType value is sending or receiving, and discard other actions.

[0010] The method for collecting all the minimum execution units in the current step is: using the action Action as the query term, and collecting all the minimum execution units in the current step through traversal or the XPath feature quantity query method; the method for querying the value of the key attribute ActionType of each minimum execution unit under the current step is: using the key attribute ActionType as the query term, and querying the value of the key attribute ActionType of each minimum execution unit under the current step through traversal or the XPath feature quantity query method.

[0011] The key signals come from the communication interface ICD of the device under test and the dynamic model ports running in the lower computer. The attributes of the key signals include their indexes, and the complete information of the key signals can be obtained through query.

[0012] The custom controls include numeric display controls, numeric input controls, boolean input controls, boolean display controls, waveform charts, lists, enums, and decorations.

[0013] Design multiple custom controls for the same physical quantity, and design charts to represent the physical quantities whose changes need to be observed for a long time.

[0014] Specifically, constructing the priority configuration table means: using the keyword fields with physical meanings in the communication interface ICD as keywords, using these keyword field names as indexes, and sorting the constructed custom controls according to the requirements in the two types of sending and receiving to form a priority configuration table.

[0015] Before obtaining the available set of custom controls, manual adjustment can also be made to the automatically generated configuration table, corresponding relationships, and configurations according to the actual needs of users to determine the most suitable control corresponding relationships.

[0016] Forming a custom interface specifically means: combining the preset size of the custom interface area and the general user operation habits, calculating the position and size of each custom control, completing the layout of the custom controls, and forming a custom interface.

[0017] Compared with the prior art, the beneficial effects of the present invention are manifested in: 1. In the present invention, instead of querying actions for the entire test strategy, querying is performed at the step level, and before signal query, only the smallest execution units with send or receive types are retained for screening, greatly reducing the subsequent signal query workload; by extracting keywords in the test strategy and combining the existing control library, preference information table (priority configuration table), and fuzzy query method, automatic generation of a custom interface is achieved. Through the present invention, based on the existing test strategy, by parsing a descriptive test strategy document similar to XML, keywords are automatically captured according to certain rules to generate a test interface that meets the needs of users, that is, a parameter display or input control interface related to users, which can quickly realize the automatic generation of a custom interface, and the controls therein can meet the needs of testers, and can solve the problems of low efficiency and omission when the custom interface depends on manual configuration and design generation during the test process. 2. The present invention realizes the generation of a custom interface at the step level, which can effectively improve the generation efficiency of the custom interface and improve the human-computer interaction effect. If a custom interface is generated at the strategy level, the number of interface controls will be large, resulting in low generation efficiency, and the interface will be complex, making it difficult for testers to quickly find and focus on specific parameter values. If a custom interface is generated at the action level, the number of interface controls will be too small, resulting in frequent interface switching and a poor user experience.

[0018] 3. Since the ActionType types of actions are diverse, but the controls that can be used for users to observe or set are mainly send and receive types, screening based on this can greatly reduce the number of actions of concern. Without this step of screening, the number of actions of concern is large, and there are many useless parameters involved, which not only increases the operation process, but also the finally generated custom interface will have a large number of useless controls, greatly reducing the generation effect of the custom interface.

[0019] 4. Because the communication interface ICD is multi-level in design and has various forms such as reuse and reference, simply querying by naming in the test strategy will cause the loss of key signals. Therefore, the present invention finds the complete information of signals through signal indexing, rather than directly judging based on the name of the signal in the action.

[0020] 5. The present invention can achieve the automatic selection of the optimal data display form according to keywords and priorities through a configuration table to build a data observation interface, achieving beauty, unity, and efficiency. There is no need for users to spend time and effort to separately specify the type for each type of data.

[0021] 6. The present invention adopts a fuzzy query method to avoid the problem of extremely complex configuration tables caused by precise matching, and can well utilize the existing keywords in the configuration table to quickly apply the same type of controls, improving the reusability of the configuration table.

[0022] 7. When forming a custom interface, the present invention can save the trouble of manually arranging controls, and can generate a beautiful and applicable custom interface for the current test step with one key. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The present invention will be further described in detail below in conjunction with the specification drawings and specific embodiments, where: Figure 1 is a flowchart of the present invention; Figure 2 is a schematic diagram of test strategy decomposition in the present invention; Figure 3 is a schematic diagram of the priority configuration table in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] Embodiment 1 As a basic embodiment of the present invention, the present invention includes a method for generating a custom interface for testing, including the following steps: Decompose the test strategy according to the design level until the smallest execution unit.

[0025] Query and determine the type of each smallest execution unit, and only retain the smallest execution units with send or receive types.

[0026] Grab the key signals in each remaining smallest execution unit.

[0027] Construct custom controls of two types: send and receive respectively.

[0028] Construct a priority configuration table.

[0029] Traverse the grabbed key signals, and query in the priority configuration table by using a fuzzy query method to obtain a set of available custom controls.

[0030] Form a custom interface.

[0031] Embodiment 2 As a preferred embodiment of the present invention, the present invention includes a method for generating a custom interface for testing, including the following steps: Decompose the test strategy according to the design hierarchy until the smallest execution unit is reached. The test strategy includes three levels according to the design hierarchy: strategy, step, and action. The action is the smallest execution unit, and a custom interface is generated at the step level.

[0032] Query and determine the type of each smallest execution unit, and only retain the smallest execution units with send or receive types.

[0033] Capture the key signals in each of the remaining smallest execution units. The key signals come from the communication interface ICD of the device under test and the dynamic model ports running in the lower computer. The attributes of the key signals include their indexes, and the complete information of the key signals can be obtained through query.

[0034] Construct custom controls of two types: send and receive, respectively.

[0035] Construct a priority configuration table. The source of the keywords is the keyword fields with physical meanings in the communication interface ICD. Using these keyword field names as indexes, sort the constructed custom controls according to the send and receive types as required to form a priority configuration table.

[0036] Traverse the captured signals and query in the priority configuration table using fuzzy query to obtain a set of available custom controls.

[0037] Form a custom interface.

[0038] Embodiment 3 As another preferred embodiment of the present invention, the present invention includes a method for generating a custom interface for testing, including the following steps: Decompose the test strategy according to the design hierarchy until the smallest execution unit is reached. The test strategy includes three levels according to the design hierarchy: strategy, step, and action. The action is the smallest execution unit.

[0039] Query and determine the type of each smallest execution unit, and only retain the smallest execution units with send or receive types. Specifically, collect all the smallest execution units in the current step; query the value of the key attribute ActionType of each smallest execution unit under the current step, and only retain the actions whose key attribute ActionType value is send or receive, and discard other actions.

[0040] Capture the key signals in each of the remaining smallest execution units. The key signals come from the communication interface ICD of the device under test and the dynamic model ports running in the lower computer. The attributes of the key signals include their indexes, and the complete information of the key signals can be obtained through query.

[0041] Construct custom controls of two types: sending and receiving respectively. The custom controls include numeric display controls, numeric input controls, boolean input controls, boolean display controls, waveform charts, lists, enumerations, and decorations.

[0042] Construct a priority configuration table.

[0043] Traverse the captured key signals, and query in the priority configuration table by means of fuzzy query to obtain a set of available custom controls.

[0044] Form a custom interface.

[0045] Embodiment 4 As the best implementation mode of the present invention, the present invention is developed based on a signal-oriented test system. When developing a test strategy, its description is independent of specific test hardware, and its parameter sources completely come from the electrical interface of the object under test, the communication interface (for the convenience of description, the communication interface is hereinafter referred to as ICD, and the ICD of any signal is bound to a unique electrical interface), and the dynamic model parameters running in the lower computer (for a test system without a dynamic model running, the parameter sources are only the electrical interface and ICD of the object under test). Therefore, the present invention includes a method for generating a custom interface for testing, referring to the attached Figure 1 , including the following steps: Step S1. Decompose the test strategy into the smallest execution unit. Specifically, referring to the attached Figure 1 , the test strategy includes three levels: strategy, step, and action according to the design level. There can be multiple steps in the test strategy, and each step can have multiple actions. The action is the smallest execution unit (identified by Action in the XML file), and it has a key attribute ActionType, and its types are: sending, receiving, looping, conditional, jumping, popping up a window, delaying, etc.

[0046] Step S2. Query and determine the type of each smallest execution unit, whether it is sending, receiving, or others, and only retain the smallest execution units with the sending or receiving type, and discard other types.

[0047] Specifically, using the action Action as the query term, by traversing or based on the XPath feature quantity query method (a syntax of XML), collect all the smallest execution units, that is, actions, in the current step. For example, send a power-on instruction to object A and receive the status word returned by object A, etc. Query the value of the key attribute ActionType of each action Action under the current step. The specific method is to use the key attribute ActionType as the query term, and by traversing or based on the XPath feature quantity query method (a syntax of XML), only retain the actions whose key attribute ActionType value is sending or receiving, and discard other actions.

[0048] Step S3. Capture the key signals in each remaining minimum execution unit. These key signals come from the communication interface ICD of the device under test and the dynamic model ports running in the lower computer. The attributes of the key signals include their indices, which are described as PathName or Name in the action nodes of the XML file. The complete information of the key signals can be obtained through query. Whether the complete information of the key signals contains fields with specific physical meanings, such as pressure, height, position, angle, rotational speed, temperature, fault / failure / normal, etc., can be parsed through character matching regular expressions.

[0049] Step S4. Construct two types of custom controls for sending and receiving respectively, including numerical display controls, numerical input controls, boolean input controls, boolean display controls, waveform charts, lists, enumerations, decorations, etc.

[0050] Design multiple custom controls for the same physical quantity. In addition, charts can be designed to represent physical quantities whose changes need to be observed for a long time.

[0051] Step S5. Form a priority configuration table. Specifically, the source of the keywords is the keyword fields with physical meanings in the communication interface ICD. Using these keyword field names as indices, according to the two types of sending and receiving, the constructed custom controls are sorted by priority as required, referring to the attached Figure 3 , to form a priority configuration table. Among them, the custom controls use their unique IDs as identification information. For example, for the keyword of the receiving type: air pressure, its controls can be in numerical display style, pointer style, pointer + numerical display style, etc., and they are sorted by priority.

[0052] Step S6. Traverse the key signals captured in Step S3, and use the fuzzy query method to query in the priority configuration table formed in Step S5 to obtain a set of available custom controls. According to the actual needs of the user, the automatically generated configuration table, corresponding relationships, and configurations can also be manually adjusted to determine the most suitable control corresponding relationships.

[0053] Step S7. Form a custom interface. Combining the preset size of the custom interface area and the general user operation habits, calculate the position and size of each custom control, and complete the layout of the custom controls in a top-down, left-to-right manner or other ways to form a custom interface.

[0054] Furthermore, as long as the relative order of Step S5 and Step S6 remains unchanged, Step S5 can be placed in any two of the first six steps.

[0055] In summary, after reading the present invention document, various other corresponding transformation schemes that can be made by those of ordinary skill in the art without creative mental labor according to the technical solution and technical concept of the present invention all fall within the scope protected by the present invention.

Claims

1. A test-oriented custom interface generation method, characterized in that: It includes the following steps: Decompose the test strategy according to the design hierarchy until it reaches the smallest execution unit; Query and determine the type of each smallest execution unit, and only retain the smallest execution units with send or receive types; Capture the key signals in each of the remaining smallest execution units; Construct custom controls of both send and receive types respectively; Construct a priority configuration table; Traverse the captured key signals and query them in the priority configuration table using fuzzy query to obtain a set of available custom controls; Form a custom interface.

2. The method for generating a custom interface for testing according to claim 1, wherein: The test strategy includes three levels: strategy, step, and action according to the design hierarchy. The action is the smallest execution unit, and the generation of the custom interface is realized at the step level.

3. The method for generating a custom interface for testing according to claim 2, characterized in that: Query and determine the type of each smallest execution unit, and only retain the smallest execution units with send or receive types specifically refers to: collecting all the smallest execution units in the current step; querying the value of the key attribute ActionType of each smallest execution unit under the current step, and only retaining the actions with the key attribute ActionType value of send or receive, and discarding other actions.

4. A method for generating a test-oriented custom interface according to claim 3, characterized in that: The method of collecting all the smallest execution units in the current step is: using the action Action as the query term, and collecting all the smallest execution units in the current step through traversal or query method based on XPath feature quantities; the method of querying the value of the key attribute ActionType of each smallest execution unit under the current step is: using the key attribute ActionType as the query term, and querying the value of the key attribute ActionType of each smallest execution unit under the current step through traversal or query method based on XPath feature quantities.

5. A test-oriented custom interface generation method according to claim 2 or 4, characterized in that: The key signals come from the communication interface ICD of the object under test and the dynamic model ports running in the lower computer. The attributes of the key signals include their indexes, and the complete information of the key signals can be obtained through query.

6. A test-oriented custom interface generation method according to claim 2 or 4, characterized in that: The custom controls include numeric display controls, numeric input controls, boolean input controls, boolean display controls, waveform charts, lists, enums, and decorations.

7. A method for generating a custom interface for testing according to claim 6, characterized in that: Design multiple custom controls for the same physical quantity and design charts to represent physical quantities that need to be observed for long-term changes.

8. A method for generating a custom interface for testing according to claim 5, characterized in that: Constructing the priority configuration table specifically refers to: using the keyword fields with physical meanings in the communication interface ICD as keywords, using these keyword field names as indexes, and sorting the constructed custom controls according to the requirements in the order of send and receive types to form a priority configuration table.

9. A test-oriented custom interface generation method according to claim 2 or 4, characterized in that: Before obtaining the set of available custom controls, the automatically generated configuration table, corresponding relationships, and configurations can also be manually adjusted according to the actual needs of the user to determine the most suitable control corresponding relationships.

10. A method for generating a custom interface for testing according to claim 2 or 4, characterized in that: Forming the custom interface specifically refers to: combining the preset size of the custom interface area and the general user operation habits, calculating the position and size of each custom control, completing the layout of the custom controls, and forming a custom interface.

Citation Information

Patent Citations

  • Generating and implementing a customizable user interface

    CN106462402A

  • Configurable interface custom generation method and system

    CN111966393A