Method, system, device and medium for selecting test cases based on software testing strategy

By developing test strategy templates based on test quality levels and the impact of functional features, test cases are automatically selected, solving the problems of time consumption and omissions caused by manual selection, and achieving efficient and accurate software testing.

CN117194244BActive Publication Date: 2026-11-24CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311151544.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-07
Publication Date
2026-11-24
Estimated Expiration
2043-09-07

AI Technical Summary

Technical Problem

Current software testing relies on manually developing testing strategies, which leads to long testing times, numerous omissions, and insufficient test coverage, affecting software product quality and release schedules.

Method used

Based on the pre-determined or real-time test quality level and the degree of impact of functional characteristics, an overall test strategy and execution strategy are formulated. Test strategy templates are generated by combining and arranging these strategies, and test cases are automatically selected.

Benefits of technology

Quickly and accurately determine the scope of test cases to avoid time-consuming and omission-prone selections, ensure sufficient test coverage, and prevent quality issues and release delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117194244B_ABST
    Figure CN117194244B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, device, and medium for selecting test cases based on software testing strategies. It combines an overall testing strategy and a test execution strategy to form test execution strategies for each module and its features. Testers can then view and execute the corresponding test cases based on the obtained test execution strategies. This allows for the rapid and accurate determination of the range of test cases required for a version, avoiding the time-consuming and incomplete selection of test cases that can lead to insufficient test coverage, quality issues, and product release delays. Essentially, this invention can associate version changes, the overall testing strategy, the test execution strategy, the test case library, and functional features, thereby automatically obtaining test cases corresponding to the testing strategies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, and specifically to a method, system, device, and medium for selecting test cases based on software testing strategies. Background Technology

[0002] Currently, the software testing industry is developing rapidly. Not only is the number of software testing engineers increasing daily, but various software testing-related technologies are also emerging in endless streams. Software testing plays an increasingly important role in the software development process and is receiving more and more attention. Software testing engineers are primarily responsible for participating in requirements analysis, writing test cases based on product requirements, selecting test cases and testing tools based on the major changes in the software version after release, executing tests, and providing feedback on the test results.

[0003] Currently, there are numerous tools available for software product functionalities, test case management, and various testing technologies. However, test execution strategies are still largely developed manually by software test engineers. This manual development of test strategies relies on the individual capabilities and experience of the software test engineers. Different test execution strategies directly impact the quality of the software product. For example, manually selecting test cases can easily lead to high time consumption and omissions, as well as insufficient test coverage, resulting in quality issues and delays in software product release. Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, the present invention provides a method, system, device and medium for selecting test cases based on software testing strategies to solve the above technical problems.

[0005] This invention provides a method for selecting test cases based on software testing strategies, comprising the following steps:

[0006] Based on the pre-determined or real-time determined test quality level of the software under test, and the test types that each test quality level needs to cover, an overall test strategy is developed; among them, test cases of different test types are executed for different test quality levels.

[0007] Based on the degree of impact of the functional characteristics in the software under test, the test cases to be executed for each test quality level are prioritized, and a test execution strategy is formulated.

[0008] The overall testing strategy and the test execution strategy are combined and arranged to generate a test strategy template for testing multiple software versions;

[0009] Obtain the version change information of the software under test, and match the corresponding test strategy from the test strategy template based on the version change information as the target test strategy, and select the corresponding test cases according to the target test strategy.

[0010] In one embodiment of the present invention, before combining and arranging the overall testing strategy and the testing execution strategy, the method further includes:

[0011] Each test case in the test case library is marked with a first attribute field; and each functional feature of the software under test in the functional feature library is marked with a second attribute field; and the degree of impact of setting or modifying each functional feature in the functional feature library is determined.

[0012] The first attribute field and the second attribute field are different. The test case library provides multiple test cases. The functional feature library is built based on all the functional features of the software under test.

[0013] In one embodiment of the present invention, the first attribute field includes: the module name corresponding to the test case, the test type defined in the overall test strategy, and the priority defined in the test execution strategy;

[0014] The second attribute field includes: the name of the software module corresponding to the functional feature, and the quality level of the functional feature defined in the overall testing strategy.

[0015] In one embodiment of the present invention, the test quality levels include: fully commercial level, restricted commercial level, demonstration or trial level, and unusable level;

[0016] The types of tests that need to be covered for the fully commercial grade include: functionality, reliability, usability, efficiency, maintainability, and portability.

[0017] The types of tests that need to be covered for the restricted commercial grade include: functionality, reliability, usability, and efficiency.

[0018] The demonstration or trial level needs to cover the following test types: functionality, reliability, and usability.

[0019] In one embodiment of the present invention, the process of prioritizing test cases to be executed for each test quality level based on the degree of influence of functional characteristics in the software under test, and formulating a test execution strategy, includes:

[0020] The degree of influence of functional characteristics in the software under test is identified to obtain the corresponding influence degree identification results. The influence degree identification results include: new functional characteristics that are completely different from functional characteristics, enhancement of original functional characteristics, and no change in original functional characteristics.

[0021] Based on the impact level identification results, the test cases that need to be executed for each test quality level are prioritized, and a test execution strategy is formulated.

[0022] In one embodiment of the present invention, the process of obtaining the version change content of the software under test includes:

[0023] Obtain the functional characteristics of the software under test in the current version, denoted as the current functional characteristics; and,

[0024] Obtain the functional features of the software under test in the previous version and record them as historical functional features;

[0025] The historical functional characteristics are compared with the current functional characteristics, and the functional characteristics that differ from the current functional characteristics are taken as the version change content of the software under test.

[0026] In one embodiment of the present invention, after selecting the corresponding test cases according to the target testing strategy, the method further includes:

[0027] During the development phase, the selected test cases are used to perform unit testing, integration testing, system testing, and / or acceptance testing on the software under test; and

[0028] During the source code review phase, white-box testing, black-box testing, and / or gray-box testing are performed on the software under test using selected test cases; and...

[0029] During the quality attribute testing phase, the selected test cases are used to perform functional testing, performance testing, reliability testing, usability testing, portability testing, and / or maintainability testing on the software under test.

[0030] This invention also provides a system for selecting test cases based on software testing strategies, the system comprising:

[0031] The overall test strategy module is used to generate an overall test strategy based on the test quality level of the software under test, which is determined in advance or in real time, and the test types that need to be covered for each test quality level; different test quality levels execute test cases of different test types.

[0032] The test execution strategy module is used to prioritize the test cases to be executed for each test quality level based on the impact of the functional characteristics in the software under test, and to formulate and generate test execution strategies.

[0033] The test strategy template module is used to combine and arrange the overall test strategy and the test execution strategy to generate a test strategy template for testing multiple software versions.

[0034] The test case selection module is used to obtain the version change content of the software under test, match the corresponding test strategy from the test strategy template based on the version change content as the target test strategy, and select the corresponding test cases according to the target test strategy.

[0035] The present invention also provides a device for selecting test cases based on software testing strategies, the device comprising:

[0036] One or more processors;

[0037] A storage device for storing one or more programs, which, when executed by one or more processors, cause the device to implement the method for selecting test cases based on a software testing strategy as described in any of the preceding descriptions.

[0038] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the method for selecting test cases based on a software testing strategy as described in any of the above-described methods.

[0039] As described above, this invention provides a method, system, device, and medium for selecting test cases based on a software testing strategy, which has the following beneficial effects: Based on the pre-determined or real-time determined test quality level of the software under test, and the test types that each test quality level needs to cover, an overall test strategy is generated; then, according to the impact of the functional characteristics in the software under test, the test cases to be executed for each test quality level are prioritized, and a test execution strategy is generated; the overall test strategy and the test execution strategy are combined and arranged to generate a test strategy template for testing multiple software versions; finally, the version change content of the software under test is obtained, and the corresponding test strategy is matched from the test strategy template based on the version change content as the target test strategy, and the corresponding test cases are selected according to the target test strategy. Different test quality levels execute test cases of different test types. Therefore, this invention forms test execution strategies for each module and characteristic based on the combination of the overall test strategy and the test execution strategy. Testers can view and execute the corresponding test cases according to the obtained test execution strategy, thereby quickly and accurately determining the scope of test cases to be executed for each version, avoiding the time-consuming and omissions caused by manually selecting test cases, which can lead to insufficient test coverage, quality problems, and product release delays. This invention can associate version change content, overall testing strategy, test execution strategy, test case library and functional features, and automatically obtain test cases based on the testing strategy.

[0040] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0042] Figure 1 This is a schematic diagram illustrating an exemplary system architecture for applying the technical solutions in one or more embodiments of the present invention;

[0043] Figure 2 This is a schematic diagram of a method for selecting test cases based on software testing strategies according to an embodiment of the present invention;

[0044] Figure 3 This is a schematic diagram of a method for selecting test cases based on software testing strategies, provided in another embodiment of the present invention.

[0045] Figure 4 This is a schematic diagram illustrating the combination of an overall testing strategy and a testing execution strategy provided in one embodiment of the present invention;

[0046] Figure 5 This is a schematic diagram illustrating the selection of test cases when the software under test performs version testing, according to an embodiment of the present invention.

[0047] Figure 6 This is a schematic diagram of the system hardware structure for selecting test cases based on software testing strategies, provided in one embodiment of the present invention.

[0048] Figure 7 A schematic diagram of the hardware structure of a device for selecting test cases based on a software testing strategy to implement one or more embodiments of the present invention. Detailed Implementation

[0049] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0050] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0051] In this invention, "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0052] The term "multiple" in this invention refers to two or more.

[0053] In the description of this invention, the terms "first," "second," etc., are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance or order.

[0054] Furthermore, in embodiments of the present invention, the term "exemplary" is used to indicate that it is an example, illustration, or description. Any embodiment or implementation described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or implementations. Rather, the use of the term "exemplary" is intended to present the concept in a concrete manner.

[0055] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0056] Figure 1 A schematic diagram of an exemplary system architecture that can apply the technical solutions of one or more embodiments of the present invention is shown. Figure 1 As shown, the system architecture 100 may include terminal device 110, network 120, and server 130. Terminal device 110 may include various electronic devices such as smartphones, tablets, laptops, and desktop computers. Server 130 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Network 120 may be a communication medium of various connection types capable of providing a communication link between terminal device 110 and server 130, such as a wired communication link or a wireless communication link.

[0057] Depending on the implementation requirements, the system architecture in this embodiment of the invention can have any number of terminal devices, networks, and servers. For example, server 130 can be a server group composed of multiple server devices. Furthermore, the technical solutions provided in this embodiment of the invention can be applied to terminal device 110, or to server 130, or can be implemented jointly by terminal device 110 and server 130; this invention does not impose any special limitations on these applications.

[0058] In one embodiment of the present invention, the terminal device 110 or server 130 can formulate an overall test strategy based on the pre-determined or real-time determined test quality level of the software under test and the test types that each test quality level needs to cover; then, according to the degree of influence of the functional characteristics in the software under test, prioritize the test cases that need to be executed for each test quality level and formulate a test execution strategy; then, combine and arrange the overall test strategy and the test execution strategy to generate a test strategy template for testing multiple software versions; finally, obtain the version change content of the software under test, and match the corresponding test strategy from the test strategy template based on the version change content as the target test strategy, and select the corresponding test cases according to the target test strategy. Different test quality levels execute test cases of different test types. The method of selecting test cases based on software testing strategies, executed using terminal device 110 or server 130, can form test execution strategies for each module and feature based on a combination of the overall testing strategy and the test execution strategy. Testers can then view and execute the corresponding test cases according to the obtained test execution strategies. This allows for the rapid and accurate determination of the scope of test cases required for the version, avoiding the time-consuming and omission-prone nature of manual test case selection, which can lead to insufficient test coverage, quality issues, and product release delays. Essentially, this invention can associate version change content, the overall testing strategy, the test execution strategy, the test case library, and functional features to automatically obtain test cases corresponding to the testing strategies.

[0059] The above section introduced an exemplary system architecture for applying the technical solution of this invention. Next, we will continue to introduce the method of selecting test cases based on software testing strategies of this invention.

[0060] Figure 2 This illustration shows a flowchart of a method for selecting test cases based on a software testing strategy according to an embodiment of the present invention. Specifically, in an exemplary embodiment, as shown... Figure 2 As shown in the figure, this embodiment provides a method for selecting test cases based on software testing strategies. The method includes the following steps:

[0061] S210, based on the test quality level of the software under test determined in advance or in real time, and the test types that each test quality level needs to cover, formulate and generate an overall test strategy; wherein, different test quality levels execute test cases of different test types;

[0062] S220: Based on the degree of impact of the functional characteristics in the software under test, prioritize the test cases to be executed for each test quality level and formulate a test execution strategy.

[0063] S230 combines and arranges the overall test strategy and test execution strategy to generate a test strategy template for testing multiple software versions;

[0064] S240: Obtain the version change information of the software under test, and match the corresponding test strategy from the test strategy template based on the version change information as the target test strategy, and select the corresponding test cases according to the target test strategy.

[0065] Therefore, this embodiment combines the overall testing strategy and the test execution strategy to form the test execution strategy for each module and its features. Testers can view and execute the corresponding test cases according to the obtained test execution strategy. This allows for the quick and accurate determination of the scope of test cases required for the version, avoiding the time-consuming and omission-prone process of manually selecting test cases, which can lead to insufficient test coverage, quality issues, and product release delays. Essentially, this embodiment can associate version changes, the overall testing strategy, the test execution strategy, the test case library, and functional features to automatically obtain the test cases corresponding to the testing strategy.

[0066] In an exemplary embodiment, before combining and arranging the overall testing strategy and the test execution strategy, this embodiment may further include: marking each test case in the test case library with a first attribute field; marking each functional feature of the software under test in the functional feature library with a second attribute field; and setting or modifying the degree of impact of each functional feature in the functional feature library. The first and second attribute fields are different; the test case library provides multiple test cases; and the functional feature library is constructed based on all functional features of the software under test. Specifically, in this embodiment, the first attribute field includes: the module name corresponding to the test case, the test type defined in the overall testing strategy, and the priority defined in the test execution strategy; the second attribute field includes: the software module name corresponding to the functional feature, and the quality level defined in the overall testing strategy.

[0067] In an exemplary embodiment, the test quality levels include: fully commercial level, restricted commercial level, demonstration or trial level, and unusable level; wherein, the fully commercial level needs to cover the following test types: functionality, reliability, usability, efficiency, maintainability, and portability; the restricted commercial level needs to cover the following test types: functionality, reliability, usability, and efficiency; and the demonstration or trial level needs to cover the following test types: functionality, reliability, and usability. Specifically, as an example, the process of developing an overall test strategy based on the pre-determined or real-time determined test quality level of the software under test and the test types that each test quality level needs to cover includes: developing an overall test strategy based on the fully commercial level of the software under test and the test types that the fully commercial level needs to cover; and / or, developing an overall test strategy based on the restricted commercial level of the software under test and the test types that the restricted commercial level needs to cover; and / or, developing an overall test strategy based on the demonstration or trial level of the software under test and the test types that the demonstration or trial level needs to cover. And / or, based on the unusable level of the software under test and the types of tests that the fully commercial level needs to cover, formulate an overall testing strategy.

[0068] In an exemplary embodiment, the process of prioritizing test cases to be executed for each test quality level based on the degree of influence of functional features in the software under test, and formulating a test execution strategy, includes: identifying the degree of influence of functional features in the software under test, obtaining corresponding influence degree identification results, wherein the influence degree identification results include: new functional features completely different from functional features, enhancement of original functional features, and no change to original functional features; prioritizing test cases to be executed for each test quality level according to the influence degree identification results, and formulating a test execution strategy. Specifically, in this embodiment, B1, new functional features of the functional feature module of the software under test correspond to full functional feature coverage; B2, enhancement of old functional features of the functional feature module of the software under test corresponds to full coverage of the changed functional features; B3, basic coverage of the affected features of the functional feature module of the software under test, and changes in the old functional features of the functional feature module of the software under test correspond to basic coverage of the affected features; B4, no change in the old functional features of the functional feature module of the software under test corresponds to basic test case coverage. As an example, assuming test case priorities are divided into P1, P2, P3, and P4, then strategy B1 needs to cover test cases with priorities of P1, P2, P3, and P4; strategy B2 needs to cover test cases with priorities of P1 and P2; strategy B3 needs to cover test cases with priorities of P3 and P4; and strategy B4 needs to cover test cases with priority of P4.

[0069] In an exemplary embodiment, the process of obtaining the version change content of the software under test includes: obtaining the functional characteristics of the software under test in the current version, denoted as the current functional characteristics; and obtaining the functional characteristics of the software under test in the previous version, denoted as the historical functional characteristics; comparing the historical functional characteristics with the current functional characteristics, and taking the functional characteristics that are different in the current functional characteristics as the version change content of the software under test.

[0070] In an exemplary embodiment, after selecting the corresponding test cases according to the target testing strategy, this embodiment may further include: in the development phase, using the selected test cases to perform unit testing, integration testing, system testing, and / or acceptance testing on the software under test; and in the source code viewing phase, using the selected test cases to perform white-box testing, black-box testing, and / or gray-box testing on the software under test; and in the quality attribute testing phase, using the selected test cases to perform functional testing, performance testing, reliability testing, usability testing, portability testing, and / or maintainability testing on the software under test.

[0071] like Figure 3 As shown, in another exemplary embodiment of the present invention, this embodiment also provides a method for selecting test cases based on a software testing strategy, including the following steps:

[0072] Step 1: Develop an overall testing strategy. Define different levels and corresponding test types within each level based on the actual situation. For example, you can define the test types that need to be covered at different levels according to quality attributes.

[0073] Step 2: Develop a test execution strategy. Define different levels based on the degree to which the actual version development is affected. The test cases that need to be covered in different levels are distinguished by priority. For example, arrange the test cases according to P1, P2, P3, P4 from high to low priority. Different levels corresponding to different degrees of impact need to cover different combinations of priorities.

[0074] Step 3: Tag test case attributes. Tag each test case in the test case library with test case attribute fields, such as the module name corresponding to the test case, test type (the test type defined in the overall test strategy), and priority (the priority defined in the test execution strategy).

[0075] Step 4: Label feature attributes. Label attribute fields for each feature in the feature library, such as the module name corresponding to the feature and the quality level (the level defined in the overall testing strategy).

[0076] Step 5: Mark version changes. Set or modify the impact level attribute for each feature in the feature library, which is the test execution strategy level. For example, the module name and which level of impact each feature belongs to (the level defined in the test execution strategy).

[0077] Step 6: Review the test cases for the release version. After the release, the overall testing strategy can be readjusted by setting or modifying the test strategy level for each module. The system automatically generates a recommended set of execution test cases for a specific version based on the different strategies. This not only comprehensively covers the impact of the released version's features but also competitively narrows the testing scope, effectively improving testing efficiency and ensuring software product quality.

[0078] Specifically, according to the above description, in one example, such as Figure 4 and Figure 5 As shown, this example first establishes an overall product testing strategy, dividing the test quality into different levels according to test types. For example: A1, the fully commercial level, requires coverage of the following test types: functionality, reliability, usability, efficiency, maintainability, and portability; A2, the restricted commercial level, requires coverage of the following test types: functionality, reliability, usability, and efficiency; A3, the demonstration or trial level, requires coverage of the following test types: functionality, reliability, and usability; A4, the unusable level, has no requirements for the test types it needs to cover. Different quality levels require the execution of different types of test cases.

[0079] Secondly, formulate a product testing execution strategy, dividing the test execution levels according to the degree of impact on product modules. For example: B1, new module features correspond to full feature coverage; B2, enhanced old module features correspond to full coverage of the changed features; B3, basic coverage of the affected features, and basic coverage of the affected features if old features have changed; B4, no change to old features correspond to basic test case coverage. Different test execution strategies can correspond to test cases of different priorities. Assuming test case priorities are P1, P2, P3, and P4, then strategy B1 needs to cover test cases of priorities P1, P2, P3, and P4; strategy B2 needs to cover test cases of priorities P1 and P2; strategy B3 needs to cover test cases of priorities P3 and P4; and strategy B4 needs to cover test cases of priority P4.

[0080] Finally, by combining and arranging the overall testing strategy and the test execution strategy, different version testing strategy templates can be obtained. For example, the version testing strategy for a certain feature of a module in a product is New Feature Development B1 + Fully Commercial Level A1. Under this testing strategy, the test cases to be executed should be test cases of all priorities: functionality, reliability, usability, efficiency, portability, and maintainability. Another feature's version testing strategy is Old Feature Enhancement B2 + Restricted Commercial Level A2. Under this testing strategy, the test cases to be executed should be test cases of priorities P1 and P2 in the functionality, reliability, usability, and efficiency test types.

[0081] In this example, the overall testing strategy and test execution strategy can be flexibly customized. The test case attributes in the test case library must be consistent with the attributes in the overall testing strategy and test execution strategy. For example, as described in the example above, the test types of the test cases should be functionality, reliability, usability, efficiency, portability, and maintainability, and the priority of the test cases should be P1, P2, P3, and P4. The test cases should also include the corresponding product module and functional characteristics. When developers release a version, they can fill in the module name, module version number, modified content, and scope of impact in the release system. The system can then generate test execution strategies for each module and its characteristics based on the changes in each module of the version, combined with the overall testing strategy and test execution strategy. Testers can then view and execute the corresponding test cases according to the obtained test execution strategies. This allows for quick and accurate determination of the scope of test cases required for the version, avoiding the time-consuming and omission-prone process of manually selecting test cases, which can lead to insufficient test coverage, quality problems, and product release delays.

[0082] In summary, this invention provides a method for selecting test cases based on a software testing strategy. Based on a pre-determined or real-time determined test quality level of the software under test and the test types that each test quality level needs to cover, an overall test strategy is generated. Then, based on the impact of functional characteristics in the software under test, the test cases to be executed at each test quality level are prioritized, and a test execution strategy is generated. Next, the overall test strategy and the test execution strategy are combined and arranged to generate a test strategy template for testing multiple software versions. Finally, the version change content of the software under test is obtained, and the corresponding test strategy is matched from the test strategy template as the target test strategy based on the version change content, and the corresponding test cases are selected according to the target test strategy. Different test quality levels execute test cases of different test types. Therefore, this method forms test execution strategies for each module and characteristic based on the combination of the overall test strategy and the test execution strategy. Testers can view and execute the corresponding test cases according to the obtained test execution strategies, thereby quickly and accurately determining the scope of test cases to be executed for each version, avoiding the time-consuming and omission-prone nature of manual test case selection, which can lead to insufficient test coverage, quality problems, and product release delays. This method can associate version changes, overall testing strategies, test execution strategies, test case libraries, and functional features, thereby automatically obtaining test cases based on the testing strategies.

[0083] In another exemplary embodiment of the present invention, such as Figure 6 As shown, this embodiment provides a system for selecting test cases based on software testing strategies, including:

[0084] The overall test strategy module 610 is used to formulate and generate an overall test strategy based on the test quality level of the software under test, which is determined in advance or in real time, and the test types that need to be covered by each test quality level; wherein, different test quality levels execute test cases of different test types.

[0085] The test execution strategy module 620 is used to prioritize the test cases to be executed for each test quality level based on the degree of impact of the functional characteristics in the software under test, and to formulate and generate a test execution strategy.

[0086] The test strategy template module 630 is used to combine and arrange the overall test strategy and test execution strategy to generate a test strategy template for testing multiple software versions;

[0087] The test case selection module 640 is used to obtain the version change content of the software under test, match the corresponding test strategy from the test strategy template based on the version change content as the target test strategy, and select the corresponding test cases according to the target test strategy.

[0088] Therefore, this embodiment combines the overall testing strategy and the test execution strategy to form the test execution strategy for each module and its features. Testers can view and execute the corresponding test cases according to the obtained test execution strategy. This allows for the quick and accurate determination of the scope of test cases required for the version, avoiding the time-consuming and omission-prone process of manually selecting test cases, which can lead to insufficient test coverage, quality issues, and product release delays. Essentially, this embodiment can associate version changes, the overall testing strategy, the test execution strategy, the test case library, and functional features to automatically obtain the test cases corresponding to the testing strategy.

[0089] In an exemplary embodiment, before combining and arranging the overall testing strategy and the test execution strategy, this embodiment may further include: marking each test case in the test case library with a first attribute field; marking each functional feature of the software under test in the functional feature library with a second attribute field; and setting or modifying the degree of impact of each functional feature in the functional feature library. The first and second attribute fields are different; the test case library provides multiple test cases; and the functional feature library is constructed based on all functional features of the software under test. Specifically, in this embodiment, the first attribute field includes: the module name corresponding to the test case, the test type defined in the overall testing strategy, and the priority defined in the test execution strategy; the second attribute field includes: the software module name corresponding to the functional feature, and the quality level defined in the overall testing strategy.

[0090] In an exemplary embodiment, the test quality levels include: fully commercial level, restricted commercial level, demonstration or trial level, and unusable level; wherein, the fully commercial level needs to cover the following test types: functionality, reliability, usability, efficiency, maintainability, and portability; the restricted commercial level needs to cover the following test types: functionality, reliability, usability, and efficiency; and the demonstration or trial level needs to cover the following test types: functionality, reliability, and usability. Specifically, as an example, the process of developing an overall test strategy based on the pre-determined or real-time determined test quality level of the software under test and the test types that each test quality level needs to cover includes: developing an overall test strategy based on the fully commercial level of the software under test and the test types that the fully commercial level needs to cover; and / or, developing an overall test strategy based on the restricted commercial level of the software under test and the test types that the restricted commercial level needs to cover; and / or, developing an overall test strategy based on the demonstration or trial level of the software under test and the test types that the demonstration or trial level needs to cover. And / or, based on the unusable level of the software under test and the types of tests that the fully commercial level needs to cover, formulate an overall testing strategy.

[0091] In an exemplary embodiment, the process of prioritizing test cases to be executed for each test quality level based on the degree of influence of functional features in the software under test, and formulating a test execution strategy, includes: identifying the degree of influence of functional features in the software under test, obtaining corresponding influence degree identification results, wherein the influence degree identification results include: new functional features completely different from functional features, enhancement of original functional features, and no change to original functional features; prioritizing test cases to be executed for each test quality level according to the influence degree identification results, and formulating a test execution strategy. Specifically, in this embodiment, B1, new functional features of the functional feature module of the software under test correspond to full functional feature coverage; B2, enhancement of old functional features of the functional feature module of the software under test corresponds to full coverage of the changed functional features; B3, basic coverage of the affected features of the functional feature module of the software under test, and changes in the old functional features of the functional feature module of the software under test correspond to basic coverage of the affected features; B4, no change in the old functional features of the functional feature module of the software under test corresponds to basic test case coverage. As an example, assuming test case priorities are divided into P1, P2, P3, and P4, then strategy B1 needs to cover test cases with priorities of P1, P2, P3, and P4; strategy B2 needs to cover test cases with priorities of P1 and P2; strategy B3 needs to cover test cases with priorities of P3 and P4; and strategy B4 needs to cover test cases with priority of P4.

[0092] In an exemplary embodiment, the process of obtaining the version change content of the software under test includes: obtaining the functional characteristics of the software under test in the current version, denoted as the current functional characteristics; and obtaining the functional characteristics of the software under test in the previous version, denoted as the historical functional characteristics; comparing the historical functional characteristics with the current functional characteristics, and taking the functional characteristics that are different in the current functional characteristics as the version change content of the software under test.

[0093] In an exemplary embodiment, after selecting the corresponding test cases according to the target testing strategy, this embodiment may further include: in the development phase, using the selected test cases to perform unit testing, integration testing, system testing, and / or acceptance testing on the software under test; and in the source code viewing phase, using the selected test cases to perform white-box testing, black-box testing, and / or gray-box testing on the software under test; and in the quality attribute testing phase, using the selected test cases to perform functional testing, performance testing, reliability testing, usability testing, portability testing, and / or maintainability testing on the software under test.

[0094] In summary, this invention provides a system for selecting test cases based on software testing strategies. It generates an overall testing strategy based on a pre-determined or real-time determined test quality level of the software under test and the test types that each test quality level needs to cover. Then, based on the impact of functional characteristics in the software under test, it prioritizes the test cases to be executed for each test quality level and generates a test execution strategy. Next, it combines the overall testing strategy and the test execution strategy to generate a test strategy template for testing multiple software versions. Finally, it obtains the version change content of the software under test and matches the corresponding test strategy from the test strategy template as the target test strategy, and selects the corresponding test cases according to the target test strategy. Different test quality levels execute test cases of different test types. Therefore, this system forms test execution strategies for each module and characteristic based on the combination of the overall testing strategy and the test execution strategy. Testers can view and execute the corresponding test cases according to the obtained test execution strategy, thereby quickly and accurately determining the scope of test cases to be executed for each version, avoiding the time-consuming and omission-prone nature of manual test case selection, which can lead to insufficient test coverage, quality problems, and product release delays. Essentially, this system can associate version changes, overall testing strategies, test execution strategies, test case libraries, and functional features, thereby automatically obtaining test cases based on the testing strategies.

[0095] It should be noted that the system for selecting test cases based on software testing strategies provided in the above embodiments and the method for selecting test cases based on software testing strategies provided in the above embodiments belong to the same concept. The specific methods of execution of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the system for selecting test cases based on software testing strategies provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0096] Embodiments of the present invention also provide an apparatus for selecting test cases based on a software testing strategy, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the apparatus for selecting test cases based on a software testing strategy implements the method for selecting test cases based on a software testing strategy provided in the above embodiments.

[0097] Figure 7 A schematic diagram of a computer device suitable for implementing an embodiment of the present invention, which selects test cases based on a software testing strategy, is shown. It should be noted that... Figure 7The computer system 1000 shown, which selects test cases based on software testing strategies, is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0098] like Figure 7 As shown, the computer system 1000 includes a Central Processing Unit (CPU) 1001, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1002 or programs loaded from storage portion 1008 into Random Access Memory (RAM) 1003, such as performing the methods described in the above embodiments. The RAM 1003 also stores various programs and data required for system operation. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An Input / Output (I / O) interface 1005 is also connected to the bus 1004.

[0099] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. Removable media 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1010 as needed so that computer programs read from them can be installed into storage section 1008 as needed.

[0100] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit (CPU) 1001, it performs various functions defined in the system of the present invention.

[0101] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0102] 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 the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains 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.

[0103] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0104] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the method for selecting test cases based on a software testing strategy as described above. This computer-readable storage medium may be included in the device for selecting test cases based on a software testing strategy described in the above embodiments, or it may exist independently and not incorporated into the device for selecting test cases based on a software testing strategy.

[0105] Another aspect of the present invention provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for selecting test cases based on software testing strategies provided in the various embodiments described above.

[0106] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for selecting test cases based on software testing strategies, characterized in that, The method includes the following steps: Based on the pre-determined or real-time determined test quality level of the software under test, and the test types that each test quality level needs to cover, an overall test strategy is generated. Different test quality levels execute test cases of different test types. The test quality levels include: fully commercial level, restricted commercial level, demonstration or trial level, and unusable level. The test types that the fully commercial level needs to cover include: functionality, reliability, usability, efficiency, maintainability, and portability. The test types that the restricted commercial level needs to cover include: functionality, reliability, usability, and efficiency. The test types that the demonstration or trial level needs to cover include: functionality, reliability, and usability. Based on the degree of impact of the functional features in the software under test, the test cases to be executed for each test quality level are prioritized, and a test execution strategy is formulated. This includes: identifying the degree of impact of the functional features in the software under test, obtaining corresponding impact degree identification results, wherein the impact degree identification results include: new functional features that are completely different from the functional features, enhancements to the original functional features, and no change to the original functional features; prioritizing the test cases to be executed for each test quality level according to the impact degree identification results, and formulating a test execution strategy. The overall testing strategy and the test execution strategy are combined and arranged to generate a test strategy template for testing multiple software versions; Obtain the version change information of the software under test, and match the corresponding test strategy from the test strategy template based on the version change information as the target test strategy, and select the corresponding test cases according to the target test strategy.

2. The method for selecting test cases based on software testing strategies according to claim 1, characterized in that, Before combining and arranging the overall testing strategy and the testing execution strategy, the method further includes: Each test case in the test case library is marked with a first attribute field; and each functional feature of the software under test in the functional feature library is marked with a second attribute field; and the degree of impact of setting or modifying each functional feature in the functional feature library is determined. The first attribute field and the second attribute field are different. The test case library provides multiple test cases. The functional feature library is built based on all the functional features of the software under test.

3. The method for selecting test cases based on software testing strategies according to claim 2, characterized in that, The first attribute field includes: the module name corresponding to the test case, the test type defined in the overall test strategy, and the priority defined in the test execution strategy; The second attribute field includes: the name of the software module corresponding to the functional feature, and the quality level of the functional feature defined in the overall testing strategy.

4. The method for selecting test cases based on software testing strategies according to any one of claims 1 to 3, characterized in that, The process of obtaining the version change information of the software under test includes: Obtain the functional characteristics of the software under test in the current version, denoted as the current functional characteristics; and, Obtain the functional features of the software under test in the previous version and record them as historical functional features; The historical functional characteristics are compared with the current functional characteristics, and the functional characteristics that differ from the current functional characteristics are taken as the version change content of the software under test.

5. The method for selecting test cases based on software testing strategies according to any one of claims 1 to 3, characterized in that, After selecting the corresponding test cases according to the target testing strategy, the method further includes: During the development phase, the selected test cases are used to perform unit testing, integration testing, system testing, and / or acceptance testing on the software under test; and During the source code review phase, white-box testing, black-box testing, and / or gray-box testing are performed on the software under test using selected test cases; and... During the quality attribute testing phase, the selected test cases are used to perform functional testing, performance testing, reliability testing, usability testing, portability testing, and / or maintainability testing on the software under test.

6. A system for selecting test cases based on software testing strategies, characterized in that, The system includes: The overall testing strategy module is used to formulate and generate an overall testing strategy based on the pre-determined or real-time determined test quality level of the software under test, and the test types that each test quality level needs to cover. Different test quality levels execute test cases of different test types. The test quality levels include: fully commercial level, restricted commercial level, demonstration or trial level, and unusable level. The test types that the fully commercial level needs to cover include: functionality, reliability, usability, efficiency, maintainability, and portability. The test types that the restricted commercial level needs to cover include: functionality, reliability, usability, and efficiency. The test types that the demonstration or trial level needs to cover include: functionality, reliability, and usability. The test execution strategy module is used to prioritize test cases to be executed for each test quality level based on the impact of functional features in the software under test, and to formulate and generate a test execution strategy. This includes: identifying the impact of functional features in the software under test to obtain corresponding impact identification results, wherein the impact identification results include: new functional features completely different from the functional features, enhancements to the original functional features, and no change to the original functional features; prioritizing test cases to be executed for each test quality level according to the impact identification results, and formulating and generating a test execution strategy. The test strategy template module is used to combine and arrange the overall test strategy and the test execution strategy to generate a test strategy template for testing multiple software versions. The test case selection module is used to obtain the version change content of the software under test, match the corresponding test strategy from the test strategy template based on the version change content as the target test strategy, and select the corresponding test cases according to the target test strategy.

7. A device for selecting test cases based on software testing strategies, characterized in that, The device includes: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the device to implement the method for selecting test cases based on a software testing strategy as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the method of selecting test cases based on a software testing strategy as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Test case selection method and device

    CN110109816A

  • Test case hierarchical storage method and system, electronic equipment and storage medium

    CN112346986A