Test item generation method and apparatus
By matching a pre-defined temporary test result library, formal test projects are automatically created, solving the problem of temporary test projects not being able to be included in management, improving testing efficiency and reducing costs, and ensuring timely feedback and completeness of test results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2025-08-29
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, temporary test projects cannot be included in the formal test project management system, resulting in untimely feedback of test results, repeated execution of tests, reduced overall testing efficiency, and increased testing costs.
By receiving the identifiers and requirements documents of formal test projects and matching them with a pre-set temporary test result library, formal test projects are automatically identified and created, ensuring that requirement tags are promptly included in the management scope and avoiding duplicate testing.
It improved testing efficiency, reduced testing costs, ensured the completeness and adequacy of the testing scope, and avoided test omissions and production risks.
Smart Images

Figure CN122132290A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and can also be used in the field of financial technology, specifically relating to a test item generation method, apparatus, device and storage medium. Background Technology
[0002] The management process for automatically generating formal test projects based on requirements is basically mature. However, there are still some scenarios where temporary test projects are needed. Due to the limitations of the formal test project system, temporary test projects cannot be included in the formal test project management system. The test results obtained after the temporary test project is completed need to wait for the formal test project system to respond before the test results of the temporary test project can be included in the formal test project system in order to achieve a closed loop of testing.
[0003] The process is manually monitored. If there are many temporary test items and the system response time of the formal test items is long, the test results of the temporary test items are likely not included in the formal test item system, resulting in repeated execution of the same test item, which reduces the overall testing efficiency and increases the testing cost. Summary of the Invention
[0004] In view of the above problems, this application provides a method, apparatus, equipment, medium and program product for generating test items to improve overall testing efficiency and reduce testing costs.
[0005] According to a first aspect of this application, a method for generating a test project is provided, comprising: receiving a formal test identifier for a formal test project and a first requirement document; matching temporary test projects in a preset temporary test result library based on the first requirement document to obtain temporary test results, wherein the temporary test projects in the temporary test results include requirement item tags, and matching temporary test projects in the preset temporary test result library based on the first requirement document includes matching the temporary test projects based on the requirement item tags in the first requirement document; and creating a formal test project based on the formal test identifier and the temporary test results.
[0006] According to an embodiment of this application, the method for establishing the preset temporary test result library includes: receiving a second requirement document for a temporary test project; identifying N requirement item tags in the second requirement document, where N is a positive integer; generating a temporary test project based on the N requirement item tags, performing tests on the temporary test project, and obtaining test results, wherein the temporary test results include a lifecycle; and storing the test results and the corresponding N requirement item tags in the temporary test result library.
[0007] According to an embodiment of this application, identifying the N requirement item tags of the second requirement document includes: obtaining a preset list of requirement item tags; and matching the N requirement item tags of the second requirement document based on the preset list of requirement item tags.
[0008] According to an embodiment of this application, the step of matching temporary test items in a preset temporary test result library based on the first requirement document to obtain temporary test results includes: performing matching on temporary test items in the preset temporary test result library based on the first requirement document through the requirement item tags to obtain L matching degrees, where L is a positive integer; and selecting the temporary test results corresponding to the W temporary test items among the L matching degrees, where W is a positive integer.
[0009] According to an embodiment of this application, the matching degree includes: the number of requirement item tags that are successfully matched by the temporary test project, or the matching degree includes: a comprehensive value obtained by weighted summation of the requirement item tags that are successfully matched by the temporary test project.
[0010] According to embodiments of this application, it further includes: terminating the lifecycle of temporary test results in the preset temporary test result library based on the formal test identifier.
[0011] According to an embodiment of this application, after receiving the formal test identifier and the first requirement document of the formal test project, the method further includes: identifying Q requirement item tags in the first requirement document, where Q is a positive integer, in the case that no temporary test result is matched in the preset temporary test result library based on the first requirement document; and creating a formal test project based on the Q requirement item tags of the formal test identifier and the formal test identifier.
[0012] A second aspect of this application provides a test project generation apparatus, the apparatus comprising: a receiving module for receiving a formal test identifier of a formal test project and a first requirement document; a matching module for matching temporary test projects in a preset temporary test result library based on the first requirement document to obtain temporary test results, wherein the temporary test projects in the temporary test results include requirement item tags, and matching the temporary test projects in the preset temporary test result library based on the first requirement document includes matching the temporary test projects based on the requirement item tags in the first requirement document; and a project creation module for creating a formal test project based on the formal test identifier and the temporary test results.
[0013] According to an embodiment of this application, the apparatus further includes a test result library establishment module, configured to receive a second requirement document for a temporary test project; identify N requirement item tags in the second requirement document, where N is a positive integer; generate a temporary test project based on the N requirement item tags, perform tests on the temporary test project, and obtain test results, wherein the temporary test results include a lifecycle; and store the test results and the corresponding N requirement item tags in the temporary test result library.
[0014] According to an embodiment of this application, the test result library establishment module is specifically used to obtain a preset list of requirement item tags; and to match N requirement item tags of the second requirement document based on the preset list of requirement item tags.
[0015] According to an embodiment of this application, the matching module is specifically used to perform matching on temporary test items in the preset temporary test result library based on the first requirement document and through the requirement item tags to obtain L matching degrees, where L is a positive integer; and to select the temporary test results corresponding to the W temporary test items among the L matching degrees, where W is a positive integer.
[0016] According to an embodiment of this application, the matching degree includes: the number of requirement item tags that are successfully matched by the temporary test project, or the matching degree includes: a comprehensive value obtained by weighted summation of the requirement item tags that are successfully matched by the temporary test project.
[0017] According to an embodiment of this application, the device further includes: a lifecycle termination module, used to terminate the lifecycle of temporary test results in the preset temporary test result library based on the formal test identifier.
[0018] According to an embodiment of this application, after receiving the formal test identifier and the first requirement document of the formal test project, the method further includes: identifying Q requirement item tags in the first requirement document, where Q is a positive integer, in the case that no temporary test result is matched in the preset temporary test result library based on the first requirement document; and creating a formal test project based on the Q requirement item tags of the formal test identifier and the formal test identifier.
[0019] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0020] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0021] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0022] To address the technical problems of low overall testing efficiency and high testing costs in existing technologies, in the embodiments of this disclosure, after the formal test project system successfully responds and assigns a formal test identifier, the temporary test results of pre-stored temporary test projects are matched with the first requirement document. Then, a formal test project is directly created using these test results and the formal identifier, and the temporary test results are directly used as the results of the formal test project. The embodiments of this disclosure can achieve at least the following beneficial effects: 1. Effective management of temporary test results that cannot be temporarily included in the formal test project management avoids the management costs of generating large batches of temporary projects and causing frequent project changes, while also ensuring that requirement item tags are included in the test management scope in a timely manner; through automated identification, screening, and processing, the integrity of the test scope and the adequacy of test preparation are effectively guaranteed, avoiding the risk of production deployment due to test omissions; 2. By prioritizing the matching of temporary test results corresponding to temporary test projects in the preset temporary test result library, the overall testing efficiency is increased and the testing costs are reduced. Attached Figure Description
[0023] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0024] Figure 1 The illustrations depict application scenarios of the test item generation method, apparatus, device, medium, and program product according to embodiments of this application.
[0025] Figure 2 A flowchart illustrating a test item generation method according to an embodiment of this application is shown schematically;
[0026] Figure 3 This schematic diagram illustrates the structural block diagram of a test item generation apparatus according to an embodiment of the present application;
[0027] Figure 4 A block diagram schematically illustrates an electronic device suitable for implementing a test item generation method according to an embodiment of this application. Detailed Implementation
[0028] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0030] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0031] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0032] The formal test project workflow is established based on formal test identifiers and corresponding requirement documents. However, due to business needs, some temporary test projects exist. These temporary test projects include requirement items from projects that have not yet been formally approved. The creation of these requirement items is carried out concurrently with the project approval process. Since temporary test projects do not contain corresponding formal test identifiers, they cannot be generated according to the formal test project generation rules. After completing the temporary test, it is necessary to wait for the test project approval to issue a formal test identifier before the relevant data can be included in the formal test project system. Due to the large number of temporary test projects and the long issuance time of formal test identifiers, the formal test project system has a long response cycle, which can easily lead to test omissions, triggering production risks. Furthermore, it is highly likely that the test results of temporary test projects will not be included in the formal test project system, resulting in repeated execution of the same project, reducing overall testing efficiency and increasing testing costs.
[0033] To address the technical problems of low overall testing efficiency and high testing overhead in existing technologies, embodiments of this application provide a test project generation method. The method includes: receiving a formal test identifier for a formal test project and a first requirement document; matching temporary test projects in a preset temporary test result library based on the first requirement document to obtain temporary test results, wherein the temporary test projects in the temporary test results include requirement item tags, and matching temporary test projects in the preset temporary test result library based on the first requirement document includes matching the temporary test projects based on the requirement item tags in the first requirement document; and creating a formal test project based on the formal test identifier and the temporary test results.
[0034] In the embodiments of this disclosure, after the formal test project system successfully responds and assigns a formal test identifier, the temporary test results of the pre-stored temporary test projects are matched with the first requirement document. Then, the formal test project is directly created using these test results and the formal identifier, and the temporary test results are directly used as the results of the formal test project. The embodiments of this disclosure can achieve at least the following beneficial effects: 1. Effective management of temporary test results that cannot be temporarily included in the formal test project management avoids the management costs of generating a large number of temporary projects and causing frequent project changes, and also ensures that requirement item tags are included in the test management scope in a timely manner. Automated identification, screening, and processing effectively ensure the completeness of the test scope and the adequacy of test preparation, avoiding the risk of production deployment due to test omissions; 2. By prioritizing the matching of temporary test results corresponding to temporary test projects in the preset temporary test result library, overall test efficiency is increased and test overhead is reduced.
[0035] Figure 1 The diagram illustrates an application scenario of the test item generation method according to an embodiment of this application.
[0036] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, and a server 105. Network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0037] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0038] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0039] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0040] It should be noted that the test item generation method provided in this application embodiment can generally be executed by server 105. Correspondingly, the test item generation device provided in this application embodiment can generally be located in server 105. The test item generation method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the test item generation device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0042] The following will be based on Figure 1 The described scene, through Figure 2 The test item generation method according to the embodiments of this application will be described in detail.
[0043] Figure 2 A flowchart illustrating a test item generation method according to an embodiment of this application is shown schematically.
[0044] like Figure 2 As shown, the test project generation in this embodiment includes operations S210 to S230, and this transaction processing method can be executed by server 105.
[0045] In operation S210, receive the official test identifier and first requirement document for the formal test project.
[0046] Among them, a formal test project refers to a test project that can be included in the formal test project system. The formal test project must carry a formal test identifier. The first requirement document refers to the requirement document used to guide the execution of the test process. The first requirement document includes multiple requirement items, each of which guides one test content. Requirement items include at least different requirement item types. For example, requirement item types include: functional test, performance test, compatibility test, security test, and usability test, etc. Different requirement item types contain specific requirement items. For example, specific requirement items under the functional test type include: registration function test, document editing test, performance test, etc.
[0047] In a typical scenario, after the relevant system assigns the formal test identifier and the first requirements document, the formal test project system receives this information and then creates a formal test project based on this information to complete the subsequent testing process.
[0048] In operation S220, temporary test results are obtained by matching temporary test items in a preset temporary test result library based on the first requirement document. The temporary test items in the temporary test results include requirement item tags, and matching temporary test items in the preset temporary test result library based on the first requirement document includes matching the temporary test items based on the requirement item tags in the first requirement document.
[0049] The temporary test results in the preset temporary test result library are stored after the temporary test projects are executed. Each temporary test result needs to be added with multiple corresponding requirement item tags after being stored to represent the test item of the temporary test result. For example, the requirement item tag is: Functional test: Verify the registration function of application A.
[0050] In a typical scenario, after receiving the formal test identifier and the first requirement document, the formal test project system does not immediately execute the test process based on the formal test identifier and the first requirement document. Instead, it matches the temporary test results of previously executed temporary test projects in a pre-set temporary test result library using the first requirement document. Specifically, the first requirement document can be converted into word vectors, and the similarity of each requirement item tag of each temporary test result in the pre-set temporary test result library can be performed. If the similarity of the matching is greater than a preset threshold, the closest temporary test result is matched as a case for subsequent formal test project establishment.
[0051] According to an embodiment of this disclosure, the method for establishing the preset temporary test result library includes: receiving a second requirement document for a temporary test project; identifying N requirement item tags in the second requirement document, where N is a positive integer; generating a temporary test project based on the N requirement item tags, performing tests on the temporary test project, and obtaining test results, wherein the temporary test results include a lifecycle; and storing the test results and the corresponding N requirement item tags in the temporary test result library.
[0052] It should be noted that the process of establishing the preset temporary test result library is performed before the above operation S210. After each execution of a temporary test project and obtaining a temporary test result, the temporary test result is added to the preset temporary test result library to realize the establishment and maintenance of the temporary test result library.
[0053] The second requirement document is the requirement document for the temporary test project. It should be noted that since the temporary test project may not be approved later, it will not be able to be assigned a formal test project number. As a result, the temporary test project tested by the second requirement document cannot be directly included in the formal test project system. Therefore, if the temporary test project is approved, the second requirement document is the same as the first requirement document. If the temporary test project is approved differently, the test results of various requirement items after the second requirement document is tested will be stored in the temporary test library, waiting for the same or similar tests to be matched later.
[0054] The lifecycle of a temporary test result refers to the period during which the temporary test result is used to match formal test projects within a pre-defined temporary test result database. This lifecycle can be set as a fixed period, such as three months, or it can be set according to conditions. The lifecycle ends when certain conditions are met, for example, upon receiving a deadline instruction from relevant personnel. Once the lifecycle expires, the temporary test result will no longer participate in matching; that is, when the lifecycle expires, the temporary test result will not participate in the matching process of operation S220, and will only retain its archiving function.
[0055] In a typical scenario, after receiving the second requirement document for a temporary test project, the second requirement document undergoes preprocessing operations such as identification, extraction, and cleaning. For example, semantic extraction is used to extract N requirement items from the preprocessed second requirement document as requirement item tags. Based on these requirement item tags, a temporary test project is generated. The N requirement items of the temporary test project are then tested by manual or automated testing tools to obtain temporary test results. Finally, the temporary test results and the corresponding N requirement item tags are stored in a temporary test result library.
[0056] Understandably, by establishing a temporary test result library in advance, the test results of these temporary test projects can be managed centrally, and setting corresponding lifecycles can also ensure that temporary test results that have reached the end of their lifecycles will not participate in the matching of formal test projects, thereby improving the efficiency of subsequent matching.
[0057] According to an embodiment of this disclosure, identifying the N requirement item tags of the second requirement document includes: obtaining a preset list of requirement item tags; and matching the N requirement item tags of the second requirement document based on the preset list of requirement item tags.
[0058] The preset requirement item tag list contains a full set of requirement item tags that can fulfill the test requirements. The corresponding requirement item tags in the second requirement document are matched with the full set of test requirement item tags in the requirement item tag list.
[0059] Specifically, the second requirement document and the list of requirement item tags are converted into word vectors. Then, word vector matching is used to calculate the similarity between the requirement items in the second requirement document and the list of requirement item tags. When the similarity meets the matching condition (such as being greater than a preset matching threshold), it is determined that the corresponding requirement item tag in the second requirement document has been successfully matched.
[0060] Next, after detailing the temporary test result database, the matching method for the temporary test results will be revealed, as shown below:
[0061] According to an embodiment of this disclosure, the step of matching temporary test items in a preset temporary test result library based on the first requirement document to obtain temporary test results includes: performing matching on the temporary test items in the preset temporary test result library based on the first requirement document through the requirement item tags to obtain L matching degrees, where L is a positive integer; and selecting the temporary test results corresponding to the L temporary test items with a matching degree of W, where W is a positive integer.
[0062] The matching degree refers to the degree of matching between the first requirements document and the temporary test project.
[0063] Specifically, the first requirement document is matched with temporary test projects. By calculating the matching degree between the two, for each temporary test project's multiple requirement item tags, the matching degree between the first requirement document and these requirement item tags is calculated. For example, multiple requirement tags of the temporary test project are combined into a term sequence, and then the similarity between this term sequence and the first requirement document is calculated as the matching degree, obtaining the matching degree with the temporary test project. Then, L matching degrees that meet the requirements are selected. These requirements can be greater than a preset matching degree threshold or the matching degree values ranking in the top few. Finally, the temporary test results corresponding to several temporary test projects are selected in descending order of matching degree.
[0064] Understandably, obtaining temporary test results through matching degree calculation can effectively improve matching efficiency and reduce computational overhead compared to semantic retrieval methods.
[0065] According to embodiments of this disclosure, the matching degree includes: the number of requirement item tags that are successfully matched by the temporary test project, or the matching degree includes: a comprehensive value obtained by weighted summation of the requirement item tags that are successfully matched by the temporary test project.
[0066] In addition to the method of calculating the matching degree by grouping multiple requirement tags into a single term sequence, as mentioned above, the matching degree can also be achieved by matching each requirement tag one-to-one with the first requirement document, recording the successfully matched requirement tags. Finally, the matching degree can be determined by the number of successfully matched requirement tags, or it can be calculated by combining the set of successfully matched requirement tags with their respective weights. For example, for a temporary test project including requirement tag 1, requirement tag 2, requirement tag 3, and requirement tag 4, if requirement tag 1, requirement tag 2, and requirement tag 3 match successfully, their matching value is recorded as 3. As another example, for a temporary test project including requirement tag 1, requirement tag 2, requirement tag 3, and requirement tag 4, where requirement tag 1 corresponds to a weight of 0.1, requirement tag 2 to a weight of 0.2, requirement tag 3 to a weight of 0.1, and requirement tag 4 to a weight of 0.5, if requirement tag 1, requirement tag 2, and requirement tag 3 match successfully, their weighted sum of matching values is recorded as 0.4.
[0067] Understandably, by setting various matching value calculation methods, the matching degree calculation can be applied to multiple different scenarios, increasing the generalizability of this solution.
[0068] In operation S230, a formal test project is created based on the formal test identifier and the temporary test results.
[0069] Specifically, formal test projects are generated by inputting formal test identifiers into the formal test project system, and the temporary test results already output under the corresponding temporary test projects are automatically adjusted to the formal projects to complete formal test projects that can be implemented without testing.
[0070] In a typical scenario, when creating a formal test project, if only one temporary test project is generated in the early stages, it will be activated directly; if multiple temporary test projects are generated in the early stages, only the earliest generated temporary test project will be activated, and the remaining requirements will be automatically incorporated into that project.
[0071] According to embodiments of this disclosure, the method further includes: terminating the lifecycle of temporary test results in the preset temporary test result library based on the formal test identifier.
[0072] Specifically, if the formal test identifier successfully matches the temporary test result, the identification and judgment are performed through the sequence field of the formal test identifier. If the formal test identifier identification and judgment are successful, the life cycle of the temporary test result ends, and the test result will not participate in the matching of the requirement documents of other formal test projects.
[0073] Understandably, after the formal test project is successfully created, the lifecycle of the temporary test results in the temporary test result library can be terminated, so that it only has the function of archiving and does not participate in subsequent matching, thereby reducing the overall matching workload and increasing matching efficiency.
[0074] According to an embodiment of this disclosure, after receiving the formal test identifier and the first requirement document of the formal test project, the method further includes: identifying Q requirement item tags in the first requirement document, where Q is a positive integer, in the case that no temporary test result is matched in the preset temporary test result library based on the first requirement document; and creating a formal test project based on the Q requirement item tags of the formal test identifier and the formal test identifier.
[0075] Specifically, if no temporary test project is found, then each requirement tag in the first requirement document is extracted and a formal test project is created. The process of extracting the requirement tags for the formal test project is the same as the process of extracting the requirement tags for the temporary test project. After the requirement tags are extracted, the Q requirement item tags in the first requirement document are tested manually or by automated testing tools to obtain formal test results. The formal test results, the formal test identifier, and the Q requirement item tags of the formal test identifier are then used to ensure that existing temporary test results are matched first, avoiding resource waste.
[0076] In the embodiments of this disclosure, temporary test projects are automatically generated through a second requirements document, and these temporary test projects are automatically adjusted to formal test projects after the project initiation approval. The system identifies planning requirements that meet certain rules but cannot be generated into formal projects, generates temporary test projects, and assigns them. After project approval, the temporary test projects are discarded. Formal test projects can be generated according to different rules. Simultaneously, the cases from temporary projects are automatically adjusted to formal projects, reducing repetitive output by testers, lowering project management costs, and effectively preventing test omissions.
[0077] Based on the above-described test item generation method, this application also provides a test item generation apparatus. The following will be combined with... Figure 3 The device is described in detail.
[0078] Figure 3 A schematic block diagram of a test item generation apparatus according to an embodiment of this application is shown.
[0079] like Figure 3 As shown, the test item generation device 300 of this embodiment includes a receiving module 310, a matching module 320, and an item creation module 330.
[0080] The receiving module 310 is used to receive the formal test identifier and the first requirements document of the formal test project. In one embodiment, the receiving module 310 can be used to perform the operation S210 described above, which will not be repeated here.
[0081] The matching module 320 is used to match temporary test items in a preset temporary test result library based on the first requirement document to obtain temporary test results. The temporary test items in the temporary test results include requirement item tags, and matching the temporary test items in the preset temporary test result library based on the first requirement document includes matching the temporary test items based on the requirement item tags from the first requirement document. In one embodiment, the matching module 320 can be used to perform the operation S220 described above, which will not be repeated here.
[0082] The project creation module 330 is used to create a formal test project based on the formal test identifier and the temporary test result. In one embodiment, the project creation module 330 can be used to perform the operation S230 described above, which will not be repeated here.
[0083] According to an embodiment of this application, the apparatus further includes a test result library establishment module, configured to receive a second requirement document for a temporary test project; identify N requirement item tags in the second requirement document, where N is a positive integer; generate a temporary test project based on the N requirement item tags, perform tests on the temporary test project, and obtain test results, wherein the temporary test results include a lifecycle; and store the test results and the corresponding N requirement item tags in the temporary test result library.
[0084] According to an embodiment of this application, the test result library establishment module is specifically used to obtain a preset list of requirement item tags; and to match N requirement item tags of the second requirement document based on the preset list of requirement item tags.
[0085] According to an embodiment of this application, the matching module is specifically used to perform matching on temporary test items in the preset temporary test result library based on the first requirement document and through the requirement item tags to obtain L matching degrees, where L is a positive integer; and to select the temporary test results corresponding to the W temporary test items among the L matching degrees, where W is a positive integer.
[0086] According to an embodiment of this application, the matching degree includes: the number of requirement item tags that are successfully matched by the temporary test project, or the matching degree includes: a comprehensive value obtained by weighted summation of the requirement item tags that are successfully matched by the temporary test project.
[0087] According to an embodiment of this application, the device further includes: a lifecycle termination module, used to terminate the lifecycle of temporary test results in the preset temporary test result library based on the formal test identifier.
[0088] According to an embodiment of this application, after receiving the formal test identifier and the first requirement document of the formal test project, the method further includes: identifying Q requirement item tags in the first requirement document, where Q is a positive integer, in the case that no temporary test result is matched in the preset temporary test result library based on the first requirement document; and creating a formal test project based on the Q requirement item tags of the formal test identifier and the formal test identifier.
[0089] According to embodiments of this application, any plurality of modules among the receiving module 310, matching module 320, and project creation module 330 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules can be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the receiving module 310, matching module 320, and project creation module 330 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the receiving module 310, matching module 320, and project creation module 330 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0090] Figure 4 A block diagram schematically illustrates an electronic device suitable for implementing a test item generation method according to an embodiment of this application.
[0091] like Figure 4 As shown, an electronic device 900 according to an embodiment of this application includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0092] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 902 and / or RAM 903. It should be noted that the programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0093] According to embodiments of this application, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.
[0094] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0095] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903 described above.
[0096] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.
[0097] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0098] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0099] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0100] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0101] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0102] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for generating test items, characterized in that, The method includes: Receive the official test identifier and first requirements document for the formal test project; Based on the first requirement document, temporary test items in a preset temporary test result library are matched to obtain temporary test results. The temporary test items in the temporary test results include requirement item tags. Matching the temporary test items in the preset temporary test result library based on the first requirement document includes matching the temporary test items based on the requirement item tags from the first requirement document. A formal test project is created based on the formal test identifier and the temporary test results.
2. The method according to claim 1, characterized in that, The method for establishing the preset temporary test result library includes: Receive the second requirements document for the temporary test project; Identify the N requirement item tags in the second requirement document, where N is a positive integer; Temporary test projects are generated based on the N requirement item tags. After performing tests on these temporary test projects, test results are obtained, including the lifecycle of the temporary test results. The test results and the corresponding N requirement item tags are stored in the temporary test result library.
3. The method according to claim 2, characterized in that, The identification of the N requirement item tags in the second requirement document includes: Get the pre-defined list of required item tags; and Match the N requirement item tags of the second requirement document based on the preset requirement item tag list.
4. The method according to claim 2, characterized in that, The process of obtaining temporary test results by matching temporary test items from a preset temporary test result library based on the first requirement document includes: Based on the first requirement document, the temporary test items in the preset temporary test result library are matched using the requirement item tags to obtain L matching degrees, where L is a positive integer; and Select the temporary test results corresponding to the W temporary test items among the L matching degrees, where W is a positive integer.
5. The method according to claim 4, characterized in that, The matching degree includes: the number of requirement item tags that are successfully matched by the temporary test project, or the matching degree includes: a comprehensive value obtained by weighted summation of the requirement item tags that are successfully matched by the temporary test project.
6. The method according to claim 2, characterized in that, The method further includes: The lifecycle of temporary test results in the preset temporary test result library ends based on the formal test identifier.
7. The method according to claim 2, characterized in that, After receiving the formal test identifier and the first requirements document for the formal test project, the following is also included: If no temporary test result is found in the preset temporary test result library based on the first requirement document, identify Q requirement item tags in the first requirement document, where Q is a positive integer; and A formal test project is created based on the Q requirement item tags of the formal test identifier and the formal test identifier.
8. A test item generation device, characterized in that, The device includes: The receiving module is used to receive the official test identifier and the first requirement document of the formal test project. A matching module is used to match temporary test items in a preset temporary test result library based on the first requirement document to obtain temporary test results. The temporary test items in the temporary test results include requirement item tags, and matching the temporary test items in the preset temporary test result library based on the first requirement document includes matching the temporary test items based on the requirement item tags from the first requirement document. The project creation module is used to create a formal test project based on the formal test identifier and the temporary test results.
9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.