A method and system for mapping user test items of a conformance test to execution units
Patent Information
- Application Number
- CN202611175325.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-30
AI Technical Summary
[0006]本发明提供了一种符合性测试的用户测试项与执行单元映射方法及系统,拟解决现有符合性测试中用户测试项与执行单元一一对应导致的代码冗余重复、映射关系刚性固化、依赖关系需硬编码维护的技术问题
1.本发明通过用户测试项与执行单元的多对多映射机制,同一执行单元可被多个用户测试项共享复用,基础测试逻辑仅需编写与维护一份代码,即可支持多个测试场景;当基础测试逻辑的验证规则更新时,仅需修改对应执行单元一处即可全局生效,有效降低了代码冗余量与迭代维护成本。
Smart Images

Figure CN123011709A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of software compliance testing technology, and more specifically, relates to a method and system for mapping user test items to execution units in compliance testing. Background Technology
[0002] In the field of software compliance testing, a typical test software architecture consists of two parts: a human-computer interaction interface and a test case library. Users select compliance test items to be executed (hereinafter referred to as user test items) through the human-computer interaction interface, and the test software calls the execution units in the test library to complete the specific test operations. The execution unit is a code module that actually executes the test logic. Each execution unit is responsible for verifying the compliance of the tested object at a specific specification point or standard point. The mapping mechanism between user test items and execution units is the core link that determines the reusability, flexibility and maintenance cost of compliance test software.
[0003] In existing compliance testing software, a one-to-one mapping relationship is generally used between user test items and execution units, meaning that each user test item corresponds to a specific execution unit in the system; its typical execution flow is as follows: After the user selects several test items on the interface, the system calls the execution unit corresponding to each test item. Each execution unit independently completes the test and returns the result. For example, Chinese invention patent CN117336197A discloses a software radio standard compliance testing method based on atomic granularity. It breaks down test items into the smallest testable units at the atomic granularity level, forming independent test code programs, and then associates the atomic granularity test programs with the upper-level test software interface for execution. However, this technical solution has the following unavoidable technical defects: First, due to the one-to-one mapping pattern, when multiple user test items involve the same or similar pre-operations, each corresponding execution unit must contain a complete logical chain, and the same basic test logic is repeatedly implemented in multiple execution units. For example, if user test item A is "create component", B is "start component", and C is "delete component", then in the existing solution, execution unit a must contain the complete logic of "create → check →...", execution unit b must also contain the complete logic of "create → start → check →...", and execution unit c also contains the complete logic of "create → ... → delete →...". The "create" operation appears repeatedly in the three execution units a, b, and c, resulting in serious code redundancy and high maintenance costs.
[0004] Secondly, in the one-to-one correspondence mode, each execution unit is a self-contained structure with a complete dependency execution chain internally. When the user selects multiple test items, different execution units will repeatedly execute the same pre-operation (such as the "create" operation described above), and cannot share the execution results of the pre-operation. The combination method of test items is locked by the internal implementation of the execution unit, and the system does not have the ability to flexibly and sufficiently decompose the test logic.
[0005] In addition, existing technical solutions lack explicit dependency declaration mechanisms, and the pre- and post-dependencies between test units are hard-coded inside the execution units. When the verification rules of a certain basic test logic change, all execution units that embed this logic need to be checked and modified one by one, making it impossible to achieve global effect from a single change. As the number of test items increases, the maintenance cost increases linearly, and it is easy to cause inconsistent test results for different test items due to omissions in modification. Summary of the Invention
[0006] This invention provides a method and system for mapping user test items to execution units in compliance testing, aiming to solve the technical problems of code redundancy and duplication, rigid mapping relationship, and hard-coded maintenance of dependency relationship caused by the one-to-one correspondence between user test items and execution units in existing compliance testing.
[0007] On one hand, the present invention provides a method for mapping user test items to execution units in compliance testing, comprising the following steps: S1. Obtain at least one user test item selected by the user: Each user test item includes a name attribute, an indirect instruction attribute, and a direct instruction attribute. The indirect instruction attribute is used to identify the compliance test specification point corresponding to the user test item, and the direct instruction attribute is used to specify the name of the execution unit to be invoked. S2. For each user test item, perform dual-channel mapping matching based on a preset set of execution units to obtain the execution unit corresponding to the user test item; the dual-channel mapping matching includes indirect mapping matching and direct mapping matching; Each execution unit includes a name attribute, an association attribute, a dependency attribute, and a type attribute; the association attribute is used to identify the compliance test specification point corresponding to the execution unit, the dependency attribute is used to declare the preceding execution units required for the execution of the execution unit, and the type attribute is used to identify the execution rule category of the execution unit; The indirect mapping matching involves matching the indirect instruction attribute of a user test item with the association attribute of an execution unit. If the indirect instruction attribute of a user test item and the association attribute of an execution unit point to a unified compliance test specification point, then an indirect mapping relationship is established between the user test item and the execution unit. The direct mapping matching involves matching the direct instruction attribute of a user test item with the name attribute of an execution unit. If the direct instruction attribute of a user test item and the name attribute of an execution unit are consistent, then a direct mapping relationship is established between the user test item and the execution unit. S3. Summarize all execution units that have established mapping relationships with user test items, combine the type attributes and dependency attributes of each execution unit, generate an execution plan and determine the execution order of each execution unit; S4. Schedule each execution unit to perform test operations in sequence according to the execution plan to complete the compliance test.
[0008] Preferably, the dual-channel mapping matching includes the following steps: First, perform direct mapping matching on the user test items to establish a direct mapping relationship between the user test items and the execution unit; Then, for user test items with empty direct instruction attributes, or scenarios where more related execution units need to be matched after the direct mapping is completed, indirect mapping matching is performed to establish the indirect mapping relationship between user test items and execution units. By overlaying and integrating all execution units corresponding to direct and indirect mappings, eliminating duplicate matching of the same execution unit, and summarizing them to form a unique set of execution units corresponding to the current user test item, the dual-channel mapping matching is completed.
[0009] Preferably, the type attributes of the execution unit include three categories: mandatory items, optional items, and dependencies; The mandatory item is an execution unit that must be included in the execution plan and executed regardless of whether the user selects the corresponding test item; The options for whether to include it in the execution plan and participate in the test execution depend entirely on whether the user selects the execution unit for the corresponding user test item. The dependencies are execution units that serve as prerequisites for the execution of other execution units, must be executed first, and provide the execution premise for the execution units they depend on.
[0010] Preferably, generating the execution plan includes the following steps: Include all execution units of type mandatory in the execution plan; All execution units that have established a mapping relationship with user test items and are of the optional type are included in the execution plan; Iterate through all execution units that have been included in the execution plan, and add execution units with the corresponding dependency types to the execution plan based on the dependency attributes of each execution unit; The execution order is determined based on the dependency attributes of each execution unit. The execution unit that is depended on is executed later than its corresponding dependency, thus generating the final execution plan.
[0011] Preferably, the process of generating the execution plan further includes a step of deduplicating execution units: When the same execution unit is mapped and matched by multiple user test items, or is included in the execution plan multiple times as a mandatory item, optional item, and dependency item, the execution unit is retained only once in the execution plan.
[0012] Preferably, the attribute information of the user test items and the attribute information of all execution units are stored and configured through an Extensible Markup Language (XML) file; the mapping matching and execution plan generation processes obtain the corresponding attribute information by reading the XML file.
[0013] Preferably, the compliance test is a software communication architecture compliance test or a software radio test framework standard compliance test.
[0014] On the other hand, the present invention provides a user test item and execution unit mapping system for compliance testing, including a human-computer interaction interface, a compliance test case library, and a CRT factory; the CRT factory includes an analysis unit and several independently executed execution units; The human-computer interaction interface is used to provide a test operation environment, allowing the user to select user test items and outputting at least one user test item selected by the user; each user test item includes a name attribute, an indirect instruction attribute, and a direct instruction attribute, wherein the indirect instruction attribute is used to identify the compliance test specification point corresponding to the user test item, and the direct instruction attribute is used to specify the name of the execution unit to be invoked; The compliance test case library is used to store compliance test cases and provide test case support for test execution; The analysis unit is used to receive the user test items, perform dual-channel mapping matching on each user test item based on the preset set of execution units, and establish a mapping relationship between the user test items and the corresponding execution units; then, it summarizes all execution units that have established mapping relationships with user test items, generates an execution plan and determines the execution order by combining the type attributes and dependency attributes of each execution unit, and outputs the execution instructions. Each execution unit includes a name attribute, an association attribute, a dependency attribute, and a type attribute; the association attribute is used to identify the compliance test specification point corresponding to the execution unit, the dependency attribute is used to declare the preceding execution units required for the execution of the execution unit, and the type attribute is used to identify the execution rule category of the execution unit; The dual-channel mapping matching includes indirect mapping matching and direct mapping matching. Indirect mapping matching involves matching the indirect instruction attribute of a user test item with the association attribute of an execution unit. If the indirect instruction attribute of the user test item and the association attribute of the execution unit point to a unified compliance test specification point, then an indirect mapping relationship is established between the user test item and the execution unit. Direct mapping matching involves matching the direct instruction attribute of a user test item with the name attribute of an execution unit. If the direct instruction attribute of the user test item matches the name attribute of the execution unit, then a direct mapping relationship is established between the user test item and the execution unit. The execution unit is used to receive the execution instructions, sequentially call the test cases in the compliance test case library to perform test operations according to the execution plan, and feed back the execution results to the analysis unit in real time. The analysis unit summarizes all execution results and generates test results.
[0015] Preferably, the analysis unit includes a mapping matching module, which is used to perform the following operations: First, perform direct mapping matching on the user test items to establish a direct mapping relationship between the user test items and the execution unit; Then, for user test items with empty direct instruction attributes, or scenarios where more related execution units need to be matched after the direct mapping is completed, indirect mapping matching is performed to establish the indirect mapping relationship between user test items and execution units. By superimposing and integrating all execution units corresponding to direct and indirect mappings, eliminating duplicate matching of the same execution unit, and summarizing them to form a unique set of execution units corresponding to the current user test item, the dual-channel mapping matching is completed.
[0016] Preferably, the analysis unit includes an execution scheduling module, which is used to perform the following operations: Include all execution units of type mandatory in the execution plan; All execution units that have established a mapping relationship with user test items and are of the optional type are included in the execution plan; Iterate through all execution units that have been included in the execution plan, and add execution units of the corresponding dependency type to the execution plan based on the dependency attributes of the execution unit; The execution order is determined based on the dependency attributes of each execution unit, with the dependent execution unit being executed later than its corresponding dependency. Deduplication is performed on the execution units in the execution plan, and each execution unit is retained only once. Generate the final execution plan and output the execution instructions.
[0017] The beneficial effects of this invention include: 1. This invention uses a many-to-many mapping mechanism between user test items and execution units, allowing the same execution unit to be shared and reused by multiple user test items. The basic test logic only needs to be written and maintained once to support multiple test scenarios. When the verification rules of the basic test logic are updated, only one modification to the corresponding execution unit is needed for global effect, effectively reducing code redundancy and iterative maintenance costs.
[0018] 2. A dual-channel association mechanism of indirect and direct instructions is adopted. Indirect instructions can achieve semantic-level batch association matching based on canonical points / standard points, while direct instructions can achieve precise specification of a single execution unit. The mapping relationship is managed externally through extensible markup language files, and the test plan can be adjusted without modifying the program code, which can flexibly adapt to different test requirements.
[0019] 3. Execution units are divided into three types: mandatory, optional, and dependent. The dependencies between execution units are explicitly declared through the dependency attribute. The system can automatically schedule the execution order according to the type and dependency attributes of the execution units, eliminating the need for developers to hardcode the execution logic in the code and improving the standardization and maintainability of dependency management.
[0020] 4. By using the automatic scheduling of dependencies and the deduplication and merging mechanism of execution units, the same execution unit can be avoided from being executed repeatedly, effectively shortening the overall test time. At the same time, when adding new test items, verified mature execution units can be reused directly without the need to redevelop test logic. This not only improves the development efficiency of test plans, but also ensures the consistency of test results and the stability of system operation. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 The overall system architecture diagram provided for embodiments of the present invention; Figure 2 This is a schematic diagram of the test process provided in an embodiment of the present invention.
[0023] Figure 3This is a schematic diagram illustrating the mapping relationship between user test items and execution units provided in an embodiment of the present invention.
[0024] Figure 4 This is a schematic diagram of the mapping mechanism provided in an embodiment of the present invention. Detailed Implementation
[0025] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0026] Example 1 See Figure 2 As shown, this embodiment provides a method for mapping user test items to execution units in compliance testing, including the following steps: S1. The user selects the test items to be executed through the human-computer interaction interface. The system collects all the user test items selected by the user to form a test item set, which serves as the input for subsequent mapping and matching. In this embodiment, the user test items are the specific compliance test items selected by the user through the human-computer interaction interface. Each of the user test items includes three attributes, which are stored in an Extensible Markup Language (XML) configuration file and can be edited and adjusted independently without modifying the program source code. Specifically, the three attributes include a name attribute, an indirect attribute, and a direct attribute. The name attribute is a unique identifier for user test items, which is not repeated within the same system, and is used for interface display and internal logic identification. The indirect instruction attribute is used to identify the compliance test specification point corresponding to the user test item. In this embodiment, it corresponds to the specification point number (such as SCA1, SCA2) in the Software Communication Architecture 4.1 (SCA4.1) specification, which is the core field for realizing semantic-level matching. The direct instruction attribute is used to directly specify the name of the unit to be invoked. The direct instruction attribute can be empty, which is used to achieve precise targeted matching. By decoupling user-visible business-level test items from the underlying execution logic units, users only need to focus on the test requirements themselves and do not need to be aware of the division method of the underlying execution units; at the same time, the dual-attribute design provides a data foundation for the subsequent dual-channel mapping mechanism.
[0027] S2. See also Figure 3 and Figure 4As shown, the system pre-maintains a complete set of execution units, and each execution unit is pre-configured with four attributes. These four attributes are stored in an Extensible Markup Language configuration file and are managed uniformly with the user's test item configuration. The four attributes include name attribute, association attribute, dependency attribute, and type attribute. The name attribute is a unique identifier for the execution unit, which is not repeated within the same system and can be directly applied by the direct instruction attribute of the user test item; The relevance attribute is used to identify the compliance test specification point corresponding to the execution unit, and it corresponds one-to-one with the indirect instruction attribute of the user test item, serving as the matching basis for indirect mapping. The dependency attribute is used to explicitly declare the preceding execution units required for the execution of the execution unit. The attribute value is the name of the preceding execution unit, and multiple preceding dependencies (multiple preceding execution units) can be configured. The type attribute is used to identify the execution rule category of the execution unit, wherein the execution rule category includes mandatory items (must), optional items (option), and dependent items (need). Mandatory items: Execution units that must be included in the execution plan and executed regardless of whether the user selects the corresponding test item, such as system initialization, test environment cleanup, and other globally mandatory operations; Optional: Whether to include execution units directly associated with the user-selected test items in the execution plan, which are the core execution carriers for responding to user testing needs; Dependencies: Execution units that serve as prerequisites for other execution units and need to be executed before the execution units they depend on can be automatically scheduled and triggered by the system without requiring active selection by the user.
[0028] In this embodiment, for each user test item, a dual-channel mapping match is performed based on a preset set of execution units to establish a mapping relationship between the user test item and the corresponding execution unit; the dual-channel mapping match includes indirect mapping match and direct mapping match. The indirect mapping matching involves matching the indirect instruction attributes of user test items with the association attributes of execution units. When the indirect instruction attributes of user test items and the association attributes of execution units point to the same compliance test specification point, a mapping relationship is established between the user test items and the execution units. The direct mapping matching involves matching the direct instruction attribute of the user test item with the name attribute of the execution unit. When the direct instruction attribute of the user test item matches the name attribute of the execution unit, a mapping relationship is established between the user test item and the execution unit.
[0029] In this embodiment, the dual-channel mapping matching adopts a progressive matching rule, as follows: First, direct mapping matching is performed on user test items. Based on the non-empty direct instruction (direct) attribute of the user test item, the corresponding execution unit is accurately matched to establish a direct mapping relationship between the user test item and the execution unit. Secondly, for user test items with empty direct instruction attributes, or scenarios where more related execution units need to be matched after the direct mapping is completed, indirect mapping matching is performed. Based on the indirect instruction attributes of the user test items, execution units with the same specification points are matched to establish the indirect mapping relationship between user test items and execution units. Finally, all execution units corresponding to direct and indirect mappings are superimposed and integrated, duplicate matching of the same execution unit is eliminated, and a unique set of execution units corresponding to the current user test item is formed, thus completing the dual-channel mapping matching.
[0030] In this embodiment, dual-channel matching breaks the one-to-one mapping constraint and supports many-to-many association between user test items and execution units. Direct mapping ensures the accurate targeting capability of customized tests, while indirect mapping adapts to batch configuration scenarios based on standard specifications. By combining direct and indirect mapping, both configuration efficiency and scenario flexibility are taken into account. Furthermore, the deduplication mechanism of matching results provides a prerequisite for avoiding repeated execution and improving test efficiency.
[0031] The following provides a specific mapping example for further explanation in this embodiment: Suppose the system contains the following elements: User test item A: indirect="SCA1" (create component), direct="a"; User test item B: indirect="SCA2" (startup component), direct="b"; User test item C: indirect="SCA3" (delete component), direct="c"; Execution unit a: name="a", relevance="SCA1", dependency="", type="mandatory"; Execution unit b: name="b", relevance="SCA2", dependency=" ", type="optional"; Execution unit c: name="c", relevance="SCA3", dependency="b", type="optional".
[0032] When the user selects user test item c, the mapping result is as follows: Since execution unit c is the direct execution unit of user test item C, the execution plan should include execution unit c; Secondly, since execution unit a is a mandatory item, the execution plan should include execution unit a; Finally, since execution unit b is a dependency of execution unit c, the execution plan should include b; The execution plan is determined based on all the execution units as follows: execution unit a → execution unit b → execution unit c.
[0033] As can be seen from the above example, execution unit a is directly mapped to user test item A, and is also automatically triggered to execute as a dependency of user test item B. This reflects the core advantages of the present invention: execution unit reuse and automatic dependency scheduling. Execution unit a only needs to be written once and can be shared by multiple user test items.
[0034] S3. Summarize all execution units that have established mapping relationships with user test items, combine the type attributes and dependency attributes of each execution unit, generate an execution plan, and determine the execution order of each execution unit. The specific steps are as follows: S31. Include all execution units of type mandatory in the execution plan. These execution units are not affected by the user's test item selection results and are globally mandatory execution units. S32. Include all execution units that have established a mapping relationship with user test items and are of the optional type in the execution plan. These execution units directly respond to the user's test selection. S33. Iterate through all execution units that have been included in the execution plan. Based on the dependency attributes of each execution unit, add the corresponding dependency type of the execution unit to the execution plan until all the prerequisites of the execution units have been included, ensuring a complete closed loop of the test process. S34. Perform topological sorting based on the dependency attributes of each execution unit to determine the execution order. The sorting rule is: the execution unit that is depended on is executed later than the corresponding dependency. That is, if A depends on the execution of B, then B is executed first, and then A is executed; ensure that the preconditions are met before the subsequent operations are executed. S35. Perform deduplication on execution units in the execution plan. That is, when the same execution unit is mapped and matched by multiple user test items, or is included in the execution plan multiple times as a mandatory item, optional item, and dependency item, the execution unit is retained only once in the execution plan to avoid duplicate execution.
[0035] Based on the above steps, a final execution plan is generated. In this embodiment, through the explicit configuration of the type attribute and the dependency attribute, the execution sequence logic is completely decoupled from the service code of the execution units, and is uniformly scheduled by the system; in addition, dependencies are automatically supplemented to prevent users from missing pre-operations, ensuring the validity of the test. Moreover, global deduplication can shorten the overall test time, improve execution efficiency, and avoid the problem of inconsistent test results caused by executing the same logic multiple times.
[0036] S4. According to the sequence determined by the generated final execution plan, the corresponding execution units are sequentially scheduled to start the test; each execution unit calls the corresponding test case in the conformance test case library to perform conformance verification operations on the tested object, and feeds back the execution result in real time. After the execution units complete execution, the system summarizes the execution results by the dimension of user test items, generates a structured test report and displays it.
[0037] In this embodiment, the attribute information of all user test items and the attribute information of all execution units are stored and configured through Extensible Markup Language files (XML files); the mapping matching and execution plan generation processes obtain corresponding attribute information by reading the Extensible Markup Language files, so that the mapping relationships, dependency relationships and program codes are completely decoupled. When adjusting the test scheme or adding new test items, there is no need to modify the source code, and only the configuration file needs to be updated to take effect, which greatly reduces the maintenance cost.
[0038] The conformance test described in this embodiment is a Software Communications Architecture (SCA) conformance test or a Software Radio Test Framework (SRTF) standard conformance test.
[0039] The present embodiment will be further described below through a multi-test-item combined execution scenario and a single-test-item scenario; Multi-test-item combined execution scenario: Taking the SCA (Software Communications Architecture) conformance test as the application scenario; the Conformance Test Software (CRT) is deployed on the test host, and connected to the tested SCA platform through a network interface. The human-computer interaction interface of the CRT is developed based on a Windows desktop application, and the conformance test case library includes all test cases defined by the SCA 4.1 specification. The CRT factory is implemented in C++, and the analysis unit and the execution unit are loaded in the form of plugins; The mapping relationship between user test items and execution units is configured through an XML file. The following is an example of an XML configuration snippet: <!--User test item definition --> <framework name="核心框架"> <config name="参数配置" config_id="CF_Test_Config" / > <list name="应用管理器"> <list name="create"> <CF_User_Test_Item name="Create Application" description="Call the AppFactoryCreate interface to successfully create an application." sca_relate="When the application is successfully created, the create operation shall return the CF::ComponentType of the ApplicationManagerComponent of the created application. The specializedInfo of the CF::ComponentType returned by the create operation shall contain the application deployment component identified by COMPONENTS_ID and the CF::Components type value." precondition="The domain is started successfully." post-condition="None" parameters="None" test_process="1. Obtain the domain manager object; 2. Obtain the application factory from the domain manager object; 3. Create an application through the application factory." direct="SCA1" indirect="SCA1" / > …… <!--Execution unit definition --> <unit name="SCA1" interface="CF_EXE_appFactCreate" relevance="SCA1" dependence="CF_EXE_appFactCreate" type="force" / > …… Specifically, the mapping execution process is as follows: The user checks the user test items "Core Framework - Create Application" and "Core Framework - Start Application" through the human-computer interaction interface, and then clicks execute; After clicking execute, the analysis unit reads the XML configuration file (the above XML configuration fragment example), and loads the user test item list and the execution unit list; Then the analysis unit traverses the user test items to perform the mapping operation: For "Core Framework - Create Application": indirect="SCA1", search the mapping table for the execution unit with relevance="SCA1" and find the "Create Application" execution unit; For "Core Framework - Startup Application": indirect="SCA2", search the mapping table for the execution unit with relevance="SCA2" and find the execution unit of "Startup Application"; The analysis unit generates an execution plan based on the mapping results and the execution unit type: The mandatory item is system initialization, which is an execution unit that must be performed; The dependency is a prerequisite for creating the application and can be executed only once. The optional application launcher matches the user's test item, which needs to be executed. Mandatory environment cleanup is an execution unit that must be performed. Based on the execution units identified above, the execution order is as follows: System initialization → Application creation → Application launch → Environment cleanup; Based on the execution order determined above, each execution unit is executed sequentially. After each execution unit is completed, the result is fed back to the analysis unit. The analysis unit summarizes all execution results, generates a test report, and submits it to the human-computer interaction interface for display.
[0040] Single test item scenario: When a user selects only a single test item, such as "Core Framework - Start Application" for a single user test item; After the analysis unit is mapped, only the "Start Application" execution unit is directly matched. However, the analysis unit finds that the dependency attribute of "Start Application" points to "Create Application", and the type of "Create Application" is a dependency. Therefore, the analysis unit automatically adds "Create Application" to the execution plan to ensure that the dependency is executed before the optional. Based on the above, the final execution order is as follows: System initialization (mandatory) → Application creation (automatically triggers dependencies) → Application startup (optional for user-selected test items) → Environment cleanup (mandatory).
[0041] In summary, even if a user selects only the "Launch Application" test item, the system can still automatically identify and execute the "Create Application" test logic that it depends on, ensuring the completeness and correctness of the test.
[0042] A comparison of the technical solution of this embodiment with the technical solution of CN117336197A (a Chinese invention patent application, hereinafter referred to as prior art) reveals the beneficial effects of this application as shown in Table 1 below: Table 1 Comparison of Effects
[0043] As shown in the table above, the existing technology adopts a one-to-one rigid binding mode between user test items and execution units, and the mapping relationship is fixed and cannot be adjusted. This application adopts a dual-channel mapping mechanism to realize a many-to-many flexible mapping between user test items and execution units. A single execution unit can be reused by multiple user test items, and a single user test item can be associated with multiple execution units, breaking the traditional fixed binding constraints.
[0044] Secondly, existing technologies require the repeated development of multiple sets of execution code for same-source test logic, resulting in large amounts of code redundancy and extremely low reusability. In contrast, this embodiment relies on a many-to-many mapping architecture, where the execution unit corresponding to the same-source specification point only needs to be developed once and can be reused across multiple user test items, greatly reducing code redundancy and significantly improving the test code reusability rate.
[0045] Furthermore, all test item attributes, execution unit attributes, mappings, and dependencies in this application are configured externally through extensible markup language files, which completely decouples them from business code. Test plan adjustments, iterations, and additions can be completed without modifying the code, greatly improving configuration flexibility and scalability. In addition, explicit dependency management and automatic scheduling are achieved through execution unit dependency attributes and type attributes. It can automatically parse dependency links, complete preceding execution units, and generate execution order through topology sorting, realizing fully automated intelligent scheduling of the test process and ensuring a complete closed loop of the test process.
[0046] Example 2
[0047] See Figure 1 As shown, this embodiment provides a user test item and execution unit mapping system for compliance testing to execute the method described in embodiment 1. Specifically, the system includes a human-computer interaction interface, a compliance test case library, and a compliance test factory (CRT factory); the compliance test factory includes an analysis unit and several independently executed execution units. The human-computer interaction interface is used to provide a visual testing operation environment, allowing users to select compliance test items and output at least one user test item selected by the user; it is also used to display the test execution progress, real-time execution results and final structured test report. Each user test item includes a name attribute, an indirect instruction attribute, and a direct instruction attribute. The indirect instruction attribute is used to identify the compliance test specification point corresponding to the user test item, and the direct instruction attribute is used to specify the name of the execution unit to be invoked.
[0048] The compliance test case library stores four main categories of standard compliance test cases: core framework, component communication, operating system, and application test cases. These categories cover all compliance verification points corresponding to the SCA specification and SRTF standard, providing underlying standardized test logic and test case resources to support each independent execution unit. All test cases correspond one-to-one with the specification points of the execution unit and user test items, ensuring the standardization, normalization, and traceability of the tests. See also... Figure 1 As shown, the compliance test case library provides compliance test cases for the core framework CF, middleware EORB, operating system OS, modem hardware abstraction layer MHAL, and on-chip bus modem hardware abstraction layer MOCB.
[0049] The analysis unit is used to receive the user test items, perform dual-channel mapping matching on each user test item based on the preset set of execution units, establish a mapping relationship between the user test items and the corresponding execution units, summarize all execution units that have established mapping relationships with user test items, generate an execution plan and determine the execution order by combining the type attributes and dependency attributes of each execution unit, and output execution instructions.
[0050] Each execution unit includes a name attribute, an association attribute, a dependency attribute, and a type attribute; the association attribute is used to identify the compliance test specification point corresponding to the execution unit, the dependency attribute is used to declare the preceding execution units required before the execution unit is executed, and the type attribute is used to identify the execution rule category of the execution unit.
[0051] The dual-channel mapping matching includes indirect mapping matching and direct mapping matching; the indirect mapping matching is to match the indirect instruction attribute of the user test item with the association attribute of the execution unit. When the indirect instruction attribute of the user test item and the association attribute of the execution unit point to the same compliance test specification point, a mapping relationship is established between the user test item and the execution unit. The direct mapping matching involves matching the direct instruction attribute of the user test item with the name attribute of the execution unit. When the direct instruction attribute of the user test item matches the name attribute of the execution unit, a mapping relationship is established between the user test item and the execution unit.
[0052] The analysis unit is also used to summarize all execution results, generate structured test results, and output them to the human-computer interaction interface for display.
[0053] The analysis unit includes a mapping matching module, which is used to perform the following operations: For user test items, direct mapping matching is performed first. Based on the direct instruction attribute of the non-empty user test item, the corresponding execution unit is accurately matched, and a direct mapping relationship is established between the user test item and the execution unit. For user test items with empty direct instruction attributes, or scenarios where more associated execution units need to be matched after the direct mapping is completed, indirect mapping matching is performed. Based on the indirect instruction attributes of the user test item, execution units with the same specification point are matched, and an indirect mapping relationship is established between the user test item and the execution unit. By overlaying and integrating all execution units corresponding to direct and indirect mappings, and eliminating duplicate matching of the same execution unit, a unique set of execution units corresponding to the current user test item is formed.
[0054] In this embodiment, the analysis unit further includes an execution scheduling module, which is used to perform the following operations: Include all mandatory execution units in the execution plan; All execution units that have established a mapping relationship with user test items and are of the optional type are included in the execution plan; The execution order is determined based on the dependency attributes of each execution unit, with the dependent execution unit being executed later than its corresponding dependency. Deduplication is performed on the execution units in the execution plan, and each execution unit is retained only once. Based on this, the final execution plan is generated and the execution instructions are output.
[0055] In this embodiment, the system further includes a configuration storage module, which is used to store the attribute information of all user test items and the attribute information of all execution units through an Extensible Markup Language (XML) file. The analysis unit obtains the corresponding attribute information by reading the Extensible Markup Language file.
[0056] The execution unit consists of several independently executable code modules. Each execution unit corresponds to a single compliance verification logic and has a single responsibility characteristic. The execution unit is used to receive the execution instructions, sequentially call the test cases in the compliance test case library to perform test operations according to the execution plan, and feed back the execution results to the analysis unit in real time.
[0057] The compliance test is either a software communication architecture compliance test or a software radio test framework standard compliance test. Both scenarios share a common system architecture, mapping logic, and scheduling mechanism. They can be quickly switched and adapted by simply modifying the specification point parameters and execution unit attribute parameters in the XML configuration file, which has strong scenario compatibility and scalability.
[0058] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.< / list> < / list> < / framework>
Claims
1. A method for mapping user test items to execution units in compliance testing, characterized in that, Includes the following steps: S1. Obtain at least one user test item selected by the user: Each user test item includes a name attribute, an indirect instruction attribute, and a direct instruction attribute. The indirect instruction attribute is used to identify the compliance test specification point corresponding to the user test item, and the direct instruction attribute is used to specify the name of the execution unit to be invoked. S2. For each user test item, perform dual-channel mapping matching based on a preset set of execution units to obtain the execution unit corresponding to the user test item; the dual-channel mapping matching includes indirect mapping matching and direct mapping matching; Each execution unit includes a name attribute, an association attribute, a dependency attribute, and a type attribute; the association attribute is used to identify the compliance test specification point corresponding to the execution unit, the dependency attribute is used to declare the preceding execution units required for the execution of the execution unit, and the type attribute is used to identify the execution rule category of the execution unit; The indirect mapping matching involves matching the indirect instruction attribute of a user test item with the association attribute of an execution unit. If the indirect instruction attribute of a user test item and the association attribute of an execution unit point to a unified compliance test specification point, then an indirect mapping relationship is established between the user test item and the execution unit. The direct mapping matching involves matching the direct instruction attribute of a user test item with the name attribute of an execution unit. If the direct instruction attribute of a user test item and the name attribute of an execution unit are consistent, then a direct mapping relationship is established between the user test item and the execution unit. S3. Summarize all execution units that have established mapping relationships with user test items, combine the type attributes and dependency attributes of each execution unit, generate an execution plan and determine the execution order of each execution unit; S4. Schedule each execution unit to perform test operations in sequence according to the execution plan to complete the compliance test.
2. The method for mapping user test items to execution units in compliance testing according to claim 1, characterized in that, The dual-channel mapping matching includes the following steps: First, perform direct mapping matching on the user test items to establish a direct mapping relationship between the user test items and the execution unit; Then, for user test items with empty direct instruction attributes, or scenarios where more related execution units need to be matched after the direct mapping is completed, indirect mapping matching is performed to establish the indirect mapping relationship between user test items and execution units. By overlaying and integrating all execution units corresponding to direct and indirect mappings, eliminating duplicate matching of the same execution unit, and summarizing them to form a unique set of execution units corresponding to the current user test item, the dual-channel mapping matching is completed.
3. The method for mapping user test items to execution units in compliance testing according to claim 1, characterized in that, The type attributes of the execution unit include three categories: mandatory items, optional items, and dependencies. The mandatory item is an execution unit that must be included in the execution plan and executed regardless of whether the user selects the corresponding test item; The options for whether to include it in the execution plan and participate in the test execution depend entirely on whether the user selects the execution unit for the corresponding user test item. The dependencies are execution units that serve as prerequisites for the execution of other execution units, must be executed first, and provide the execution premise for the execution units they depend on.
4. The method for mapping user test items to execution units in compliance testing according to claim 3, characterized in that, Generating the execution plan includes the following steps: Include all execution units of type mandatory in the execution plan; All execution units that have established a mapping relationship with user test items and are of the optional type are included in the execution plan; Iterate through all execution units that have been included in the execution plan, and add execution units with the corresponding dependency types to the execution plan based on the dependency attributes of each execution unit. The execution order is determined based on the dependency attributes of each execution unit. The execution unit that is depended on is executed later than its corresponding dependency, thus generating the final execution plan.
5. The method for mapping user test items to execution units in compliance testing according to claim 4, characterized in that, The process of generating the execution plan also includes a step of deduplicating execution units: When the same execution unit is mapped and matched by multiple user test items, or is included in the execution plan multiple times as a mandatory item, optional item, and dependency item, the execution unit is retained only once in the execution plan.
6. The method for mapping user test items to execution units in compliance testing according to claim 1, characterized in that, The attribute information of the user test items and the attribute information of all execution units are stored and configured through Extensible Markup Language (XML) files; the mapping matching and execution plan generation processes obtain the corresponding attribute information by reading the XML files.
7. The method for mapping user test items to execution units in compliance testing according to claim 1, characterized in that, The compliance test refers to the software communication architecture compliance test or the software radio test framework standard compliance test.
8. A user test item to execution unit mapping system for compliance testing, characterized in that, It includes a human-computer interaction interface, a compliance test case library, and a CRT factory; the CRT factory includes an analysis unit and several independently executing execution units; The human-computer interaction interface is used to provide a test operation environment, allowing users to select user test items and output at least one user test item selected by the user; each user test item includes a name attribute, an indirect instruction attribute, and a direct instruction attribute, wherein the indirect instruction attribute is used to identify the compliance test specification point corresponding to the user test item, and the direct instruction attribute is used to specify the name of the execution unit to be invoked; The compliance test case library is used to store compliance test cases and provide test case support for test execution; The analysis unit is used to receive the user test items, perform dual-channel mapping matching on each user test item based on the preset set of execution units, and establish a mapping relationship between the user test items and the corresponding execution units; then, it summarizes all execution units that have established mapping relationships with user test items, generates an execution plan and determines the execution order by combining the type attributes and dependency attributes of each execution unit, and outputs the execution instructions. Each execution unit includes a name attribute, an association attribute, a dependency attribute, and a type attribute; the association attribute is used to identify the compliance test specification point corresponding to the execution unit, the dependency attribute is used to declare the preceding execution units required for the execution of the execution unit, and the type attribute is used to identify the execution rule category of the execution unit; The dual-channel mapping matching includes indirect mapping matching and direct mapping matching. Indirect mapping matching involves matching the indirect instruction attribute of a user test item with the association attribute of an execution unit. If the indirect instruction attribute of the user test item and the association attribute of the execution unit point to a unified compliance test specification point, then an indirect mapping relationship is established between the user test item and the execution unit. Direct mapping matching involves matching the direct instruction attribute of a user test item with the name attribute of an execution unit. If the direct instruction attribute of the user test item matches the name attribute of the execution unit, then a direct mapping relationship is established between the user test item and the execution unit. The execution unit is used to receive the execution instruction, sequentially call the test cases in the compliance test case library to perform test operations according to the execution plan, and feed back the execution results to the analysis unit in real time. The analysis unit summarizes all execution results and generates test results.
9. A user test item and execution unit mapping system for compliance testing according to claim 8, characterized in that, The analysis unit includes a mapping matching module, which is used to perform the following operations: First, perform direct mapping matching on the user test items to establish a direct mapping relationship between the user test items and the execution unit; Then, for user test items with empty direct instruction attributes, or scenarios where more related execution units need to be matched after the direct mapping is completed, indirect mapping matching is performed to establish the indirect mapping relationship between user test items and execution units. By superimposing and integrating all execution units corresponding to direct and indirect mappings, eliminating duplicate matching of the same execution unit, and summarizing them to form a unique set of execution units corresponding to the current user test item, the dual-channel mapping matching is completed.
10. A user test item and execution unit mapping system for compliance testing according to claim 8, characterized in that, The analysis unit includes an execution scheduling module, which is used to perform the following operations: Include all execution units of type mandatory in the execution plan; All execution units that have established a mapping relationship with user test items and are of the optional type are included in the execution plan; Iterate through all execution units that have been included in the execution plan, and add execution units of the corresponding dependency type to the execution plan based on the dependency attributes of the execution unit; The execution order is determined based on the dependency attributes of each execution unit, with the dependent execution unit being executed later than its corresponding dependency. Deduplication is performed on the execution units in the execution plan, and each execution unit is retained only once. Generate the final execution plan and output the execution instructions.
Citation Information
Patent Citations
Software radio standard conformity test method based on atomic granularity
CN117336197A
