Case test method, computing device, machine readable storage medium and program product

By obtaining and defining the operation steps of automated test cases and configuring test cases with repeated step templates, the problem of inefficient maintenance of test cases in the prior art is solved, and more efficient automated tests and use case maintenance is achieved.

CN119862128APending Publication Date: 2025-04-22BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411954113.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The maintenance efficiency of existing automated test cases is inefficient, especially when the core content of the functional module changes, the automatic test cases of all associated functional modules need to be modified, resulting in maintenance difficulties.

Method used

By obtaining all automated test cases for the target functional module, defining defined steps for each operation step, obtaining repeated step templates, and configuring test cases based on these step templates to improve the relevance and maintenance efficiency of test cases.

Benefits of technology

Configuring test cases through step templates improves correlation and maintenance efficiency between test cases, reduces the difficulty of modifying test cases when functional modules are changed, and improves the efficiency of automated testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862128A_ABST
    Figure CN119862128A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a use case testing method, computing equipment, a machine readable storage medium and a program product, and belongs to the field of automatic testing. The case test method comprises the steps of obtaining all automatic test cases corresponding to a target function module; aiming at each automatic test case, defining each operation step in the automatic test case to obtain a defined step corresponding to each operation step; obtaining a step template corresponding to each target step; aiming at each automatic test case, obtaining a configured test case corresponding to the automatic test case according to each target step template and an operation process of the automatic test case; and executing a test based on all the configured test cases to obtain a test result of the target function module. The test cases are configured through the step template, so that the relevance between the test cases is improved, and the maintenance efficiency of the test cases is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated testing, and in particular to a use case testing method, a computing device, a machine-readable storage medium and a program product. Background Art

[0002] With the rapid development of Internet technology, more and more websites are available for users to visit, and the functions provided by the websites are becoming more and more comprehensive. In order to ensure the reliable operation of the website, it is usually necessary to spend a lot of manpower and material resources to test all the functions provided by the website. When the design and functions of the website tend to be stable, web (network) automated testing is used for functional testing.

[0003] Current automated testing is implemented through individually coded test cases, which requires high technical skills of test case programmers, making test case maintenance inefficient. In addition, the higher the coverage of functional automated testing, the more difficult it is to maintain automated test cases. There are repeated test contents between different automated test cases. When the core content of a functional module changes, the contents of all automated test cases of related functional modules need to be modified, further making test case maintenance inefficient. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a use case testing method, a computing device, a machine-readable storage medium and a program product. The use case testing method is used to solve the problem of low maintenance efficiency of test cases.

[0005] In order to achieve the above objectives, in a first aspect, the present application provides a use case testing method, which includes:

[0006] Get all automated test cases corresponding to the target functional module;

[0007] For each automated test case, define each operation step in the automated test case to obtain a defined step corresponding to each operation step;

[0008] Obtain a step template corresponding to each target step, wherein the target step is a defined step repeated by at least two automated test cases;

[0009] For each automated test case, according to each target step template and the operation flow of the automated test case, a configured test case corresponding to the automated test case is obtained, wherein the target step template is a step template corresponding to any target step in the automated test case;

[0010] Execute the test based on all configured test cases to obtain the test results of the target functional module.

[0011] In an embodiment of the present application, the use case testing method further includes:

[0012] In response to the received template modification request, the corresponding step template is updated to obtain an updated step template;

[0013] Based on the updated step template, update each corresponding configured test case to obtain an updated test case;

[0014] Execute the test according to all updated test cases to obtain the test results of the target functional module.

[0015] In the embodiment of the present application, the test is performed based on all configured test cases to obtain the test results of the target functional module, including:

[0016] For each configured test case, perform a test on each operation flow in the configured test case to obtain a test result of the case, wherein the operation flow includes at least one defined step;

[0017] Based on the test results of all use cases, the test results of the target functional module are obtained.

[0018] In the embodiment of the present application, for each configured test case, each operation flow in the configured test case is tested to obtain the test result of the case, including:

[0019] For each configured test case, determine whether a defined step included in each operation flow in the configured test case is a target step;

[0020] In the case where the defined step is the target step, the test is performed based on the step template corresponding to the defined step, so as to perform the test on the operation process to obtain the operation test result;

[0021] In the case where the defined step is not the target step, performing the test based on the defined step to perform the test on the operation process to obtain the operation test result;

[0022] When all operation processes are tested, the use case test results are obtained based on all operation test results.

[0023] In the embodiment of the present application, obtaining the step template corresponding to each target step includes:

[0024] Determine whether there is a corresponding defined step template for the target step;

[0025] If there is a corresponding defined step template for the target step, the defined step template is determined as the step template corresponding to the target step;

[0026] When there is no corresponding defined step template for the target step, a step template corresponding to the target step is constructed according to the target step.

[0027] In the embodiment of the present application, for each automated test case, according to each target step template and the operation flow of the automated test case, a configured test case corresponding to the automated test case is obtained, including:

[0028] For each automated test case, according to the operation flow of the automated test case, determine the step order of all target steps and all non-target steps in the automated test case, wherein the non-target steps are defined steps in the automated test case other than the target steps;

[0029] Based on the step sequence, all target steps and all non-target steps in the automated test case are sorted to obtain the configured test case corresponding to the automated test case.

[0030] In the embodiment of the present application, for each automated test case, each operation step in the automated test case is defined to obtain a defined step corresponding to each operation step, including:

[0031] For each automated test case, at least one of the operation instruction text, operation type, positioning method, positioning value, input content and other operation parameters of each operation step in the automated test case is defined to obtain a defined step corresponding to each operation step.

[0032] In a second aspect, the present application provides a use case testing device, the use case testing device comprising:

[0033] The test case acquisition module is used to obtain all automated test cases corresponding to the target functional module;

[0034] An operation step definition module is used to define each operation step in each automated test case and obtain a defined step corresponding to each operation step;

[0035] A step template acquisition module is used to acquire a step template corresponding to each target step, wherein the target step is a defined step repeated by at least two automated test cases;

[0036] A test case configuration module is used to obtain, for each automated test case, a configured test case corresponding to the automated test case according to each target step template and the operation flow of the automated test case, wherein the target step template is a step template corresponding to any target step in the automated test case;

[0037] The test result acquisition module is used to execute the test based on all configured test cases and obtain the test results of the target functional module.

[0038] In a third aspect, the present application provides a computing device, including:

[0039] a memory configured to store instructions;

[0040] The processor is configured to call instructions from the memory and implement the above-mentioned use case testing method when executing the instructions.

[0041] In a fourth aspect, the present application provides a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, configure the processor to execute the above-mentioned use case testing method.

[0042] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the above-mentioned use case testing method when executed by a processor.

[0043] The present application provides a use case testing method, including: obtaining all automated test cases corresponding to a target functional module; for each automated test case, defining each operation step in the automated test case to obtain a defined step corresponding to each operation step; obtaining a step template corresponding to each target step; for each automated test case, obtaining a configured test case corresponding to the automated test case according to each target step template and the operation flow of the automated test case; performing a test based on all configured test cases to obtain a test result of the target functional module. By configuring the test case through the step template, the correlation between the test cases is improved, thereby improving the maintenance efficiency of the test case. In addition, by performing the test through the use case configured with the step template, the efficiency of automated testing is improved, and the maintenance efficiency of the test case is further improved.

[0044] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:

[0046] Figure 1 A flowchart of a use case testing method provided by an embodiment of the present application is shown;

[0047] Figure 2 An example diagram showing the operation steps provided by the embodiment of the present application;

[0048] Figure 3 An example diagram of a step template provided in an embodiment of the present application is shown;

[0049] Figure 4 A schematic diagram of the structure of a use case testing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0050] The specific implementation of the embodiment of the present invention will be described in detail below in conjunction with the accompanying drawings in the embodiment of the present invention. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0051] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0052] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0053] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0054] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.

[0055] Example 1

[0056] See also Figure 1 , Figure 1 A flow chart of a use case testing method provided in an embodiment of the present application is shown.

[0057] Figure 1 The use case testing methods in include:

[0058] S110, obtaining all automated test cases corresponding to the target functional module.

[0059] A system that usually supports automated testing of test cases includes multiple functional modules. The type of functional module is set according to actual needs, and can be a login functional module and a rule adding functional module, etc., which is not limited here.

[0060] Get all existing use cases in the system and extract automated test cases from all use cases. Test cases are used to verify whether the software runs correctly in system software testing. Usually, automated test cases include the test case identifier, use case name, test target, test input, expected test results and test steps, which will not be elaborated here. In actual test scenarios, a functional module of the system is usually tested. The functional module to be tested is determined as the target functional module, and all automated test cases corresponding to the target functional module are extracted from all use cases.

[0061] S120, for each automated test case, define each operation step in the automated test case to obtain a defined step corresponding to each operation step.

[0062] Usually, a target functional module to be tested corresponds to multiple automated test cases. For each automated test case, extract the operation steps in each automated test case. Define the automated test operation corresponding to each operation step in the automated test case to obtain the defined steps corresponding to each operation step. The content of the operation step definition is selected according to actual needs, and can be operation instruction text, operation type, positioning method, positioning value, input content, other operation parameters and optional parameters, etc., which are not limited here.

[0063] Usually, the operation steps in the test case are coded content, and it is difficult to quickly determine whether two operation steps are repeated steps. By defining the operation steps, it is possible to quickly determine whether two defined steps are repeated steps.

[0064] In the embodiment of the present application, for each automated test case, each operation step in the automated test case is defined to obtain a defined step corresponding to each operation step, including:

[0065] For each automated test case, at least one of the operation instruction text, operation type, positioning method, positioning value, input content and other operation parameters of each operation step in the automated test case is defined to obtain a defined step corresponding to each operation step.

[0066] For ease of understanding, an automated test based on a web page is provided in the embodiment of the present application. Programmers can define the operation steps through the web interface, and can also display the test results through the web interface, which will not be described in detail here. The web interface can reduce the requirements for the technical capabilities of programmers, thereby improving the maintenance efficiency of test cases. In this embodiment, for each automated test case, the operation instruction text, operation type, positioning method, positioning value, input content and other operation parameters of each operation step in the automated test case are defined together through the web interface to obtain the defined steps corresponding to each operation step.

[0067] Specifically, the operation instruction text is used to define the content text of the operation steps, so that programmers can view and define the operation steps. The operation types defined in this embodiment are consistent with the operation types of web automation testing. The operation types can be click, send_keys, clear, and text, etc., which are not described in detail here. Similarly, the positioning method defined in this embodiment is consistent with the positioning method of web automation testing. The positioning method can be through ID, XPATH (XML Path Language, XML path language) and NAME, etc., which are not described in detail here. The positioning value is the value used for positioning that is passed in through the positioning method when programming the code. The input content is the content that needs to be entered according to different operation types. Other parameters are reserved parameters that need to be entered for other operations, which are set according to actual needs and are not limited here.

[0068] It should be understood that the optional parameters of each operation step in the automated test case can also be defined to obtain the defined steps corresponding to each operation step. The content of the optional parameters is set according to actual needs and is not limited here. For ease of understanding, other parameters in the embodiments of the present application are required parameters, and optional parameters are non-required parameters.

[0069] S130, obtaining a step template corresponding to each target step, wherein the target step is a defined step repeated by at least two automated test cases.

[0070] It should be understood that in the process of generating automated test cases, the operation steps of the test cases can be generated through preset case templates. In the case where the automated test cases are generated based on preset case templates, the preset case templates can be used to determine the step templates corresponding to the target steps. However, in the scenarios of the automated test cases actually generated, each automated test case is manually coded by a technician. However, there are repeated test contents between different automated test cases. When the core content of a functional module is found to have changed, the technician needs to manually modify the automated test cases of all related functional modules, resulting in low efficiency in the maintenance of test cases.

[0071] In this embodiment, based on all defined steps in each automated test case, defined steps repeated by at least two automated test cases are determined as target steps, and then a step template corresponding to each target step is obtained. By configuring test cases through step templates, the correlation between test cases is improved, thereby improving the maintenance efficiency of test cases.

[0072] In the embodiment of the present application, obtaining the step template corresponding to each target step includes:

[0073] Determine whether there is a corresponding defined step template for the target step;

[0074] If there is a corresponding defined step template for the target step, the defined step template is determined as the step template corresponding to the target step;

[0075] When there is no corresponding defined step template for the target step, a step template corresponding to the target step is constructed according to the target step.

[0076] According to all defined steps in each automated test case, at least the repeated operation steps of the automated test case are determined, and then all the target steps in each automated test case are determined. In the process of testing other functional modules, step templates are also constructed to determine whether there are corresponding defined step templates for the target steps in the automated test case.

[0077] If there is a corresponding defined step template for the target step, the defined step template is determined as the step template corresponding to the target step. If there is no corresponding defined step template for the target step, a step template corresponding to the target step is constructed according to the target step. Defined step templates can be used during the test process, and there is no need to repeatedly define the same step template, which improves the efficiency of obtaining the step template corresponding to each target step, thereby improving the maintenance efficiency of test cases.

[0078] S140, for each automated test case, according to each target step template and the operation flow of the automated test case, obtain a configured test case corresponding to the automated test case, wherein the target step template is a step template corresponding to any target step in the automated test case.

[0079] The target step template is a step template corresponding to any target step in the automated test case. For each automated test case, according to each target step template and the operation flow of the automated test case, a configured test case corresponding to the automated test case is obtained. Specifically, according to the operation flow of the automated test case, the position of the target step is determined, and the target step is replaced with the corresponding target step template, that is, at least the repeated operation steps of the automated test case are replaced with the step template, and the configured test case corresponding to the automated test case is obtained.

[0080] In the embodiment of the present application, for each automated test case, according to each target step template and the operation flow of the automated test case, a configured test case corresponding to the automated test case is obtained, including:

[0081] For each automated test case, according to the operation flow of the automated test case, determine the step order of all target steps and all non-target steps in the automated test case, wherein the non-target steps are defined steps in the automated test case other than the target steps;

[0082] Based on the step sequence, all target steps and all non-target steps in the automated test case are sorted to obtain the configured test case corresponding to the automated test case.

[0083] For each automated test case, the operation steps in the automated test case are classified into target steps and all non-target steps. Non-target steps are defined steps in the automated test case except the target steps, that is, non-target steps are operation steps for which step templates have not been defined. According to the operation flow of the automated test case, the step order of all target steps and all non-target steps in the automated test case is determined.

[0084] For ease of understanding, in the embodiments of the present application, it is assumed that the operation steps included in a certain automated test case are respectively "enter user name", "enter password" and "click to log in". It can be determined that the order of steps is to first execute the operation steps of "enter user name" and "enter password", and then execute the step of "click to log in". Based on the order of steps, all target steps and all non-target steps in the automated test case are sorted to obtain the configured test case corresponding to the automated test case.

[0085] S150, executing the test based on all configured test cases to obtain the test results of the target functional module.

[0086] Based on the operations in all configured test cases, the test results of each configured test case are obtained. The test results of the target functional module are obtained based on all the test results. By configuring the test cases of the step template, the efficiency of automated testing is improved, and the maintenance efficiency of test cases is further improved.

[0087] In an embodiment of the present application, the use case testing method further includes:

[0088] In response to the received template modification request, the corresponding step template is updated to obtain an updated step template;

[0089] Based on the updated step template, update each corresponding configured test case to obtain an updated test case;

[0090] Execute the test according to all updated test cases to obtain the test results of the target functional module.

[0091] In response to the received template modification request, the step template corresponding to the template modification request is updated to obtain an updated step template. Each configured test case corresponding to the updated step template is determined, and then each corresponding configured test case is updated based on the updated step template to obtain an updated test case. Tests are performed according to all updated test cases to obtain the test results of the target functional module. By configuring test cases through step templates, only the operation template needs to be used when editing and deleting content, and there is no need to recode each test case, thereby improving the maintenance efficiency of test cases.

[0092] In the embodiment of the present application, the test is performed based on all configured test cases to obtain the test results of the target functional module, including:

[0093] For each configured test case, perform a test on each operation flow in the configured test case to obtain a test result of the case, wherein the operation flow includes at least one defined step;

[0094] Based on the test results of all use cases, the test results of the target functional module are obtained.

[0095] See also Figure 2 , Figure 2 An example diagram of the operation steps provided in the embodiment of the present application is shown.

[0096] In advance, the operation steps in each automated test case correspond to an expected result, so as to perform the test through the operation steps in the automated test case. For ease of understanding, as shown in the figure, the operation steps in all automated test cases include entering the user name and password to log in to the system, switching the sensitive detection level 1 tab, switching the sensitive rule level 2 tab, clicking the page add button, selecting the keyword matching rule, configuring the rule name, configuring the keyword content and submitting the rule, etc. It should be understood that the automated test case can also include other operation steps beyond those in the figure, and other operation steps are set according to actual needs and are not limited here.

[0097] In this embodiment, the operation steps are defined to obtain the defined steps corresponding to each operation step. According to the definition of all defined steps in each automated test case, the defined steps repeated between all automated test cases are determined as target steps.

[0098] See also Figure 3 , Figure 3 An example diagram of a step template provided in an embodiment of the present application is shown.

[0099] In this embodiment, inputting a user name and password to log in to the system, switching to the sensitive detection level 1 tab, switching to the sensitive rule level 2 tab, clicking the page add button, selecting a keyword matching rule, configuring a rule name, configuring keyword content, and submitting a rule are all target steps, i.e., repeated operation steps in at least two automated test cases. As shown in the figure, obtain the step template corresponding to each target step.

[0100] Usually, each functional module includes at least one operation flow. For ease of understanding, the target functional module in the embodiment of the present application includes a login operation flow, a sensitive rule page operation flow, and a sensitive rule addition operation flow. Perform a test on each operation flow in the configured test case to obtain the case test result. Based on all the case test results, the test result of the target functional module is obtained.

[0101] In the embodiment of the present application, for each configured test case, each operation flow in the configured test case is tested to obtain the test result of the case, including:

[0102] For each configured test case, determine whether a defined step included in each operation flow in the configured test case is a target step;

[0103] In the case where the defined step is the target step, the test is performed based on the step template corresponding to the defined step, so as to perform the test on the operation process to obtain the operation test result;

[0104] In the case where the defined step is not the target step, performing the test based on the defined step to perform the test on the operation process to obtain the operation test result;

[0105] When all operation processes are tested, the use case test results are obtained based on all operation test results.

[0106] For each configured test case, determine whether the defined steps included in each operation process in the configured test case are target steps. In this embodiment, the login operation process includes a step template for entering a user name, a step template for entering a password, and a step template for clicking to log in. The sensitive rule page operation process includes a step template for switching sensitive rules, and the sensitive rule adding operation process includes a step template for adding a sensitive rule button. In the case where a defined step is a target step, a test is performed based on the step template corresponding to the defined step to perform a test on the operation process to obtain an operation test result.

[0107] The sensitive rule page operation process includes the operation step of switching sensitive detection, and switching sensitive detection is not the target step. When the defined step is not the target step, the test is performed based on the defined step, that is, the corresponding element positioning and operation process are performed based on the positioning method and positioning value of the defined step, so as to perform the test on the operation process and obtain the operation test result. When all operation processes are tested, the use case test result is obtained based on all operation test results.

[0108] The present application provides a use case testing method, including: obtaining all automated test cases corresponding to a target functional module; for each automated test case, defining each operation step in the automated test case to obtain a defined step corresponding to each operation step; obtaining a step template corresponding to each target step; for each automated test case, obtaining a configured test case corresponding to the automated test case according to each target step template and the operation flow of the automated test case; performing a test based on all configured test cases to obtain a test result of the target functional module. By configuring the test case through the step template, the correlation between the test cases is improved, thereby improving the maintenance efficiency of the test case. In addition, by performing the test through the use case configured with the step template, the efficiency of automated testing is improved, and the maintenance efficiency of the test case is further improved.

[0109] Example 2

[0110] See also Figure 4 , Figure 4 A schematic diagram of the structure of a use case testing device provided in an embodiment of the present application is shown. Figure 4 The use case test device 200 in the embodiment includes:

[0111] The test case acquisition module 210 is used to acquire all automated test cases corresponding to the target functional module;

[0112] The operation step definition module 220 is used to define each operation step in each automated test case and obtain a defined step corresponding to each operation step;

[0113] A step template acquisition module 230 is used to acquire a step template corresponding to each target step, wherein the target step is a defined step repeated by at least two automated test cases;

[0114] The test case configuration module 240 is used to obtain, for each automated test case, a configured test case corresponding to the automated test case according to each target step template and the operation flow of the automated test case, wherein the target step template is a step template corresponding to any target step in the automated test case;

[0115] The test result obtaining module 250 is used to execute the test based on all configured test cases to obtain the test result of the target functional module.

[0116] In an embodiment of the present application, the use case testing device 200 further includes:

[0117] The step template updating module is used to respond to the received template modification request, update the corresponding step template, and obtain the updated step template;

[0118] A test case update module is used to update each corresponding configured test case based on the updated step template to obtain an updated test case;

[0119] The test execution module is used to execute tests according to all updated test cases to obtain test results of the target functional module.

[0120] In the embodiment of the present application, the test result obtaining module 250 includes:

[0121] A case test submodule is used to perform a test on each operation flow in each configured test case to obtain a case test result, wherein the operation flow includes at least one defined step;

[0122] The result is a sub-module, which is used to obtain the test results of the target functional module based on the test results of all use cases.

[0123] In an embodiment of the present application, the use case test submodule is further used to determine, for each configured test case, whether a defined step included in each operation flow in the configured test case is a target step;

[0124] In the case where the defined step is the target step, the test is performed based on the step template corresponding to the defined step, so as to perform the test on the operation process to obtain the operation test result;

[0125] In the case where the defined step is not the target step, performing the test based on the defined step to perform the test on the operation process to obtain the operation test result;

[0126] When all operation processes are tested, the use case test results are obtained based on all operation test results.

[0127] In the embodiment of the present application, the step template acquisition module 230 includes:

[0128] The template determination submodule is used to determine whether there is a corresponding defined step template for the target step;

[0129] A defined step template determination submodule is used to determine the defined step template as the step template corresponding to the target step when a corresponding defined step template exists for the target step;

[0130] The step template construction submodule is used to construct a step template corresponding to the target step according to the target step when there is no corresponding defined step template for the target step.

[0131] In an embodiment of the present application, the test case configuration module 240 includes:

[0132] The step sequence determination submodule is used to determine the step sequence of all target steps and all non-target steps in the automated test case according to the operation flow of the automated test case for each automated test case, wherein the non-target steps are defined steps in the automated test case other than the target steps;

[0133] The use case configuration submodule is used to sort all target steps and all non-target steps in the automated test case based on the step sequence to obtain the configured test case corresponding to the automated test case.

[0134] In an embodiment of the present application, the operation step definition module 220 is also used to define, for each automated test case, at least one of the operation instruction text, operation type, positioning method, positioning value, input content and other operation parameters for each operation step in the automated test case, to obtain a defined step corresponding to each operation step.

[0135] The present application also provides a computing device, including:

[0136] a memory configured to store instructions;

[0137] The processor is configured to call instructions from the memory and implement the above-mentioned use case testing method when executing the instructions.

[0138] The test case acquisition module 210, operation step definition module 220, step template acquisition module 230, test case configuration module 240 and test result acquisition module 250 in this embodiment are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.

[0139] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the above-mentioned use case test method can be implemented by adjusting kernel parameters.

[0140] The memory may include non-permanent memory in a computer-readable medium, 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.

[0141] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the above-mentioned use case testing method.

[0142] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned use case testing method when executed by a processor.

[0143] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0144] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0145] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0146] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0147] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0148] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0149] Machine-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0150] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0151] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A use case testing method, characterized in that: The use case testing method includes: Get all automated test cases corresponding to the target functional module; For each of the automated test cases, define each operation step in the automated test case to obtain a defined step corresponding to each of the operation steps; Obtain a step template corresponding to each target step, wherein the target step is a defined step repeated by at least two of the automated test cases; For each of the automated test cases, according to each target step template and the operation flow of the automated test case, a configured test case corresponding to the automated test case is obtained, wherein the target step template is a step template corresponding to any one of the target steps in the automated test case; The test is performed based on all the configured test cases to obtain the test results of the target functional module.

2. The use case testing method according to claim 1, characterized in that: The use case testing method also includes: In response to the received template modification request, the corresponding step template is updated to obtain an updated step template; Based on the updated step template, update each corresponding configured test case to obtain an updated test case; The test is performed according to all the updated test cases to obtain the test result of the target functional module.

3. The use case testing method according to claim 1, characterized in that: The performing of the test based on all the configured test cases to obtain the test result of the target functional module includes: For each of the configured test cases, perform a test on each operation flow in the configured test case to obtain a test result of the case, wherein the operation flow includes at least one of the defined steps; Based on all the test results of the use cases, the test results of the target functional module are obtained.

4. The use case testing method according to claim 3, characterized in that: For each configured test case, performing a test on each operation flow in the configured test case to obtain a test result of the test case includes: For each of the configured test cases, determining whether a defined step included in each of the operation flows in the configured test case is a target step; In the case where the defined step is a target step, performing a test based on the step template corresponding to the defined step, so as to perform a test on the operation process to obtain an operation test result; In the case where the defined step is not a target step, performing a test based on the defined step to perform a test on the operation flow to obtain an operation test result; When all the operation processes are tested, the use case test results are obtained based on all the operation test results.

5. The use case testing method according to claim 1, characterized in that: The step template corresponding to each target step is obtained, including: Determine whether there is a corresponding defined step template for the target step; In the case that a corresponding defined step template exists for the target step, determining the defined step template as the step template corresponding to the target step; In the case that there is no corresponding defined step template for the target step, a step template corresponding to the target step is constructed according to the target step.

6. The use case testing method according to claim 1, characterized in that: For each of the automated test cases, obtaining a configured test case corresponding to the automated test case according to each of the target step templates and the operation flow of the automated test case includes: For each of the automated test cases, determining the step order of all the target steps and all non-target steps in the automated test case according to the operation flow of the automated test case, wherein the non-target steps are defined steps in the automated test case other than the target steps; Based on the step sequence, all the target steps and all the non-target steps in the automated test case are sorted to obtain the configured test case corresponding to the automated test case.

7. The use case testing method according to claim 1, characterized in that: For each of the automated test cases, each operation step in the automated test case is defined to obtain a defined step corresponding to each of the operation steps, including: For each of the automated test cases, at least one of the operation instruction text, operation type, positioning method, positioning value, input content and other operation parameters of each operation step in the automated test case is defined to obtain a defined step corresponding to each operation step.

8. A computing device, characterized in that include: a memory configured to store instructions; A processor is configured to call the instructions from the memory and implement the use case testing method according to any one of claims 1 to 7 when executing the instructions.

9. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to perform the use case testing method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the use case testing method according to any one of claims 1 to 7.