Test case push methods, devices, storage media and electronic devices
By generating and expanding the test specification list, the problem of low test quality caused by incomplete test specifications was solved, and higher quality test cases were delivered.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2022-07-29
- Publication Date
- 2026-06-30
AI Technical Summary
The current test cases lack complete test specifications, resulting in low product test quality.
By identifying the target test specification library, a list of target test specifications corresponding to the current requirements information of the target product is generated. The target test specification number is then matched with the test specification number in the initial case name. If they do not match, the initial test specification list in the initial test case is expanded based on the target test specification number to obtain the expanded test specification list, which is then pushed to the program project.
This improved the quality of product testing and ensured the completeness and accuracy of testing specifications.
Smart Images

Figure CN115129613B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a method, apparatus, storage medium, and electronic device for pushing test cases. Background Technology
[0002] During the generation of test cases for current product requirements, text mining is used to filter out useless information from complex text and select useful data to generate test specifications for the test cases. However, the supplementary test specifications in the current test cases are not complete enough. This can lead to errors during the testing process, thus affecting the test quality of the product.
[0003] There is currently no effective solution to the problem of incomplete testing specifications in related technologies, which leads to low product testing quality. Summary of the Invention
[0004] The main purpose of this application is to provide a method, device, storage medium, and electronic device for pushing test cases, so as to solve the problem that the test specifications in related technologies are not complete, resulting in low test quality of products.
[0005] To achieve the above objectives, according to one aspect of this application, a method for pushing test cases is provided. The method includes: determining a target test specification library; generating a target test specification list corresponding to the current requirements information of a target product based on the target test specification library, wherein the target test specification list includes at least: a target test specification number; matching the target test specification number with the test specification number in the initial case name to obtain a matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirements information; if the matching result indicates that the target test specification number and the test specification number do not match, then expanding the initial test specification list in the initial test case based on the target test specification number to obtain an expanded test specification list; and pushing the expanded test specification list to the program project, wherein the program project is used to perform tests based on the expanded test specification list.
[0006] Furthermore, determining the target test specification library includes: obtaining historical software information of the target product, wherein the historical software information includes at least: historical requirements information of the target product and historical software defect information associated with the target product; and generating the target test specification library based on the historical software information.
[0007] Furthermore, generating a target test specification list corresponding to the current requirements information of the target product based on the target test specification library includes: obtaining the historical requirement names and historical requirement content from the historical requirement information; using the name that appears most frequently in the historical requirement names as the first test keyword; and using the content that appears most frequently in the historical requirement content as the key test content; determining the target requirement names from the historical software defect information; using the name that appears most frequently in the target requirement names as the second test keyword; and determining the target defect information content from the historical software defect information; adding the defect information content that appears most frequently in the target defect information content to the defect information test phrase; and generating a target test specification list based on the first test keyword, the second test keyword, the key test content, and the defect information test phrase.
[0008] Furthermore, before matching the target test specification number with the test specification number in the initial case name to obtain the matching result, the method also includes: creating a program project based on the current requirements information; obtaining the name of the initial test case in the program project; and using the name of the initial test case as the initial case name.
[0009] Furthermore, the initial test specification list in the initial test cases is expanded based on the target test specification number to obtain the expanded test specification list, which includes: if there is a preset test specification number in the target test specification number and there is no preset test specification number in the test specification number, a preset test specification is generated based on the preset test specification number; the initial test specification list is expanded based on the preset test specification to obtain the expanded test specification list.
[0010] Furthermore, after expanding the initial test specification list in the initial test cases based on the target test specification number to obtain the expanded test specification list, the method further includes: obtaining the preset test specification number in the expanded test specification list; importing the preset test specification number into the initial case name to update the initial case name and obtain the updated case name.
[0011] Furthermore, after updating the initial case name to obtain the updated case name, the method also includes: obtaining the test specification number in the updated case; matching the target test specification number with the test specification number in the updated case name to obtain the updated matching result.
[0012] To achieve the above objectives, according to another aspect of this application, a test case push device is provided. The device includes: a first determining unit for determining a target test specification library; a generating unit for generating a target test specification list corresponding to the current requirement information of a target product based on the target test specification library, wherein the target test specification list includes at least: a target test specification number; a first matching unit for matching the target test specification number with the test specification number in the initial case name to obtain a matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirement information; an expanding unit for expanding the initial test specification list in the initial test case based on the target test specification number if the matching result indicates that the target test specification number and the test specification number do not match, to obtain an expanded test specification list; and a push unit for pushing the expanded test specification list to the program project, wherein the program project performs tests based on the expanded test specification list.
[0013] This application employs the following steps: determining a target test specification library; generating a target test specification list corresponding to the current requirements information of the target product based on the target test specification library, wherein the target test specification list includes at least: a target test specification number; matching the target test specification number with the test specification number in the initial case name to obtain a matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirements information; if the matching result indicates that the target test specification number and the test specification number do not match, then expanding the initial test specification list in the initial test case based on the target test specification number to obtain an expanded test specification list; pushing the expanded test specification list to the program project, wherein the program project is used to perform tests based on the expanded test specification list. This application solves the problem in related technologies where incomplete test specifications lead to low product test quality. By matching the target test specification number with the test specification number in the initial case name and supplementing the test specification list based on the matching result, the effect of improving product test quality is achieved. Attached Figure Description
[0014] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0015] Figure 1 This is a flowchart of the test case push method provided in the embodiments of this application;
[0016] Figure 2 This is a system operation flowchart of the test case push method provided in the embodiments of this application;
[0017] Figure 3 This is a schematic diagram of a test case push device provided according to an embodiment of this application. Figure 1 ;
[0018] Figure 4 This is a schematic diagram of a test case push device provided according to an embodiment of this application. Figure 2 ;
[0019] Figure 5 This is a schematic diagram of an asset library unit provided according to an embodiment of this application;
[0020] Figure 6 This is a schematic diagram of a demand scanning unit provided according to an embodiment of this application;
[0021] Figure 7 This is a schematic diagram of the case scanning unit provided in the embodiments of this application;
[0022] Figure 8 This is a schematic diagram of an inspection unit provided according to an embodiment of this application;
[0023] Figure 9 This is a schematic diagram of a push unit provided according to an embodiment of this application;
[0024] Figure 10 This is a schematic diagram of a push electronic device based on a test case provided in the embodiments of this application. Detailed Implementation
[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0029] Text mining is the process of extracting potential, interesting patterns or knowledge from unstructured text information. It can be seen as an extension of data mining or knowledge discovery in databases. Text mining is primarily based on mathematical statistics and computational linguistics, enabling computers to discover patterns in the occurrence of certain words and the connections between words and semantics and grammar. Text mining involves multiple disciplines, such as information retrieval, text analysis, and information extraction.
[0030] Test cases, also known as test scenarios, describe the testing tasks performed on a specific software product, reflecting the test plan, methods, techniques, and strategies. They include test objectives, test environment, input data, test steps, expected results, test scripts, etc., and are documented.
[0031] Software defects are problems, errors, or hidden functional flaws in computer software or programs that impair their normal operation. From an internal product perspective, defects are various errors, malfunctions, or other problems that exist during the development or maintenance of the software product; from an external product perspective, defects are the failure or violation of a certain function that the system is required to perform.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0033] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of the test case push method provided in the embodiments of this application, such as... Figure 1 As shown, the method includes the following steps:
[0034] Step S101: Determine the target test specification library.
[0035] Specifically, such as Figure 2 As shown, the system contains information on the product's historical requirements and software defects, including requirement names, requirement descriptions, problem names, related requirement names, and problem descriptions. Based on this information, the test specification asset library is determined as the target test specification library in this application.
[0036] Optionally, in the test case push method provided in the embodiments of this application, determining the target test specification library includes: obtaining historical software information of the target product, wherein the historical software information includes at least: historical requirement information of the target product and historical software defect information associated with the target product; and generating the target test specification library based on the historical software information.
[0037] It should be noted that the historical software information of the target product in this application is also... Figure 2 The historical requirements and historical software defects of the products in the database are used to generate a test specification asset library (corresponding to the target test specification library in this application, hereinafter the same). By defining the test specification asset library, the efficiency of generating subsequent test case templates is improved.
[0038] Step S102: Generate a target test specification list corresponding to the current requirements information of the target product based on the target test specification library. The target test specification list shall include at least the target test specification number.
[0039] For example, if the current demand information for the target product is determined, such as Figure 2 As shown, after generating the target test specification library, the target test specification list corresponding to the current requirements information of the target product can be determined based on the target test specification library, forming a case specification template, which serves as the basis for intelligent push and subsequent test case comparison.
[0040] Optionally, in the test case push method provided in this application embodiment, generating the target test specification list corresponding to the current requirement information of the target product based on the target test specification library includes: obtaining the historical requirement name and historical requirement content from the historical requirement information; using the name that appears most frequently in the historical requirement name as the first test keyword; and using the content that appears most frequently in the historical requirement content as the key test content; determining the target requirement name from the historical software defect information; using the name that appears most frequently in the target requirement name as the second test keyword; and determining the target defect information content from the historical software defect information; adding the defect information content that appears most frequently in the target defect information content to the defect information test phrase; and generating the target test specification list based on the first test keyword, the second test keyword, the key test content, and the defect information test phrase.
[0041] Specifically, the historical requirement information of the target product is scanned, and frequently occurring words in the requirement names (corresponding to the first frequency in this application) are extracted as keywords (corresponding to the first test keywords in this application). Frequently occurring word combinations in the relevant requirement descriptions (corresponding to the historical requirement content in this application) are extracted as test key points (corresponding to the key test content in this application). The historical software defects of the product are scanned, and frequently occurring words in the requirement names associated with the software defects (corresponding to the third frequency in this application) are extracted as keywords (corresponding to the second test keywords in this application). Frequently occurring word combinations in the relevant problem descriptions (corresponding to the third frequency in this application) are extracted and added to the defect information test phrases. By determining the first test keywords, the second test keywords, the key test content, and the defect information test phrases, this application makes the generated target test specification list more comprehensive.
[0042] For example, if the target test specification library contains 200 test specification lists, and the current product requirement is a batch loading test requirement, the name keywords (first test keywords) in the batch loading test requirement name are obtained based on the historical requirement names. For example, special character names in the batch loading test requirement name. Key requirement descriptions from the historical requirement content of the batch loading test requirement are used as key test content. Keywords from the historical software defect information of the batch loading test requirement are extracted as second test keywords. Key requirement descriptions from the historical defect information of the batch loading test requirement are added to the defect information test phrase. The first test keyword, second test keyword, and key... The test content and defect information test phrases are matched with the name information, requirement description information, and historical defect information stored in the 200 test specification lists in the target test specification library to obtain the 30 test specification lists required for the current batch loading requirement. Based on these 30 test specification lists, a target test specification list corresponding to the current batch loading requirement is generated. For example, the target test specification list for the current batch loading requirement may include: a list of test specification numbers for the batch loading requirement, a list of test objects for the batch loading requirement, a list of test concerns for the batch loading requirement, a list of test methods for the batch loading requirement, a list of test steps for the batch loading requirement, and a list of overdue results for the batch loading requirement. It should be noted that the above-mentioned requirement descriptions can be differentiated from dimensions such as functional testing, performance testing, interface testing, security testing, and compatibility testing of the target product, thereby determining the key test points under different dimensions, making the generated target test specification list more comprehensive.
[0043] Step S103: Match the target test specification number with the test specification number in the initial case name to obtain the matching result. The initial case name is the name of the initial test case of the program project associated with the current requirement information.
[0044] Specifically, by scanning historical requirements information and historical software defects, a list of target test specifications is formed. The list of target test specifications includes test specification number (i.e., the target test specification number in this application), and may also include: test objects and test focus points, which are supplemented by test experts with classification, test focus points, test methods, test steps and overdue results.
[0045] To compare the test specification numbers in the target test specification list with those in the initial case names, after collecting the current requirements information of the target product, it is necessary to create the program project corresponding to the current requirements information and obtain the initial case names.
[0046] Optionally, in the test case push method provided in the embodiments of this application, before matching the target test specification number with the test specification number in the initial case name to obtain the matching result, the method further includes: creating a program project based on the current requirement information; obtaining the name of the initial test case in the program project; and using the name of the initial test case as the initial case name.
[0047] For example, when a target product adds a functional requirement, an initial test case corresponding to the functional requirement is generated by creating a program project and obtaining the name of the initial test case, which includes the initial test specification number.
[0048] For example, if the target product adds functional requirements, the target test specification number in the target test specification list generated in the target test specification library can be matched with the initial test specification number mentioned above. Based on the matching result, it is possible to verify whether the functional requirements in the initial test cases are complete, which helps to improve the quality of the test cases.
[0049] Step S104: If the matching result indicates that the target test specification number does not match the test specification number, then the initial test specification list in the initial test case is expanded based on the target test specification number to obtain the expanded test specification list.
[0050] For example, if the target product adds functional requirements, the test specification number can be compared and matched using the above steps. If the matching result is a mismatch, it proves that the initial test cases are not sufficient to supplement the current requirements of the target product, and the test specifications still need to be expanded.
[0051] Optionally, in the test case push method provided in this application embodiment, expanding the initial test specification list in the initial test case based on the target test specification number to obtain the expanded test specification list includes: if there is a preset test specification number in the target test specification number and there is no preset test specification number in the test specification number, generating a preset test specification based on the preset test specification number; expanding the initial test specification list based on the preset test specification to obtain the expanded test specification list.
[0052] For example, if the target test specification numbers include number 1, number 2, number 3, and number 4, and the initial test cases also include number 1, number 2, and number 3, meaning number 4 is the preset test specification number, then the system will search for the requirement description corresponding to number 4 in the target test specification library. Based on this requirement description, the system will generate the test specification corresponding to number 4 in the program project. For example, this test specification could be the newline character content in a batch-loaded character test requirement. The system will then expand the initial test specification list based on this test specification, further improving the quality of subsequent test cases.
[0053] Optionally, in the test case push method provided in the embodiments of this application, after expanding the initial test specification list in the initial test case based on the target test specification number to obtain the expanded test specification list, the method further includes: obtaining the preset test specification number in the expanded test specification list; importing the preset test specification number into the initial case name to update the initial case name to obtain the updated case name.
[0054] Specifically, this application imports the preset test specification number into the initial case name to update the initial case name and obtain the updated case name. By directly searching the case name, the subsequent comparison and matching of test specification numbers becomes more efficient and convenient.
[0055] Optionally, in the test case push method provided in the embodiments of this application, after updating the initial case name to obtain the updated case name, the method further includes: obtaining the test specification number in the updated case; matching the target test specification number with the test specification number in the updated case name to obtain the updated matching result.
[0056] In other words, as can be seen from the above steps, the target test specification number is matched with the test specification number in the updated case name. If the test case corresponding to the updated case name still cannot meet the test specification required by the current requirements of the target product, the above steps S101-S104 are repeated until the test specification number required by the current requirements matches the test specification number in the updated case name under the repeated steps, which effectively improves the quality of test cases.
[0057] Step S105: Push the expanded test specification list to the program project, whereby the program project is used to perform tests based on the expanded test specification list.
[0058] Specifically, the system intelligently pushes a complete list of test specifications, including the test specification number, test objects, test focus, test methods, test steps, and overdue results, to the program project, so that high-quality testing can be carried out on the test cases required for the current requirements.
[0059] In summary, the test case push method provided in this application's embodiments involves: determining a target test specification library; generating a target test specification list corresponding to the current requirement information of the target product based on the target test specification library, wherein the target test specification list includes at least: a target test specification number; matching the target test specification number with the test specification number in the initial case name to obtain a matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirement information; if the matching result indicates that the target test specification number and the test specification number do not match, then expanding the initial test specification list in the initial test case based on the target test specification number to obtain an expanded test specification list; and pushing the expanded test specification list to the program project, wherein the program project is used to perform tests based on the expanded test specification list. This application solves the problem in related technologies where incomplete test specifications lead to low product test quality. By matching the target test specification number with the test specification number in the initial case name and supplementing the test specification list based on the matching result, the effect of improving product test quality is achieved.
[0060] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0061] This application also provides a test case push device. It should be noted that the test case push device of this application can be used to execute the test case push method provided in this application. The test case push device provided in this application is described below.
[0062] Figure 3 This is a schematic diagram of a test case push device according to an embodiment of this application. Figure 1 .like Figure 3 As shown, the device includes: a first determining unit 301, a generating unit 302, a first matching unit 303, an expanding unit 304, and a pushing unit 305.
[0063] Specifically, the first determining unit 301 is used to determine the target test specification library;
[0064] The generation unit 302 is used to generate a target test specification list corresponding to the current requirement information of the target product based on the target test specification library. The target test specification list includes at least the target test specification number.
[0065] The first matching unit 303 is used to match the target test specification number with the test specification number in the initial case name to obtain the matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirement information;
[0066] The expansion unit 304 is used to expand the initial test specification list in the initial test case based on the target test specification number if the matching result indicates that the target test specification number does not match the test specification number, so as to obtain the expanded test specification list.
[0067] Push unit 305 is used to push the expanded test specification list to the program project, whereby the program project performs tests based on the expanded test specification list.
[0068] In summary, the test case push device provided in this application embodiment determines the target test specification library through a first determining unit 301; a generating unit 302 generates a target test specification list corresponding to the current requirement information of the target product based on the target test specification library, wherein the target test specification list includes at least a target test specification number; a first matching unit 303 matches the target test specification number with the test specification number in the initial case name to obtain a matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirement information; if the matching result indicates that the target test specification number and the test specification number do not match, the expansion unit 304 expands the initial test specification list in the initial test case based on the target test specification number to obtain an expanded test specification list; and a push unit 305 pushes the expanded test specification list to the program project, wherein the program project is used to perform tests based on the expanded test specification list, thereby solving the problem in related technologies where incomplete test specifications lead to low product test quality. By matching the target test specification number with the test specification number in the initial case name and supplementing the test specification list based on the matching result, the effect of improving the product test quality is achieved.
[0069] Optionally, in the test case push device provided in the embodiments of this application, the first determining unit includes: a first acquiring module, used to acquire historical software information of the target product, wherein the historical software information includes at least: historical requirement information of the target product and historical software defect information associated with the target product; and a first generating module, used to generate a target test specification library based on the historical software information.
[0070] Optionally, in the test case push device provided in this application embodiment, the generation unit includes: a second acquisition module, used to acquire the historical requirement name and historical requirement content from the historical requirement information, use the name that appears most frequently in the historical requirement name as the first test keyword, and use the content that appears most frequently in the historical requirement content as the key test content; a determination module, used to determine the target requirement name from the historical software defect information, use the name that appears most frequently in the target requirement name as the second test keyword, and determine the target defect information content from the historical software defect information, add the defect information content that appears most frequently in the target defect information content to the defect information test phrase; and a second generation module, used to generate a target test specification list based on the first test keyword, the second test keyword, the key test content, and the defect information test phrase.
[0071] Optionally, in the test case push device provided in the embodiments of this application, the device further includes: a creation unit, used to create a program project based on current requirement information before matching the target test specification number with the test specification number in the initial case name to obtain the matching result; a first acquisition unit, used to acquire the name of the initial test case in the program project; and a second determination unit, used to use the name of the initial test case as the initial case name.
[0072] Optionally, in the test case push device provided in the embodiments of this application, the expansion unit includes: a third generation module, used to generate a preset test specification according to the preset test specification number if there is a preset test specification number in the target test specification number and there is no preset test specification number in the test specification number; and an expansion module, used to expand the initial test specification list according to the preset test specification to obtain an expanded test specification list.
[0073] Optionally, in the test case push device provided in the embodiments of this application, the device further includes: a second acquisition unit, used to expand the initial test specification list in the initial test case based on the target test specification number to obtain the expanded test specification list, and then acquire the preset test specification number in the expanded test specification list; and an update unit, used to import the preset test specification number into the initial case name to update the initial case name and obtain the updated case name.
[0074] Optionally, in the test case push device provided in the embodiments of this application, the device further includes: a third acquisition unit, used to acquire the test specification number in the updated case after updating the initial case name to obtain the updated case name; and a second matching unit, used to match the target test specification number with the test specification number in the updated case name to obtain the updated matching result.
[0075] Optionally, Figure 4 This is a schematic diagram of a test case push device provided according to an embodiment of this application. Figure 2 ,like Figure 4As shown, the system includes an asset library unit 1, a requirements scanning unit 2, a test case scanning unit 3, a verification unit 4, and an intelligent push unit 5. Specifically, the asset library unit 1 scans historical requirements and software defects of relevant products to create a test specification asset library, serving as the basis for supplementing test cases; the requirements scanning unit 2 scans current product requirements to create test case specification templates, serving as the basis for intelligent push and test case comparison; the test case scanning unit 3 scans whether the current test case names include test specification numbers to create a list of designed test specifications, serving as the comparison object; the verification unit 4 verifies whether the test case templates from the requirements scanning unit 3 are fully included in the requirements scanning unit 2, creating a supplementary test specification list; and the intelligent push unit 5 intelligently pushes test case designs to test case designers based on the test case specification templates from the requirements scanning unit 2 and the supplementary test specification list from the verification unit 4, supplementing relevant test cases.
[0076] Optionally, Figure 5 This is a schematic diagram of an asset storage unit provided according to an embodiment of this application, such as... Figure 5 As shown, Asset Library Unit 1 consists of a historical requirements module, a software defect module, and a test specification module.
[0077] Optionally, Figure 6 This is a schematic diagram of a demand scanning unit provided according to an embodiment of this application, such as... Figure 6 As shown, the requirement scanning unit 2 consists of a requirement loading module, a requirement scanning module, and a requirement-associated test specification query module. The requirement loading module loads the requirement names and descriptions of the current version in batches every day as the objects to be scanned. The requirement scanning module scans the loaded requirement names and descriptions and associates them with the test specification list based on the asset library. The requirement-associated test specification query module allows users to query the test specification list on the front end.
[0078] Optionally, Figure 7 This is a schematic diagram of the case scanning unit provided in the embodiments of this application, such as... Figure 7 As shown, Case Scanning Unit 3 consists of a Case Loading Module, a Case Scanning Module, and a Case-Associated Test Specification Query Module. The Case Loading Module loads the names of the current version of the cases in batches every day as the objects to be scanned. The Case Scanning Module scans whether the loaded case names include test specification numbers to form a list of associated test specifications. The Case-Associated Test Specification Query Module allows users to query the list of test specifications associated with cases on the front end.
[0079] Optionally, Figure 8 This is a schematic diagram of the inspection unit provided according to an embodiment of this application, as shown below. Figure 8As shown, the inspector 4 consists of a requirement scan result loading module, a case scan result loading module, a comparison module, and an inspection result query module. Specifically, the requirement scan result loading module loads the case names of the current version daily in batches, serving as the basis for comparison; the case scan result loading module checks whether the case names of the current version include test specification numbers, using this as the comparison object; the comparison module compares the requirement scan results and the case scan results to generate a list of test specifications to be supplemented; and the inspection result query module allows users to query the inspection results on the front end.
[0080] Optionally, Figure 9 This is a schematic diagram of the push unit provided according to an embodiment of this application, such as... Figure 9 As shown, the intelligent push unit 5 consists of a push module and a push result query module. The push module loads the names of the current version of the cases daily in batches as the objects to be scanned. The push result query module allows users to push results on the front end.
[0081] The test case push device includes a processor and a memory. The first determining unit 301, generating unit 302, first matching unit 303, expanding unit 304, and pushing unit 305 are all stored in the memory as program units. The processor executes the program units stored in the memory to achieve the corresponding functions.
[0082] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and test cases can be pushed by adjusting kernel parameters.
[0083] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0084] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements a method for pushing test cases.
[0085] This invention provides a processor for running a program, wherein the program executes a method for pushing test cases during runtime.
[0086] like Figure 10As shown, this embodiment of the invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: determining a target test specification library; generating a target test specification list corresponding to the current requirement information of the target product based on the target test specification library, wherein the target test specification list includes at least: a target test specification number; matching the target test specification number with the test specification number in the initial case name to obtain a matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirement information; if the matching result indicates that the target test specification number and the test specification number do not match, then expanding the initial test specification list in the initial test case based on the target test specification number to obtain an expanded test specification list; pushing the expanded test specification list to the program project, wherein the program project is used to perform tests based on the expanded test specification list.
[0087] When the processor executes the program, it also performs the following steps: obtaining historical software information of the target product, wherein the historical software information includes at least: historical requirements information of the target product and historical software defect information associated with the target product; and generating a target test specification library based on the historical software information.
[0088] When the processor executes the program, it also performs the following steps: obtaining the historical requirement names and historical requirement contents from the historical requirement information; using the name that appears most frequently in the historical requirement names as the first test keyword; and using the content that appears most frequently in the historical requirement contents as the key test content; determining the target requirement names from the historical software defect information; using the name that appears most frequently in the target requirement names as the second test keyword; and determining the target defect information content from the historical software defect information; adding the defect information content that appears most frequently in the target defect information content to the defect information test phrase; and generating a target test specification list based on the first test keyword, the second test keyword, the key test content, and the defect information test phrase.
[0089] When the processor executes the program, it also performs the following steps: before matching the target test specification number with the test specification number in the initial case name and obtaining the matching result, it creates a program project based on the current requirement information; obtains the name of the initial test case in the program project; and uses the name of the initial test case as the initial case name.
[0090] When the processor executes the program, it also performs the following steps: if there is a preset test specification number in the target test specification number and there is no preset test specification number in the test specification number, a preset test specification is generated according to the preset test specification number; the initial test specification list is expanded according to the preset test specification to obtain an expanded test specification list.
[0091] When the processor executes the program, it also performs the following steps: after expanding the initial test specification list in the initial test case based on the target test specification number to obtain the expanded test specification list, it obtains the preset test specification number in the expanded test specification list; and imports the preset test specification number into the initial case name to update the initial case name to obtain the updated case name.
[0092] When the processor executes the program, it also performs the following steps: after updating the initial case name to obtain the updated case name, it obtains the test specification number in the updated case; and matches the target test specification number with the test specification number in the updated case name to obtain the updated matching result.
[0093] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0094] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: determining a target test specification library; generating a target test specification list corresponding to the current requirement information of the target product based on the target test specification library, wherein the target test specification list includes at least: a target test specification number; matching the target test specification number with the test specification number in the initial case name to obtain a matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirement information; if the matching result indicates that the target test specification number and the test specification number do not match, expanding the initial test specification list in the initial test case based on the target test specification number to obtain an expanded test specification list; and pushing the expanded test specification list to the program project, wherein the program project is used to perform tests based on the expanded test specification list.
[0095] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: obtaining historical software information of the target product, wherein the historical software information includes at least: historical requirements information of the target product and historical software defect information associated with the target product; and generating a target test specification library based on the historical software information.
[0096] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: obtaining the historical requirement names and historical requirement contents from historical requirement information; using the name that appears most frequently in the historical requirement names as the first test keyword; and using the content that appears most frequently in the historical requirement contents as the key test content; determining the target requirement names from historical software defect information; using the name that appears most frequently in the target requirement names as the second test keyword; and determining the target defect information content from historical software defect information; adding the defect information content that appears most frequently in the target defect information content to the defect information test phrase; and generating a target test specification list based on the first test keyword, the second test keyword, the key test content, and the defect information test phrase.
[0097] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: before matching the target test specification number with the test specification number in the initial case name and obtaining the matching result, create a program project based on the current requirements information; obtain the name of the initial test case in the program project; and use the name of the initial test case as the initial case name.
[0098] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: if a preset test specification number exists in the target test specification number and a preset test specification number does not exist in the test specification number, generate a preset test specification based on the preset test specification number; expand the initial test specification list based on the preset test specification to obtain an expanded test specification list.
[0099] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: after expanding the initial test specification list in the initial test cases based on the target test specification number to obtain the expanded test specification list, obtain the preset test specification number in the expanded test specification list; import the preset test specification number into the initial case name to update the initial case name to obtain the updated case name.
[0100] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: after updating the initial case name to obtain the updated case name, obtain the test specification number in the updated case; match the target test specification number with the test specification number in the updated case name to obtain the updated matching result.
[0101] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0105] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0106] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0107] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0108] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0109] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0110] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for pushing test cases, characterized in that, include: Determining the target test specification library includes: acquiring historical software information of the target product, wherein the historical software information includes at least: historical requirement information of the target product and historical software defect information associated with the target product; and generating the target test specification library based on the historical software information. Generating a target test specification list corresponding to the current requirement information of the target product based on the target test specification library includes: obtaining the historical requirement name and historical requirement content from the historical requirement information; using the name that appears most frequently in the historical requirement name as the first test keyword; and using the content that appears most frequently in the historical requirement content as the key test content; determining the target requirement name from the historical software defect information; using the name that appears most frequently in the target requirement name as the second test keyword; and determining the target defect information content from the historical software defect information; adding the defect information content that appears most frequently in the target defect information content to the defect information test phrase; and generating the target test specification list based on the first test keyword, the second test keyword, the key test content, and the defect information test phrase, wherein the target test specification list includes at least: a target test specification number; The target test specification number is matched with the test specification number in the initial case name to obtain the matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirement information; If the matching result indicates that the target test specification number does not match the test specification number, then the initial test specification list in the initial test case is expanded based on the target test specification number to obtain an expanded test specification list; The expanded test specification list is pushed to the program project, wherein the program project is used to perform tests according to the expanded test specification list.
2. The method according to claim 1, characterized in that, Before matching the target test specification number with the test specification number in the initial case name to obtain the matching result, the method further includes: Create the program project based on the current requirements information; Obtain the name of the initial test case in the program project; The name of the initial test case shall be used as the initial case name.
3. The method according to claim 1, characterized in that, Based on the target test specification number, the initial test specification list in the initial test case is expanded to obtain the expanded test specification list, which includes: If a preset test specification number exists in the target test specification number, and the preset test specification number does not exist in the test specification number, a preset test specification is generated based on the preset test specification number. The initial test specification list is expanded according to the preset test specifications to obtain the expanded test specification list.
4. The method according to claim 3, characterized in that, After expanding the initial test specification list in the initial test cases based on the target test specification number to obtain an expanded test specification list, the method further includes: Obtain the preset test specification number from the expanded test specification list; The preset test specification number is imported into the initial case name to update the initial case name, resulting in the updated case name.
5. The method according to claim 4, characterized in that, After updating the initial case name to obtain the updated case name, the method further includes: Obtain the test specification number from the updated case; The target test specification number is matched with the test specification number in the updated case name to obtain the updated matching result.
6. A test case push device, characterized in that, include: The first determining unit is used to determine the target test specification library; The first determining unit includes: a first acquisition module, configured to acquire historical software information of the target product, wherein the historical software information includes at least: historical requirement information of the target product and historical software defect information associated with the target product; and a first generation module, configured to generate a target test specification library based on the historical software information. The generation unit is used to generate a target test specification list corresponding to the current requirement information of the target product based on the target test specification library, wherein the target test specification list includes at least: the target test specification number; The generation unit includes: a second acquisition module, configured to acquire historical requirement names and historical requirement content from the historical requirement information, using names that appear a first frequency from the historical requirement names as first test keywords, and using content that appears a second frequency from the historical requirement content as key test content; a determination module, configured to determine target requirement names from the historical software defect information, using names that appear a third frequency from the target requirement names as second test keywords, and determining target defect information content from the historical software defect information, adding defect information content that appears a fourth frequency from the target defect information content to defect information test phrases; and a second generation module, configured to generate the target test specification list based on the first test keywords, the second test keywords, the key test content, and the defect information test phrases. The first matching unit is used to match the target test specification number with the test specification number in the initial case name to obtain a matching result, wherein the initial case name is the name of the initial test case of the program project associated with the current requirement information; An expansion unit is configured to expand the initial test specification list in the initial test case based on the target test specification number if the matching result indicates that the target test specification number does not match the test specification number, thereby obtaining an expanded test specification list. The push unit is used to push the expanded test specification list to the program project, wherein the program project is used to perform tests according to the expanded test specification list.
7. A computer-readable storage medium, characterized in that, The storage medium stores a program, wherein the program executes the method described in any one of claims 1 to 5.
8. An electronic device, characterized in that, The method includes one or more processors and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of any one of claims 1 to 5.