CN111538673A - Processing method, device, equipment and storage medium based on test case - Google Patents
Processing method, device, equipment and storage medium based on test case Download PDFInfo
- Publication number
- CN111538673A CN111538673A CN202010499707.7A CN202010499707A CN111538673A CN 111538673 A CN111538673 A CN 111538673A CN 202010499707 A CN202010499707 A CN 202010499707A CN 111538673 A CN111538673 A CN 111538673A
- Authority
- CN
- China
- Prior art keywords
- case
- statistical
- condition
- test
- statistic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 203
- 238000003672 processing method Methods 0.000 title claims abstract description 18
- 238000000034 method Methods 0.000 claims abstract description 30
- 230000000903 blocking effect Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 13
- 230000003993 interaction Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a processing method, a device, equipment and a storage medium based on a test case, wherein the method comprises the following steps: receiving current operation input by a user, wherein the current operation comprises the steps that the user inputs a case statistic condition, and the user clicks a preset button control after inputting the case statistic condition; determining a case statistical result corresponding to the case statistical condition according to the current operation, wherein the case statistical result is used for indicating a result of counting all test cases corresponding to the case statistical condition; and displaying the use case statistical result corresponding to the use case statistical condition. The complexity of the statistical process is reduced, statistics is more flexible, and the efficiency of obtaining the required case statistical result is improved.
Description
Technical Field
The present application relates to the field of test technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a test case.
Background
In recent years, writing test cases based on mind maps has become the first way for testers. After a set of test cases written based on the mind map is obtained, the set of test cases can be used for testing related software products, and an execution result of each test case, such as pass, fail and the like, is obtained. At present, in order to facilitate the testers to know the execution situation of the test case, statistics needs to be performed on the execution result of the test case.
In the prior art, a manual method is adopted to count the execution result of the test case. Specifically, the tester needs to search and manually record the execution result of each test case, and then the tester performs manual statistics according to the recorded content to obtain the required case statistical result.
However, in the prior art, the number of a set of test cases compiled based on the mind map is usually large, so if statistics is performed according to the existing method, the statistical process is complicated, a large amount of time is spent, and the statistical efficiency is low.
Disclosure of Invention
The application provides a processing method, a processing device, equipment and a storage medium based on test cases, which reduce the complexity of a statistical process, enable statistics to be more flexible and improve the efficiency of obtaining the statistical result of the required cases.
In a first aspect, the present application provides a test case-based processing method, where the method includes:
receiving current operation input by a user, wherein the current operation comprises the steps that the user inputs a case statistic condition, and the user clicks a preset button control after inputting the case statistic condition;
determining a case statistical result corresponding to the case statistical condition according to the current operation, wherein the case statistical result is used for indicating a result of counting all test cases corresponding to the case statistical condition;
and displaying the use case statistical result corresponding to the use case statistical condition.
Further, before the receiving a current operation of the user input, the method further includes:
acquiring a mind map test case file input by a user, wherein the mind map test case file comprises a plurality of test cases, each test case in the plurality of test cases is provided with an icon identification, and the icon identification is used for indicating an execution result of the test case;
the determining of the use case statistical result corresponding to the use case statistical condition includes:
and determining the case statistical result based on the icon identifications of all test cases corresponding to the case statistical conditions in the mind map test case file.
Further, the case statistical conditions include a first statistical condition, the preset button control includes a first button control, and the case statistical results include the number of different execution results of all test cases corresponding to the first statistical condition.
Furthermore, each test case in the plurality of test cases corresponds to a link, the link is sequentially provided with at least one level of non-leaf nodes and one leaf node, the starting positions of all the links correspond to the same non-leaf node, and the leaf node is provided with an icon identifier corresponding to the test case;
after the obtaining of the mind map test case file input by the user, the method further comprises:
determining a statistical set corresponding to each non-leaf node based on the icon identifications on all leaf nodes contained in each non-leaf node, wherein the statistical set comprises the number of different execution results corresponding to all leaf nodes contained in the non-leaf nodes;
the determining the case statistical result based on the icon identifications of all test cases corresponding to the case statistical conditions in the thought guide graph test case file comprises the following steps:
and determining the non-leaf node indicated by the first statistical condition, and determining a statistical set corresponding to the indicated non-leaf node, wherein the statistical set is the use case statistical result.
Further, the case statistical conditions include second statistical conditions, the preset button control includes a second button control, and the case statistical result includes names of all test cases corresponding to the second statistical conditions.
Further, the second statistical condition includes any one or more of: the execution is by use case name, execution failure use case name, execution blocking use case name, inapplicable use case name, and unexecuted use case name.
In a second aspect, the present application provides a test case-based processing apparatus, the apparatus comprising a receiving unit, a determining unit, and a displaying unit, wherein,
the receiving unit is used for receiving current operation input by a user, wherein the current operation comprises the steps that the user inputs a case statistic condition, and the user clicks a preset button control after inputting the case statistic condition;
the determining unit is configured to determine a case statistic result corresponding to the case statistic condition according to the current operation, where the case statistic result is used to indicate a result obtained by performing statistics on all test cases corresponding to the case statistic condition;
and the display unit is used for displaying the use case statistical result corresponding to the use case statistical condition.
Further, the apparatus further comprises: an acquisition unit;
the obtaining unit is configured to obtain a mind map test case file input by a user before the receiving unit receives the current operation, where the mind map test case file includes multiple test cases, each test case in the multiple test cases has an icon identifier, and the icon identifier is used to indicate an execution result of the test case;
the determining unit is specifically configured to determine the case statistical result based on icon identifications of all test cases corresponding to the case statistical conditions in the mind map test case file.
Further, the case statistical conditions include a first statistical condition, the preset button control includes a first button control, and the case statistical results include the number of different execution results of all test cases corresponding to the first statistical condition.
Furthermore, each test case in the plurality of test cases corresponds to a link, the link is sequentially provided with at least one level of non-leaf nodes and one leaf node, the starting positions of all the links correspond to the same non-leaf node, and the leaf node is provided with an icon identifier corresponding to the test case;
further, the determining unit is further configured to determine, before the obtaining unit obtains the mind map test case file, a statistical set corresponding to each non-leaf node based on icon identifications on all leaf nodes included in each non-leaf node, where the statistical set includes the number of different execution results corresponding to all leaf nodes included in the non-leaf node;
the determining unit is specifically configured to determine the non-leaf node indicated by the first statistical condition, and determine a statistical set corresponding to the indicated non-leaf node, which is the case statistical result.
Further, the case statistical conditions include second statistical conditions, the preset button control includes a second button control, and the case statistical result includes names of all test cases corresponding to the second statistical conditions.
Further, the second statistical condition includes any one or more of: the execution is by use case name, execution failure use case name, execution blocking use case name, inapplicable use case name, and unexecuted use case name.
In a third aspect, the present application provides a processing device based on test cases, including: a memory and a processor;
the memory for storing a computer program;
wherein the processor executes the computer program in the memory to implement any of the methods of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for performing any of the methods of the first aspect when executed by a processor.
The processing method, the device, the equipment and the storage medium based on the test case provided by the application receive the current operation input by the user, wherein the current operation comprises the steps that a user inputs a case statistic condition and clicks a preset button control after the user inputs the case statistic condition, then, according to the current operation, determining a case statistic result corresponding to the case statistic condition, and displaying the case statistic result corresponding to the case statistic condition to the user, namely, when the user needs to count, the user only needs to input the case counting conditions to be counted and then clicks the preset button component to obtain the corresponding case counting result, thereby avoiding the processes of manual searching, manual recording and manual counting of the user, therefore, the complexity of the statistical process is reduced, the efficiency of acquiring the required case statistical result is improved, and the statistical mode is more flexible.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a first schematic diagram of an interface interaction provided herein;
FIG. 2 is a second schematic diagram of an interface interaction provided herein;
fig. 3 is a schematic flowchart of a test case-based processing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a test case-based processing method according to a second embodiment of the present application;
FIG. 5 is a diagram illustrating contents of a mind map test case file according to a second embodiment of the present application;
fig. 6 is a schematic structural diagram of a processing apparatus based on test cases according to a third embodiment of the present application;
fig. 7 is a schematic structural diagram of a processing apparatus based on test cases according to a fourth embodiment of the present application;
fig. 8 is a schematic structural diagram of a test case-based processing device according to a fifth embodiment of the present application.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the prior art, a set of test cases compiled based on a mind map has the problem that when testers need to count the execution results of the test cases, the testers need to obtain the required case statistical results through manual searching, manual recording and manual counting, so that the efficiency of obtaining the required case statistical results is extremely low.
Based on this, the application provides a processing method, a device, equipment and a storage medium based on a test case, and by receiving a current operation input by a user, wherein the current operation comprises the steps that the user inputs a case statistical condition, and the user clicks a preset button control after the user inputs the case statistical condition, a case statistical result corresponding to the case statistical condition can be displayed to the user according to the current operation, namely, the user only needs to input a required case statistical condition and then clicks the preset button control, namely, the user only needs to operate two steps to obtain the required case statistical result. When the case statistical conditions comprise first statistical conditions, the preset button control comprises a first button control; and when the use case statistical conditions comprise second statistical conditions, the preset button control comprises a second button control. Specifically, fig. 1 is a schematic diagram of an interface interaction provided by the present application, and fig. 2 is a schematic diagram of an interface interaction provided by the present application. As shown in fig. 1, a user may input a first statistical condition in two input boxes corresponding to the statistical execution results shown in fig. 1, and then click a first button control, that is, a "statistical quantity" button control, to display a case statistical result corresponding to the first statistical condition, where the case statistical result includes the number of different execution results of the test case corresponding to the first statistical condition. As shown in fig. 2, the user may input the second statistical condition in the input box corresponding to the viewing execution condition shown in fig. 2, and then click the second button control, that is, the "viewing" button control, so as to display a case statistical result corresponding to the second statistical condition, where the case statistical result includes names of all test cases corresponding to the second statistical condition. The following describes in detail a test case-based processing method, apparatus, device, and storage medium provided by the present application.
Fig. 3 is a schematic flowchart of a test case-based processing method according to an embodiment of the present application, and as shown in fig. 3, the method includes:
step 301: receiving current operation input by a user, wherein the current operation comprises the steps that the user inputs a case statistic condition, and the user clicks a preset button control after inputting the case statistic condition.
In this embodiment, the current operation input by the user is received, where the user may specifically refer to a tester or the like, and this is not limited by this document. The current operation includes that a user inputs case statistical conditions, specifically, the user can input corresponding case statistical conditions according to actual requirements, for example, the user wants to count the execution results of all test cases at present, and the case statistical conditions input by the user can be "count all". The current operation further comprises that the user clicks the preset button control after inputting the case statistical condition, namely, after receiving the operation that the user inputs the case statistical condition and receiving the operation that the user clicks the preset button control, the case statistical result corresponding to the received case statistical condition is determined. That is, for the user, the user only needs to input a required use case statistical condition, and click the preset button control after the use case statistical condition is input.
Step 302: and determining a case statistical result corresponding to the case statistical condition according to the current operation, wherein the case statistical result is used for indicating the result of counting all test cases corresponding to the case statistical condition.
In this embodiment, after receiving an operation of a user inputting a case statistic condition and an operation of a user clicking a preset button control after inputting the case statistic condition, a case statistic result corresponding to the currently received case statistic condition is automatically determined, where the case statistic result is a result used for indicating that statistics is performed on all test cases corresponding to the case statistic condition. If the case counting condition is 'count all', after receiving the operation of inputting 'count all' by the user and receiving the operation of clicking the preset button control by the user, automatically determining the result of counting all the test cases, and displaying the result of counting all the test cases to the user.
For example, there are 8 test cases, where the execution result corresponding to test case 1 is execution pass, the execution result corresponding to test case 2 is execution failure, the execution result corresponding to test case 3 is execution pass, the execution result corresponding to test case 4 is execution block, the execution result corresponding to test case 5 is inapplicable, the execution result corresponding to test case 6 is unexecuted, the execution result corresponding to test case 7 is execution failure, the execution result corresponding to test case 8 is execution block, and assuming that the case statistic condition input by the user is "statistic complete", determining the case statistic result corresponding to the case statistic condition may include: "test cases total: 8; by: 2; failure: 2; blocking: 2; not applicable: 1; not executing: 1".
Step 303: and displaying the use case statistical result corresponding to the use case statistical condition.
In this embodiment, after determining the use case statistic result corresponding to the currently received use case statistic condition, the use case statistic result corresponding to the use case statistic condition may be displayed. The display format of the use-case statistical result may be configured in advance, for example, the display is performed according to the display format in step 302, or the number corresponding to different execution results is displayed vertically, and the like, which is not limited in this case. The above is merely illustrative of 8 test cases.
The embodiment provides a processing method based on a test case, which receives a current operation input by a user, wherein the current operation comprises the steps of inputting case statistical conditions by the user, clicking a preset button control after the user inputs the case statistical conditions, then determining case statistical results corresponding to the case statistical conditions according to the current operation, and displaying the case statistical results corresponding to the case statistical conditions to the user, namely when the user needs to perform statistics, the user only needs to input the case statistical conditions needing to be counted, and then clicking a preset button assembly to obtain the corresponding case statistical results, so that the processes of manual searching, manual recording and manual counting of the user are avoided, the complexity of the statistical process is reduced, the efficiency of obtaining the required case statistical results is improved, and the statistical mode is more flexible.
Fig. 4 is a schematic flowchart of a test case-based processing method provided in the second embodiment of the present application, and as shown in fig. 4, the method includes:
step 401: the method comprises the steps of obtaining a mind map test case file input by a user, wherein the mind map test case file comprises a plurality of test cases, each test case in the plurality of test cases is provided with an icon identification, and the icon identification is used for indicating an execution result of the test case.
In this embodiment, in order to display the case statistic result corresponding to the case statistic condition, the mind map test case file input by the user may be obtained first. In one implementation, as shown in fig. 1, a user may click on a "select case file" button control in fig. 1, and input a storage path "E: \ \ test. The thinking guide graph test case file comprises a plurality of test cases, each test case in the plurality of test cases is provided with an icon identification, and the icon identification is used for indicating an execution result of the test case, wherein the execution results of the test cases are different, the corresponding icon identifications are also different, if the execution result is that the execution passes, the execution result corresponds to one icon identification, and if the execution result is that the execution fails, the execution result corresponds to another icon identification. The mind map test case file can be obtained based on a preset execution specification, wherein the execution specification comprises: marking the corresponding test cases by using the well-defined icon identifications aiming at the executed test cases; and marking is not carried out aiming at the unexecuted test case, namely the icon corresponding to the unexecuted test case is marked to be empty.
Specifically, the thinking guide graph test case file comprises a plurality of test cases, each test case corresponds to one link, at least one level of non-leaf nodes and one leaf node are sequentially arranged on the links, the starting positions of all the links correspond to the same non-leaf node, and the leaf nodes are provided with icon identifications corresponding to the test cases. In other words, the starting position of the link is the root node, the end position of the link is the leaf node, and the starting positions of all the links correspond to the same non-leaf node, that is, all the links correspond to the same root node.
For example, fig. 5 is a schematic content diagram of a mind map test case file provided in the second embodiment of the present application, as shown in fig. 5, the mind map test case file includes 5 test cases in total, where a is a root node (i.e., a first-level non-leaf node), D, E, H, I, J is a leaf node, B, C is a second-level non-leaf node (which may also be referred to as a first child node), and F, G is a third-level non-leaf node (which may also be referred to as a second child node), that is, a complete link from the root node to the leaf node is used as a test case. D. E, H, I, the four leaf nodes have different icon identifications respectively, where the execution result indicated by the icon identification on D is an execution failure, the execution result indicated by the icon identification on E is an execution pass, the execution result indicated by the icon identification on H is an execution block, the execution result indicated by the icon identification on I is not applicable, the icon identification on J is null, and the execution result indicated by J is that the test case has not been executed yet.
In this embodiment, after obtaining the mind map test case file input by the user, the method may first convert the mind map test case file into a file in an XML format, and then, in order to improve the efficiency of obtaining the required case statistical result by the user, may further include: and determining a statistical set corresponding to each non-leaf node based on the icon identifications on all the leaf nodes contained in each non-leaf node, wherein the statistical set comprises the number of different execution results corresponding to all the leaf nodes contained in the non-leaf nodes.
Taking the content diagram of the mind map test case file shown in fig. 5 as an example, the mind map test case file totally includes A, B, C, F, G non-leaf nodes. For example, taking a non-leaf node F as an example, the non-leaf node F includes two leaf nodes, I and H, and then for the non-leaf node F, the determined statistical set includes "blocking: 1; not applicable: 1". Taking the non-leaf node C as an example, the non-leaf node C includes H, I, J leaf nodes in total, and the determined statistical set includes "block: 1; not applicable: 1; not executing: 1". The analogy can be made for the statistical sets of other non-leaf nodes, and the description is omitted here.
In an implementation manner, in order to facilitate statistics of a statistics set corresponding to each non-leaf node, all leaf nodes may be found through traversal, then, for each leaf node, which type of identifier exists in the current leaf node is judged, then, 1 is added to the number of such icon identifiers recorded in all father nodes of the current leaf node, and the icon identifiers are stored in a hashmap, all keys of the hashmap finally obtained after traversal are names of the non-leaf nodes in the thought-lead test case file, and the corresponding values are the statistics sets, that is, the statistics sets store the number of different icon identifiers contained in all leaf nodes contained in the corresponding non-leaf nodes under the statistics sets for list types. For example, D, E, H, I, J leaf nodes are found in the traversal, taking the traversal of the first leaf node D as an example, if the execution result represented by the icon identifier on the leaf node D is an execution failure, all the parent nodes of the leaf node D include non-leaf nodes B and a, the number of such icon identifiers recorded for the non-leaf nodes B is increased by 1, that is, 1 is obtained, and the number of such icon identifiers recorded for the non-leaf nodes a is increased by 1, that is, 1 is obtained; taking traversing the second leaf node E as an example, if all father nodes of the leaf node E include non-leaf nodes B and a, then 1 is added to the number of the icon identifications recorded in the non-leaf node B (1 is added from the previous 1), that is, 2 is obtained, 1 is added to the number of the icon identifications recorded in the non-leaf node a, that is, 2 is obtained, and so on, a statistical set corresponding to each non-leaf node can be obtained.
In addition, the key value in the hashmap is marked with a prefix according to the position of the non-leaf node, so that a user can count the execution result according to different dimensions, and the prefix is marked as a root, namely a root-key, according to the key value of the root node; the key value of the first child node marks that the prefix is first, namely first-key; the key value of the second child node is marked with a prefix of second, i.e., second-key, and the key values of the other child nodes are marked with more, i.e., more-key. Meanwhile, based on the prefix marked on the key, a corresponding statistical set can be quickly found, and then a corresponding use case statistical result is displayed for the user.
Step 402: receiving current operation input by a user, wherein the current operation comprises the steps that the user inputs a case statistic condition, and the user clicks a preset button control after inputting the case statistic condition.
In this embodiment, the use case statistical condition includes a first statistical condition, and correspondingly, the preset button control includes a first button control. As shown in fig. 1 or fig. 2, the first button control is a "count number" button control, and the user may input a first statistical condition in two input boxes corresponding to the "statistical execution result" in fig. 1, for example, the user wants to count the execution results of all test cases, the user may select "statistics all" for input in the first input box (first from left to right) corresponding to "statistics execution result", and for the case that the case statistic condition is "statistic all", the second input box corresponding to "statistic execution result" may be empty, then the user clicks the 'number of statistics' button control to obtain statistics of the execution results of all the test cases, taking the contents of the mind map test case file shown in fig. 5 as an example, the lower half of the interface shown in fig. 1 shows the case statistics results corresponding to all test cases to the user.
In this embodiment, in addition to counting the execution results of all test cases, statistical queries of different dimensions may be performed. For example, the user may further select and input a first child node in a first input box corresponding to the "statistics execution result", taking the content of the mind map test case file shown in fig. 5 as an example, the first input box includes B, C two first child nodes in total, and assuming that the name of the first child node B is login and the name of the first child node C is registration, if the user currently needs to perform statistics on the execution result of the test case corresponding to the first child node B, the user further needs to input the name of the first child node B in a second input box corresponding to the "statistics execution result" (i.e., input login), so that after the user clicks the "statistics query" button, the case statistics result corresponding to the first child node B is displayed. The statistical query for the second child node may be according to the statistical query for the first child node B, which is not described herein again.
In addition, query statistics of self-defined child nodes (namely self-defined non-leaf nodes) can be supported, namely, a user can input 'statistics defined by child nodes' in a first input box corresponding to 'statistics execution results', and then the user can input corresponding names in a second input box corresponding to 'statistics execution results'.
In this embodiment, the use case statistical condition includes a second statistical condition, and correspondingly, the preset button control includes a second button control. As shown in fig. 1 or fig. 2, the second button control is a "view" button control, and the user may input a second statistical condition in an input box corresponding to the "view execution condition" in fig. 1 or fig. 2, where the second statistical condition includes any one or more of the following: the execution is by use case name, execution failure use case name, execution blocking use case name, inapplicable use case name, and unexecuted use case name. For example, the user inputs the second statistical condition as the name of the execution passing case, and then clicks the "view" button control, so as to obtain the names of all the test cases passing the execution in all the test cases, taking the content of the mind map test case file shown in fig. 5 as an example, the lower half of the interface shown in fig. 2 shows all the test cases to the user, where all the execution results are the names of the test cases passing the execution, specifically, when displaying first, the names corresponding to the leaf nodes of the test cases can be displayed, and the test cases passing the execution a-B-E are displayed, where the displayed names are the names of the leaf nodes E (for example, the name of E is the name of the account password login).
Step 403: according to the current operation, determining a case statistical result based on icon identifications of all test cases corresponding to case statistical conditions in a mind-guide-graph test case file, wherein the case statistical result is used for indicating a result of counting all test cases corresponding to the case statistical conditions.
In this embodiment, after receiving the current operation input by the user, the case statistical result may be determined based on the icon identifications of all test cases corresponding to the case statistical conditions in the mind map test case file. For example, taking the case statistic conditions including the first statistic condition, the first statistic condition being "statistic all", and taking the contents of the mind map test case file shown in fig. 5 as an example, the case statistic result may be determined based on the icon identifications of the 5 test cases, that is, the icon identifications on the leaf nodes of the 5 test cases. For example, the case statistic conditions include a first statistic condition, the first statistic condition is "count first child node" and "log in" (i.e. name of first child node B), and taking the content of the mind map test case file shown in fig. 5 as an example, the corresponding case statistic result may be determined based on the icon identifications that 2 test cases (i.e. test cases a-B-D, A-B-E) corresponding to the first child node B have, i.e. the icon identifications on the leaf nodes of the 2 test cases. Further illustratively, if the case statistics conditions include a second statistics condition, where the second statistics condition is "execute pass case name", and the content of the mind map test case file shown in fig. 5 is taken as an example, the corresponding case statistics result is determined based on the icon identifier of the 1 test case (i.e., a-B-E) corresponding to the "execute pass case name", i.e., the icon identifier on the leaf node of the 1 test case, where the case statistics result is the name of the leaf node E.
In this embodiment, in order to more quickly show the use case statistic result to the user, when the use case statistic condition includes the first statistic condition and the preset button control includes the first button control, step 403 may specifically include: and determining the non-leaf node indicated by the first statistical condition, and determining a statistical set corresponding to the indicated non-leaf node, wherein the statistical set is a case statistical result.
Taking the contents of the mind map test case file shown in fig. 5 as an example, if the first statistical conditions input by the user include "statistics first child node" and "login" (i.e., name of first child node B), it may be determined that the non-leaf node indicated by the first statistical conditions is B, since the statistical set corresponding to each non-leaf node has been determined before, since the statistical set corresponding to B may be directly determined as the current case statistical result when the indicated non-leaf node is determined to be B.
Step 404: and displaying the use case statistical result corresponding to the use case statistical condition.
In this embodiment, after the use case statistic result corresponding to the use case statistic condition is determined, the use case statistic result may be displayed. As shown in fig. 1, the lower half of the interface shown in fig. 1 displays the use case statistic result corresponding to the first statistic condition "statistic all". The lower half of the interface shown in fig. 2 displays the use case statistics corresponding to the second statistical condition "execute by use case name". Fig. 1 and 2 show the use case statistics result to the user in the lower half area of the current query page, and in addition, a page may be popped up again to display the use case statistics result corresponding to the use case statistics condition.
In the embodiment, by receiving the first statistical condition input by the user, the quick query statistics of the execution result of the test case can be realized, and meanwhile, the statistics of the execution result under different dimensions can also be realized; in addition, by receiving the second statistical condition input by the user, the execution condition of the test case can be checked, and the flexibility of statistics is improved.
Fig. 6 is a schematic structural diagram of a processing apparatus based on test cases according to a third embodiment of the present application, and as shown in fig. 6, the apparatus includes: a receiving unit 601, a determining unit 602, and a display unit 603, wherein,
the receiving unit 601 is configured to receive a current operation input by a user, where the current operation includes inputting a case statistic condition by the user and clicking a preset button control after the user inputs the case statistic condition;
a determining unit 602, configured to determine, according to the current operation, a case statistical result corresponding to the case statistical condition, where the case statistical result is used to indicate a result of performing statistics on all test cases corresponding to the case statistical condition;
a display unit 603, configured to display a use case statistic result corresponding to the use case statistic condition.
The processing apparatus based on the test case provided in this embodiment is the same as the technical solution for implementing the processing method based on the test case provided in any of the foregoing embodiments, and the implementation principle and the technical effect are similar and are not described again.
Fig. 7 is a schematic structural diagram of a processing apparatus based on a test case according to a fourth embodiment of the present application, and based on the third embodiment, as shown in fig. 7, the apparatus further includes: an acquisition unit 701;
an obtaining unit 701, configured to obtain, before the receiving unit 601 receives the current operation, a mind map test case file input by a user, where the mind map test case file includes a plurality of test cases, each test case in the plurality of test cases has an icon identifier, and the icon identifier is used to indicate an execution result of the test case;
the determining unit 602 is specifically configured to determine a case statistical result based on icon identifications of all test cases corresponding to the case statistical conditions in the mind map test case file.
Further, the case statistical conditions include a first statistical condition, and the preset button control includes a first button control, and then the case statistical results include the number of different execution results of all test cases corresponding to the first statistical condition.
Furthermore, each test case in the plurality of test cases corresponds to a link, the link is sequentially provided with at least one level of non-leaf nodes and one leaf node, the initial positions of all the links correspond to the same non-leaf node, and the leaf node is provided with an icon identifier corresponding to the test case;
further, the determining unit 602 is further configured to determine, before the obtaining unit 701 obtains the mind map test case file, a statistical set corresponding to each non-leaf node based on the icon identifications on all leaf nodes included in each non-leaf node, where the statistical set includes the number of different execution results corresponding to all leaf nodes included in the non-leaf nodes;
the determining unit 602 is specifically configured to determine a non-leaf node indicated by the first statistical condition, and determine a statistical set corresponding to the indicated non-leaf node, where the statistical set is a use case statistical result.
Further, the case statistical conditions include second statistical conditions, the preset button control includes the second button control, and the case statistical result includes names of all test cases corresponding to the second statistical conditions.
Further, the second statistical condition includes any one or more of the following: the execution is by use case name, execution failure use case name, execution blocking use case name, inapplicable use case name, and unexecuted use case name.
The processing apparatus based on the test case provided in this embodiment is the same as the technical solution for implementing the processing method based on the test case provided in any of the foregoing embodiments, and the implementation principle and the technical effect are similar and are not described again.
Fig. 8 is a schematic structural diagram of a test case-based processing device according to a fifth embodiment of the present application, as shown in fig. 8, a memory 801 and a processor 802; the memory 801 is used for storing computer programs.
The processor 802 executes the computer program in the memory 801 to implement the technical solution of the test case-based processing method according to any implementation manner provided by the foregoing embodiments.
The present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement a technical solution of a test case-based processing method according to any one of the implementation manners provided in the foregoing embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (12)
1. A processing method based on test cases is characterized in that the method comprises the following steps:
receiving current operation input by a user, wherein the current operation comprises the steps that the user inputs a case statistic condition, and the user clicks a preset button control after inputting the case statistic condition;
determining a case statistical result corresponding to the case statistical condition according to the current operation, wherein the case statistical result is used for indicating a result of counting all test cases corresponding to the case statistical condition;
and displaying the use case statistical result corresponding to the use case statistical condition.
2. The method of claim 1, further comprising, prior to the receiving a current operation of a user input:
acquiring a mind map test case file input by a user, wherein the mind map test case file comprises a plurality of test cases, each test case in the plurality of test cases is provided with an icon identification, and the icon identification is used for indicating an execution result of the test case;
the determining of the use case statistical result corresponding to the use case statistical condition includes:
and determining the case statistical result based on the icon identifications of all test cases corresponding to the case statistical conditions in the mind map test case file.
3. The method according to claim 2, wherein the case statistic condition comprises a first statistic condition, and the preset button control comprises a first button control, and the case statistic result comprises the number of different execution results of all test cases corresponding to the first statistic condition.
4. The method according to claim 3, wherein each of the plurality of test cases corresponds to a link, the link is sequentially provided with at least one level of non-leaf node and one leaf node, the starting positions of all the links correspond to the same non-leaf node, and the leaf node is provided with an icon identifier corresponding to the test case in which the leaf node is located;
after the obtaining of the mind map test case file input by the user, the method further comprises:
determining a statistical set corresponding to each non-leaf node based on the icon identifications on all leaf nodes contained in each non-leaf node, wherein the statistical set comprises the number of different execution results corresponding to all leaf nodes contained in the non-leaf nodes;
the determining the case statistical result based on the icon identifications of all test cases corresponding to the case statistical conditions in the thought guide graph test case file comprises the following steps:
and determining the non-leaf node indicated by the first statistical condition, and determining a statistical set corresponding to the indicated non-leaf node, wherein the statistical set is the use case statistical result.
5. The method according to claim 1 or 2, wherein the case statistical conditions include a second statistical condition, and the preset button control includes a second button control, so that the case statistical result includes names of all test cases corresponding to the second statistical condition.
6. The method of claim 5, wherein the second statistical condition comprises any one or more of: the execution is by use case name, execution failure use case name, execution blocking use case name, inapplicable use case name, and unexecuted use case name.
7. A test case based processing apparatus, comprising a receiving unit, a determining unit, and a displaying unit, wherein,
the receiving unit is used for receiving current operation input by a user, wherein the current operation comprises the steps that the user inputs a case statistic condition, and the user clicks a preset button control after inputting the case statistic condition;
the determining unit is configured to determine a case statistic result corresponding to the case statistic condition according to the current operation, where the case statistic result is used to indicate a result obtained by performing statistics on all test cases corresponding to the case statistic condition;
and the display unit is used for displaying the use case statistical result corresponding to the use case statistical condition.
8. The apparatus of claim 7, further comprising: an acquisition unit;
the obtaining unit is configured to obtain a mind map test case file input by a user before the receiving unit receives the current operation, where the mind map test case file includes multiple test cases, each test case in the multiple test cases has an icon identifier, and the icon identifier is used to indicate an execution result of the test case;
the determining unit is specifically configured to determine the case statistical result based on icon identifications of all test cases corresponding to the case statistical conditions in the mind map test case file.
9. The apparatus of claim 8, wherein the use case statistic condition comprises a first statistic condition, and wherein the preset button control comprises a first button control, and the use case statistic result comprises a number of different execution results of all test cases corresponding to the first statistic condition.
10. The apparatus according to claim 7 or 8, wherein the use case statistic condition includes a second statistic condition, and the preset button control includes a second button control, so that the use case statistic result includes names of all test cases corresponding to the second statistic condition.
11. A test case based processing device, comprising: a memory and a processor;
the memory for storing a computer program;
wherein the processor executes the computer program in the memory to implement the method of any one of claims 1-6.
12. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, perform the method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010499707.7A CN111538673B (en) | 2020-06-04 | 2020-06-04 | Processing method, device, equipment and storage medium based on test case |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010499707.7A CN111538673B (en) | 2020-06-04 | 2020-06-04 | Processing method, device, equipment and storage medium based on test case |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111538673A true CN111538673A (en) | 2020-08-14 |
CN111538673B CN111538673B (en) | 2023-07-07 |
Family
ID=71978124
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010499707.7A Active CN111538673B (en) | 2020-06-04 | 2020-06-04 | Processing method, device, equipment and storage medium based on test case |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111538673B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112214398A (en) * | 2020-09-16 | 2021-01-12 | 武汉木仓科技股份有限公司 | Method and equipment for acquiring execution efficiency and test efficiency of test case in xmind tool |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016141077A1 (en) * | 2015-03-02 | 2016-09-09 | Edico Genome, Inc. | Bioinformatics systems, apparatuses, and methods executed on an integrated circuit processing platform |
CN106033389A (en) * | 2015-03-11 | 2016-10-19 | 腾讯科技(深圳)有限公司 | A test use case display method and device |
CN107741911A (en) * | 2017-11-01 | 2018-02-27 | 广州爱九游信息技术有限公司 | Interface test method, device, client and computer-readable recording medium |
CN108874671A (en) * | 2018-06-20 | 2018-11-23 | 上海哔哩哔哩科技有限公司 | Testing case management, device, system and storage medium |
CN109558317A (en) * | 2018-11-22 | 2019-04-02 | 网易(杭州)网络有限公司 | The processing method and processing device of test case |
CN109740122A (en) * | 2018-12-11 | 2019-05-10 | 中国联合网络通信集团有限公司 | The conversion method and device of mind map use-case file |
CN111078567A (en) * | 2019-12-19 | 2020-04-28 | 广州品唯软件有限公司 | Report generation method, terminal and storage medium of automatic test platform |
-
2020
- 2020-06-04 CN CN202010499707.7A patent/CN111538673B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016141077A1 (en) * | 2015-03-02 | 2016-09-09 | Edico Genome, Inc. | Bioinformatics systems, apparatuses, and methods executed on an integrated circuit processing platform |
CN106033389A (en) * | 2015-03-11 | 2016-10-19 | 腾讯科技(深圳)有限公司 | A test use case display method and device |
CN107741911A (en) * | 2017-11-01 | 2018-02-27 | 广州爱九游信息技术有限公司 | Interface test method, device, client and computer-readable recording medium |
CN108874671A (en) * | 2018-06-20 | 2018-11-23 | 上海哔哩哔哩科技有限公司 | Testing case management, device, system and storage medium |
CN109558317A (en) * | 2018-11-22 | 2019-04-02 | 网易(杭州)网络有限公司 | The processing method and processing device of test case |
CN109740122A (en) * | 2018-12-11 | 2019-05-10 | 中国联合网络通信集团有限公司 | The conversion method and device of mind map use-case file |
CN111078567A (en) * | 2019-12-19 | 2020-04-28 | 广州品唯软件有限公司 | Report generation method, terminal and storage medium of automatic test platform |
Non-Patent Citations (4)
Title |
---|
GUERKAN UYGUR等: "uC-Based ATE for Testing a DUT provided with Real-World Failure Models", 《AME 2018 - AUTOMOTIVE MEETS ELECTRONICS; 9TH GMM-SYMPOSIUM》, pages 1 - 7 * |
PRIYA RANI: "Testing with Mind Maps – An Introduction", pages 1 - 5, Retrieved from the Internet <URL:《 https://qa.world/testing-with-mind-maps/》> * |
李宁等: "基于思维导图的测试用例设计平台的实现与应用", 《电子世界》, pages 208 - 209 * |
王雪贞: "思维导图在软件测试中的应用", pages 1 - 8, Retrieved from the Internet <URL:《https://mp.weixin.qq.com/s?__biz=MjM5MjYxNDcyNA==&mid=2650707643&idx=1&sn=c5a2658d1c4dc4e29c81b1fb7bf389b7&chksm=bea9a69089de2f86271047c6e620d00ae6fcc26aefaa54348a3fce3509f5aa556305612d88d7&scene=27》> * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112214398A (en) * | 2020-09-16 | 2021-01-12 | 武汉木仓科技股份有限公司 | Method and equipment for acquiring execution efficiency and test efficiency of test case in xmind tool |
Also Published As
Publication number | Publication date |
---|---|
CN111538673B (en) | 2023-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107665171B (en) | Automatic regression testing method and device | |
AU2015315203B2 (en) | Conditional validation rules | |
CN110275878B (en) | Service data detection method and device, computer equipment and storage medium | |
US8904352B2 (en) | Systems and methods for processing source code during debugging operations | |
CN108446394A (en) | The control methods of file difference and device | |
CN105183658A (en) | Software code testing method and device | |
WO2022183675A1 (en) | Semiconductor intelligent inspection system, intelligent inspection method, and storage medium | |
CN108710571A (en) | A kind of method and apparatus generating automatic test code | |
Sae-Lim et al. | An investigative study on how developers filter and prioritize code smells | |
WO2020259034A1 (en) | Method, apparatus, and device for identifying offline source code, and storage medium | |
CN116991736A (en) | Static code analysis method, device, system and storage medium | |
CN111538673A (en) | Processing method, device, equipment and storage medium based on test case | |
CN114491044A (en) | Log processing method and device | |
US8479163B2 (en) | Simplifying maintenance of large software systems | |
CN107102938B (en) | Test script updating method and device | |
CN115981901A (en) | Fault positioning method, equipment and medium for automatic test of switch | |
CN110008124B (en) | Information processing method and device | |
CN114676061A (en) | Knowledge graph-based automatic firmware detection method | |
CN114385764A (en) | Reverse analysis method and device for relational database table structure | |
CN115185833A (en) | Abnormal code processing method and device, computer equipment and storage medium | |
CN113918370A (en) | Category determination method and device, electronic equipment and storage medium | |
CN113326193A (en) | Applet testing method and device | |
CN111694728A (en) | Automatic generation method and device of script | |
CN111831535A (en) | Code positioning method and device of test case and computer storage medium | |
WO2024067039A1 (en) | Application automated testing method, electronic device, and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |