CN108509339A - Method for generating test case, device based on browser and mind map and equipment - Google Patents

Method for generating test case, device based on browser and mind map and equipment Download PDF

Info

Publication number
CN108509339A
CN108509339A CN201810239941.9A CN201810239941A CN108509339A CN 108509339 A CN108509339 A CN 108509339A CN 201810239941 A CN201810239941 A CN 201810239941A CN 108509339 A CN108509339 A CN 108509339A
Authority
CN
China
Prior art keywords
test
test case
mind map
node
path
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.)
Pending
Application number
CN201810239941.9A
Other languages
Chinese (zh)
Inventor
谢秀松
陈德明
苏晓峰
高昊江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
North Capital Infotech Share Co Ltd
Original Assignee
North Capital Infotech Share Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by North Capital Infotech Share Co Ltd filed Critical North Capital Infotech Share Co Ltd
Priority to CN201810239941.9A priority Critical patent/CN108509339A/en
Publication of CN108509339A publication Critical patent/CN108509339A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis

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)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses method for generating test case, device and equipment based on browser and mind map, method includes:Obtain at least one destination node for being selected in the mind map of setting of user and with the matched searching algorithm of destination node, mind map includes and the associated at least two test points node of the test point of test case;According to position of the destination node in mind map, searching route is constructed according to searching algorithm, searching route using at least one test point node of mind map as multiple nodes of terminal by using the level-one node in mind map as starting point, being constituted;Corresponding test case is generated according to the searching route of construction, the problems such as scheme of the embodiment of the present invention solves high omission test point existing in the prior art, misuse rate, heavy workload and is costly and inefficient, realize the homogeneous classification management to test case, reduce the risk for omitting test point, workload and cost are reduced, and then promotes the formation efficiency of test case.

Description

Test case generation method, device and equipment based on browser and mind map
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a test case generation method, a test case generation device, test case generation equipment and a storage medium based on a browser and a mind map.
Background
The test case scientifically organizes and summarizes the behavior activities of the software test, and aims to convert the behavior of the software test into a manageable mode. The tester determines whether the application software or the software system works correctly according to the test case, and the test case is also one of the methods for specifically quantifying the test. At present, the commonly used test case compiling and generating method, system or tool includes: table software, thinking guide graph software, web page form software and the like.
The form software describes the test case in the form of a form, defines a header template of the test case in advance, and then compiles the test case. Each row of records represents a test case. The thinking guide diagram software is used for graphing and structuring the thinking of the test case design through the thinking guide diagram. One node or a plurality of nodes in the guide graph represent a test case. And finally, exporting Excel table data from the finished guide map. The web page form software takes the information of the test case as an attribute item, writes the test case in a form filled in by the web page form, and then performs summary processing on the data of the test case by the software background, so that the test case is uniformly managed, and most of test software in the industry designs and writes the test case in a web page form.
In the process of implementing the invention, the inventor finds that the prior art has the following defects:
the design idea cannot be intuitively reflected by the test case compiled by the table software, so that the test points are missed, the 100% coverage rate of the test points cannot be ensured, and the probability of misoperation is high. When the requirement changes and the existing test case is modified, the difficulty of determining the modification range and positioning the test case to be modified is higher. Particularly in the design of test cases of large projects, due to cooperative work of multiple persons, table data of multiple versions becomes very complex during combination and modification, and problems of repeated data, data omission, coverage of new version data by old version data and the like are often caused.
The conventional mind map software can be used only after being installed in an operating system, is a single-machine version, cannot uniformly manage the mind map data, and only can derive the map data into Excel form data and merge multiple forms of data one by one, so that the complexity of operation is increased. When the thinking guide graph is converted into the test case, Excel table data can be simply derived according to the hierarchical relation of the guide graph nodes, the obtained test case needs to be modified and adjusted, and no incidence relation exists between the test case and the thinking guide graph. When the requirement changes and the existing test case needs to be modified, the mind map must be modified first, then converted into the test case, and finally modified and adjusted. Thus resulting in excessive cost and inefficiency.
The form of the webpage can not intuitively embody the idea of the design of the test case, the test points are often missed, and the 100% coverage rate of the test points can not be ensured. Each test case needs to be filled in a webpage form once, and the test cases cannot be generated uniformly according to rules and rules, so that the efficiency of designing and compiling the test cases is extremely low.
Disclosure of Invention
Embodiments of the present invention provide a test case generation method, device, apparatus, and storage medium based on a browser and a mind map, so as to implement unified classification management on test cases, reduce risk of missing test points, reduce workload and cost, and further improve generation efficiency of test cases.
In a first aspect, an embodiment of the present invention provides a test case generation method based on a browser and a mind map, including:
acquiring at least one target node selected by a user in a set mind map and a search algorithm matched with the target node, wherein the mind map comprises at least two test point nodes associated with test points of a test case;
constructing a search path according to the search algorithm and the position of the target node in the mind map, wherein the search path is composed of a plurality of nodes taking a first-level node in the mind map as a starting point and at least one test point node of the mind map as an end point;
and generating a corresponding test case according to the constructed search path.
In a second aspect, an embodiment of the present invention further provides a test case generating device based on a browser and a mind map, including:
the data acquisition module is used for acquiring at least one target node selected by a user in a set mind map and a search algorithm matched with the target node, wherein the mind map comprises at least two test point nodes related to test points of a test case;
the path construction module is used for constructing a search path according to the position of the target node in the mind map and the search algorithm, wherein the search path is composed of a plurality of nodes which take a primary node in the mind map as a starting point and at least one test point node of the mind map as an end point;
and the test case generation module is used for generating a corresponding test case according to the constructed search path.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating the test case based on the browser and the mind map provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the test case generation method based on a browser and a mind map according to any embodiment of the present invention.
The embodiment of the invention obtains at least one target node selected by a user in a set mind map and a search algorithm matched with the target node; according to the position of a target node in a thought-derivative graph, a search path is constructed according to a search algorithm, and a corresponding test case is generated according to the constructed search path, so that the problems of test point omission, high misoperation rate, large workload, high cost, low efficiency and the like in the prior art are solved, the uniform classification management of the test cases is realized, the risk of test point omission is reduced, the workload and the cost are reduced, and the generation efficiency of the test case is further improved.
Drawings
FIG. 1a is a flowchart of a test case generation method based on a browser and a mind map according to an embodiment of the present invention;
FIG. 1b is a diagram illustrating a mind map provided by an embodiment of the present invention;
FIG. 2a is a flowchart of a test case generation method based on a browser and a mind map according to a second embodiment of the present invention;
FIG. 2b is a schematic diagram of a tree structure of a traversal algorithm according to a second embodiment of the present invention;
FIG. 2c is a schematic diagram of a tree structure of a Cartesian product algorithm according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a test case generating apparatus based on a browser and a mind map according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.
It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1a is a flowchart of a test case generating method based on a browser and a mind map according to an embodiment of the present invention, where the embodiment is applicable to a case of generating a test case according to an acquired mind map, and the method may be executed by a test case generating apparatus based on a browser and a mind map, where the apparatus may be implemented by software and/or hardware, as shown in fig. 1a, and the method includes the following operations:
s110, obtaining at least one target node selected by a user in a set mind map and a search algorithm matched with the target node, wherein the mind map comprises at least two test point nodes related to test points of a test case.
The mind map is also called brain map and mind map, and is an image-based thinking tool and an auxiliary tool for thinking by using images. Mind map is an idea that uses a central keyword or idea to elicit visual construction and classification; it uses a central keyword or idea to connect all the graphic ways representing words, ideas, tasks or other related items in radial line. The set mind map refers to the mind map written by the user according to the functional requirements and the test requirements of the test case. The search algorithm is specified according to the nodes in the mind map, and may be used to automatically generate test cases according to the nodes in the mind map, including a traversal algorithm, a cartesian product algorithm, and other suitable algorithms, which are not limited in this embodiment of the present invention. The target nodes are the nodes in the thought-graph that match the search algorithm. The test points are points of functions to be tested, which are obtained from product requirements, for example, in a simple login test, a user name and a password are 2 test points. The test point nodes are the nodes corresponding to the test points in the thought-derivative graph.
In an alternative embodiment of the invention, the mind map is generated by browser rendering in an application system of browser and server architecture. The Browser and Server structure application system is a B/S (Browser/Server, Browser/Server mode) framework, an operation interface in the system is realized through a WEB Browser, and a user machine only needs to be provided with the WEB Browser. A user can directly access the server through the browser and trigger the function of drawing the mind map through an open source control in the server. Therefore, when the mind map is used, tool software of a C/S (Client/Server) framework does not need to be installed in an operating system, the mind map data management method and the mind map data management device are suitable for a multi-user cooperation working mode of a large project, and can complete unified management of the mind map data, so that the load of a Client computer is greatly simplified, the cost and workload of system maintenance and upgrading are reduced, and the total cost of a user is reduced.
In the embodiment of the invention, the test case is designed and compiled in a mode of drawing a thinking guide graph, and the design thought of a user is intuitively displayed in a graphical and structured mode by using the skill of combining pictures and texts, so that the user can be assisted to complete complex design, and the risk of missing test points is reduced. The hierarchical structure of the mind map, the search algorithm and the test cases are combined, and the test cases in the mind map can be simply and intuitively expressed.
In an alternative embodiment of the invention, the mind map includes at least 5 levels of nodes; the first-level nodes of the thinking guide graph correspond to the module names of the test cases; the secondary node corresponds to the function name of the test case; the three-level nodes correspond to the subfunction names of the test cases; the four-level nodes correspond to the test items of the test cases; and the nodes at and above the fifth level correspond to the test points of the test case.
FIG. 1b is a diagram of a mind map according to an embodiment of the present invention. In one specific example, the mind map is drawn with the functional requirements managed by the customer, as shown in FIG. 1 b. Wherein, the first level node (root node) corresponds to the module name of the test case: customer management; the secondary node corresponds to the function name of the test case: registering a customer and a customer category; the three-level node corresponds to the subfunction name of the test case: interface and classification criteria; the four-level nodes correspond to test items of the test cases: the username and customer priority; the nodes of five levels and above correspond to the test points of the test case: 8 digit number composition, order number, reputation level, registration time length, and empty user name sum is greater than 1000.
In the embodiment of the invention, after the thought guide graph finally drawn by the user through the browser is obtained, corresponding target nodes in the thought guide graph can be matched with corresponding search algorithms according to specific requirements and the distribution situation of the nodes in the thought guide graph aiming at different test cases.
S120, constructing a search path according to the search algorithm according to the position of the target node in the mind map, wherein the search path is composed of a plurality of nodes taking a first-level node in the mind map as a starting point and at least one test point node of the mind map as an end point.
It should be noted that, in a thought graph, nodes without child nodes are called leaf nodes. The search path is a path from the primary node to one of the leaf nodes, and one test case corresponds to one search path. As shown in fig. 1b, the client administration-registered client-interface-username-8-digit composition-null username is one of the search paths constructed according to the search algorithm.
And S130, generating a corresponding test case according to the constructed search path.
In the embodiment of the invention, after the target nodes in the mind map are matched with the search algorithm, the system can automatically generate the required test cases according to the mind map and the search algorithm. Instead of simply deriving Excel table data according to the node hierarchical relation of the thought-derivative graph, and then combining multiple pieces of table data one by one. According to the embodiment of the invention, the mind map is converted into the test case set according to the search algorithm, so that the incidence relation between the mind map and the test cases is established. When the requirement changes, the mind map does not need to be modified and then converted into a test case, and then modified and adjusted, so that the workload of test case compiling can be greatly reduced, the working efficiency is greatly improved, and the cost of test case design compiling is saved.
The embodiment of the invention obtains at least one target node selected by a user in a set mind map and a search algorithm matched with the target node; according to the position of a target node in a thought-derivative graph, a search path is constructed according to a search algorithm, and a corresponding test case is generated according to the constructed search path, so that the problems of test point omission, high misoperation rate, large workload, high cost, low efficiency and the like in the prior art are solved, the uniform classification management of the test cases is realized, the risk of test point omission is reduced, the workload and the cost are reduced, and the generation efficiency of the test case is further improved.
Example two
Fig. 2a is a flowchart of a test case generating method based on a browser and a mind map according to a second embodiment of the present invention, where in this embodiment, on the basis of the foregoing embodiments, a search algorithm is further specifically a traversal algorithm and a cartesian product algorithm, and on this basis, a test case is generated according to the mind map, as shown in fig. 2a, the method of this embodiment may include:
s210, obtaining at least one target node selected by a user in the set thinking map and a search algorithm matched with the target node.
S220, constructing a search path according to the search algorithm according to the position of the target node in the thinking map.
In an alternative embodiment of the present invention, the search algorithm may include a traversal algorithm and a Cartesian product algorithm. The traversal algorithm is to search all the search paths from the first-level node of the thought-guide graph to each leaf node under the designated node. Each search path from a primary node to a leaf node represents a complete test case. If the target node is not a leaf node, a plurality of search paths passing through the target node, namely a set formed by a plurality of test cases, can be obtained. If the target node is a leaf node, a search path, namely a test case, can be obtained. The Cartesian product algorithm means that a traversal algorithm is firstly carried out on N (N >1) arbitrary nodes to obtain a set of N paths, then Cartesian product operation is carried out on the N sets, if the same path exists in the operation result, the same path is merged, and the final result is the set of test cases.
Fig. 2B is a schematic diagram of a tree structure of a traversal algorithm according to a second embodiment of the present invention, as shown in fig. 2B, node B and node X are two secondary nodes, and if the target node B is set to use the traversal algorithm, three search paths from the primary node a to each leaf node (E, F, G) under the target node B can be obtained, that is, three test cases are respectively: a- > B- > C- > D- > E, A- > B- > C- > D- > F and A- > B- > C- > D- > G.
Correspondingly, when the search algorithm includes a traversal algorithm, S220 may specifically include:
s221a, according to the position of the target node in the thought-derivative graph, constructing a local basic sub-path which takes the primary node matched with the target node as a starting point and the target node as an end point.
The local basic sub-path refers to a path including a first-level node and a target node in the search path. The traversal algorithm searches paths based on the partial basic sub-paths, and then constructs at least one complete search path. As shown in fig. 2B, if the user selects node B as the target node, node a (start point) and node B (end point) form a local basic sub-path a- > B.
S222a, respectively constructing local difference sub-paths with the target node as a starting point and all test point nodes associated with the target node as an ending point.
The local difference sub-path refers to a path to a leaf node which is further searched according to a traversal algorithm on the basis of the local basic sub-path.
For example, as shown in fig. 2B, if the user selects node B as the target node, and node a (start point) and node B (end point) form a local basic sub-path, the paths C- > D- > E, C- > D- > F and C- > D- > G further searched by the traversal algorithm based on the local basic sub-path are 3 local difference sub-paths.
S223a, combining the local basic sub-path and all the local difference sub-paths respectively to obtain the search path.
Specifically, still referring to the above example, the traversal algorithm performs traversal on the basis of the local base sub-path a- > B to obtain the local difference sub-paths C- > D- > E, C- > D- > F and C- > D- > G corresponding to each leaf node, and combines the local base sub-path with all the local difference sub-paths respectively to obtain three complete search paths a- > B- > C- > D- > E, A- > B- > C- > D- > F and a- > B- > C- > D- > G.
Correspondingly, when the number of the target nodes is at least two and the search algorithm includes a cartesian product algorithm, S220 may specifically include:
s221b, constructing and obtaining an original path set corresponding to each target node according to the positions of the target nodes in the thought-derivative graph and a traversal algorithm.
The original path set is all search paths obtained according to the first-level nodes and the target nodes and the traversal algorithm. It should be noted that, when the cartesian product algorithm is used to obtain the search path, at least two target nodes are required.
Fig. 2c is a schematic diagram of a tree structure of a cartesian product algorithm according to the second embodiment of the present invention, as shown in fig. 2c, if nodes D and G in the mind map specify the cartesian product algorithm, the traversal algorithm needs to be performed on the nodes D to obtain an original path set X, where search paths include: a- > B- > C- > D- > E and A- > B- > C- > D- > F, and a traversal algorithm is carried out on the node G to obtain an original path set Y, wherein the included search paths are respectively as follows: a- > B- > C- > G- > H and A- > B- > C- > G- > L.
S222b, calculating cartesian products of the original path sets corresponding to the target nodes, respectively, to obtain a combined path set.
Specifically, after the original path set corresponding to the target node is obtained, cartesian product calculation needs to be performed on the original path set to obtain a combined path set.
In a specific example, as shown in fig. 2c, the original path set X corresponding to the node D is: a- > B- > C- > D- > E and A- > B- > C- > D- > F, and the original path set Y corresponding to the node G is as follows: a- > B- > C- > G- > H and A- > B- > C- > G- > L, and calculating Cartesian products of the set X and the set Y to obtain a combined path set Z. Wherein, the groups and the search paths included in the set Z are respectively: (A- > B- > C- > D- > E) + (A- > B- > C- > G- > H), (A- > B- > C- > D- > E) + (A- > B- > C- > G- > L), (A- > B- > C- > D- > F) + (A- > B- > C- > G- > H) and (A- > B- > C- > D- > F) + (A- > B- > C- > G- > L).
S223b, merging the same elements in each combined search path of the combined path set to obtain the search path.
Correspondingly, after the combined path set is obtained, all groups and the search paths in the set are merged, so that the final search path is obtained. For example, in each combined search path (A- > B- > C- > D- > E) + (A- > B- > C- > G- > H), (A- > B- > C- > D- > E) + (A- > B- > C- > G- > L), (A- > B- > C- > D- > F) + (A- > B- > D-C- > G- > H) and (A- > B- > C- > D- > F) + (A- > B- > C- > G- > L), the same paths of the elements in the set Z are combined to obtain the search path A- > B- > C- > (D- > E) + (G- > H) A- > B- > C- > (D- > E) + (G- > L), A- > B- > C- > (D- > F) + (G- > H) and A- > B- > C- > (D- > F) + (G- > L).
And S230, filling the node contents of each node in the search path into a corresponding table of a test case form to obtain the test case.
And the corresponding relation between each table head name and each node in the test case form is pre-established.
In the embodiment of the invention, a corresponding search path is generated by combining a thought guide graph and a search algorithm, and the node content of each node in the search path is filled in a corresponding table of a test case form. In the corresponding table of the test case form, corresponding relations exist between each table head and each node, and each line record in the form represents one test case.
In a specific example, as shown in fig. 1b, in the process of drawing a mental diagram according to the functional requirements managed by customers, the first-level node, i.e. the module name, is called customer management; the secondary nodes, namely the function names, are registered customers and customer classes; the name of the three-level node, namely the subfunction, is the interface and the classification standard; the four-level nodes, namely the test items, are the names of the users and the priorities of the users; the nodes of five levels and above, namely test points, are composed of 8 digits, order number, reputation level, registration time and empty user name, 1-7 digits, 8 digits, 9 or more digits, nondigits, more than 1000, less than or equal to 1000, more than or equal to 90, less than or equal to 90, more than 2 years and less than or equal to 2 years. Table 2-1 is a test case generated from the mind map shown in FIG. 1b and the corresponding search algorithm. In the thinking diagram shown in fig. 1b, the target node "registered customer" is set as the traversal algorithm, and three target nodes "order number", "reputation level" and "registration duration" are combined to form a cartesian product algorithm, and the generated test is shown in table 2-1, for example.
Test cases generated in Table 2-1
According to the embodiment of the invention, the traversal algorithm or Cartesian product algorithm is specified for the target node, and the corresponding test case is generated by combining the thought guide graph, so that the problems of test point omission, high misoperation rate, large workload, high cost, low efficiency and the like in the prior art are solved, the unified classification management of the test cases is realized, the risk of the test point omission is reduced, the workload and the cost are reduced, and the generation efficiency of the test case is further improved.
EXAMPLE III
Fig. 3 is a schematic diagram of a test case generating apparatus based on a browser and a mind map according to a third embodiment of the present invention, which is capable of executing a test case generating method based on a browser and a mind map according to any embodiment of the present invention.
The device comprises: a data acquisition module 310, and a test case generation module 330, wherein:
the data acquisition module 310 is configured to acquire at least one target node selected by a user in a set mind map and a search algorithm matched with the target node, where the mind map includes at least two test point nodes associated with test points of a test case;
a path construction module 320, configured to construct a search path according to the search algorithm according to the position of the target node in the mind map, where the search path is composed of a plurality of nodes that use a first-level node in the mind map as a starting point and use at least one test point node of the mind map as an end point;
and the test case generating module 330 is configured to generate a corresponding test case according to the constructed search path.
The embodiment of the invention obtains at least one target node selected by a user in a set mind map and a search algorithm matched with the target node; according to the position of a target node in a thought-derivative graph, a search path is constructed according to a search algorithm, and a corresponding test case is generated according to the constructed search path, so that the problems of test point omission, high misoperation rate, large workload, high cost, low efficiency and the like in the prior art are solved, the uniform classification management of the test cases is realized, the risk of test point omission is reduced, the workload and the cost are reduced, and the generation efficiency of the test case is further improved.
Optionally, the search algorithm includes: traversing an algorithm; the path constructing module 320 is further configured to construct a local basic sub-path with a primary node matched with the target node as a starting point and the target node as an end point according to the position of the target node in the mind map; respectively constructing local difference sub-paths which take the target node as a starting point and all test point nodes related to the target node as an end point; and respectively combining the local basic sub-path with all the local difference sub-paths to obtain the search path.
Optionally, the number of the target nodes is at least two, and the search algorithm includes: a Cartesian product algorithm; the path constructing module 320 is further configured to construct a search path according to the search algorithm according to the position of the target node in the mind map, including: constructing and obtaining an original path set corresponding to each target node according to the positions of the target nodes in the thought-derivative graph and a traversal algorithm; calculating Cartesian products of the original path sets respectively corresponding to the target nodes to obtain a combined path set; and merging the same elements in each combined search path of the combined path set to obtain the search path.
Optionally, the test case generating module 330 is further configured to fill the node contents of each node in the search path in a corresponding table of a test case form to obtain the test case; and the corresponding relation between each table head name and each node in the test case form is pre-established.
Optionally, the mind map includes at least 5 levels of nodes; the first-level nodes of the thinking guide graph correspond to the module names of the test cases; the secondary node corresponds to the function name of the test case; the three-level nodes correspond to the subfunction names of the test cases; the four-level nodes correspond to the test items of the test cases; and the nodes at and above the fifth level correspond to the test points of the test case.
Optionally, the mind map is generated by drawing in a browser in an application system of a browser and server structure.
The test case generation device based on the browser and the mind map can execute the test case generation method based on the browser and the mind map provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For the technical details that are not described in detail in this embodiment, reference may be made to a test case generation method based on a browser and a mind map according to any embodiment of the present invention.
Example four
Fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention. FIG. 4 shows a block diagram of a device 412 suitable for implementing an embodiment of the invention. The device 412 shown in fig. 4 is only an example and should not impose any limitation on the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, device 412 is in the form of a general purpose computing device. The components of device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 that couples the various system components including the storage device 428 and the processors 416.
Bus 418 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 412 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by device 412 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 428 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 430 and/or cache Memory 432. The device 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 418 by one or more data media interfaces. Storage 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program 436 having a set (at least one) of program modules 426 may be stored, for example, in storage 428, such program modules 426 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination may comprise an implementation of a network environment. Program modules 426 generally perform the functions and/or methodologies of embodiments of the invention as described herein.
The device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, camera, display 424, etc.), with one or more devices that enable a user to interact with the device 412, and/or with any devices (e.g., network card, modem, etc.) that enable the device 412 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 422. Further, the device 412 may also communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 420. As shown, network adapter 420 communicates with the other modules of device 412 over bus 418. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the device 412, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 416 executes various functional applications and data processing by executing programs stored in the storage 428, for example, implementing the test case generation method based on the browser and mind map provided by the above-described embodiment of the present invention.
That is, the processing unit implements, when executing the program: acquiring at least one target node selected by a user in a set mind map and a search algorithm matched with the target node, wherein the mind map comprises at least two test point nodes associated with test points of a test case; constructing a search path according to the search algorithm and the position of the target node in the mind map, wherein the search path is composed of a plurality of nodes taking a first-level node in the mind map as a starting point and at least one test point node of the mind map as an end point; and generating a corresponding test case according to the constructed search path.
Acquiring at least one target node selected by a user in a set mind map and a search algorithm matched with the target node through the equipment; according to the position of a target node in a thought-derivative graph, a search path is constructed according to a search algorithm, and a corresponding test case is generated according to the constructed search path, so that the problems of test point omission, high misoperation rate, large workload, high cost, low efficiency and the like in the prior art are solved, the uniform classification management of the test cases is realized, the risk of test point omission is reduced, the workload and the cost are reduced, and the generation efficiency of the test case is further improved.
EXAMPLE five
An embodiment of the present invention further provides a computer storage medium storing a computer program, where the computer program is used to execute the test case generation method based on a browser and a mind map according to any one of the above embodiments of the present invention when executed by a computer processor: acquiring at least one target node selected by a user in a set mind map and a search algorithm matched with the target node, wherein the mind map comprises at least two test point nodes associated with test points of a test case; constructing a search path according to the search algorithm and the position of the target node in the mind map, wherein the search path is composed of a plurality of nodes taking a first-level node in the mind map as a starting point and at least one test point node of the mind map as an end point; and generating a corresponding test case according to the constructed search path.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM) or flash Memory), an optical fiber, a portable compact disc Read Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A test case generation method based on a browser and a mind map is characterized by comprising the following steps:
acquiring at least one target node selected by a user in a set mind map and a search algorithm matched with the target node, wherein the mind map comprises at least two test point nodes associated with test points of a test case;
constructing a search path according to the search algorithm and the position of the target node in the mind map, wherein the search path is composed of a plurality of nodes taking a first-level node in the mind map as a starting point and at least one test point node of the mind map as an end point;
and generating a corresponding test case according to the constructed search path.
2. The method of claim 1, wherein the search algorithm comprises: traversing an algorithm;
constructing a search path according to the search algorithm according to the position of the target node in the thinking map, wherein the search path comprises the following steps:
constructing a local basic sub-path which takes a primary node matched with the target node as a starting point and the target node as an end point according to the position of the target node in the thinking map;
respectively constructing local difference sub-paths which take the target node as a starting point and all test point nodes related to the target node as an end point;
and respectively combining the local basic sub-path with all the local difference sub-paths to obtain the search path.
3. The method of claim 1, wherein the number of target nodes is at least two, and wherein the search algorithm comprises: a Cartesian product algorithm;
constructing a search path according to the search algorithm according to the position of the target node in the thinking map, wherein the search path comprises the following steps:
constructing and obtaining an original path set corresponding to each target node according to the positions of the target nodes in the thought-derivative graph and a traversal algorithm;
calculating Cartesian products of the original path sets respectively corresponding to the target nodes to obtain a combined path set;
and merging the same elements in each combined search path of the combined path set to obtain the search path.
4. The method according to any one of claims 1 to 3, wherein generating a corresponding test case according to the generated search path includes:
filling the node contents of each node in the search path into a corresponding table of a test case form to obtain the test case;
and the corresponding relation between each table head name and each node in the test case form is pre-established.
5. The method according to any of claims 1-3, wherein said mind map includes at least 5 levels of nodes; wherein,
the primary nodes of the mind map correspond to the module names of the test cases; the secondary node corresponds to the function name of the test case; the three-level nodes correspond to the subfunction names of the test cases; the four-level nodes correspond to the test items of the test cases; and the nodes at and above the fifth level correspond to the test points of the test case.
6. The method of claim 5, wherein the mind map is generated by browser rendering in an application system of a browser and server architecture.
7. A test case generation device based on a browser and a mind map is characterized by comprising:
the data acquisition module is used for acquiring at least one target node selected by a user in a set mind map and a search algorithm matched with the target node, wherein the mind map comprises at least two test point nodes related to test points of a test case;
the path construction module is used for constructing a search path according to the position of the target node in the mind map and the search algorithm, wherein the search path is composed of a plurality of nodes which take a primary node in the mind map as a starting point and at least one test point node of the mind map as an end point;
and the test case generation module is used for generating a corresponding test case according to the constructed search path.
8. The apparatus of claim 7, wherein the search algorithm comprises: traversing an algorithm;
the path construction module is further used for constructing a local basic sub-path which takes a primary node matched with the target node as a starting point and the target node as an end point according to the position of the target node in the thought guide graph;
respectively constructing local difference sub-paths which take the target node as a starting point and all test point nodes related to the target node as an end point;
combining the local basic sub-path with all the local difference sub-paths respectively to obtain the search path;
the number of the target nodes is at least two, and the search algorithm comprises the following steps: a Cartesian product algorithm;
the path construction module is further configured to construct a search path according to the search algorithm and according to the position of the target node in the mind map, and includes:
constructing and obtaining an original path set corresponding to each target node according to the positions of the target nodes in the thought-derivative graph and a traversal algorithm;
calculating Cartesian products of the original path sets respectively corresponding to the target nodes to obtain a combined path set;
merging the same elements in each combined search path of the combined path set to obtain the search path;
the test case generation module is further configured to fill the node contents of each node in the search path in a corresponding table of a test case form to obtain the test case;
wherein, the corresponding relation between each table head name and each node in the test case table is pre-established;
the mind map includes at least 5 levels of nodes; wherein,
the primary nodes of the mind map correspond to the module names of the test cases; the secondary node corresponds to the function name of the test case; the three-level nodes correspond to the subfunction names of the test cases; the four-level nodes correspond to the test items of the test cases; nodes at and above five levels correspond to the test points of the test case;
the mind map is generated by drawing through a browser in an application system of a browser and server structure.
9. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the browser and mind map based test case generation method recited in any one of claims 1-6.
10. A computer storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method for test case generation based on a browser and mind map as claimed in any one of claims 1 to 6.
CN201810239941.9A 2018-03-22 2018-03-22 Method for generating test case, device based on browser and mind map and equipment Pending CN108509339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810239941.9A CN108509339A (en) 2018-03-22 2018-03-22 Method for generating test case, device based on browser and mind map and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810239941.9A CN108509339A (en) 2018-03-22 2018-03-22 Method for generating test case, device based on browser and mind map and equipment

Publications (1)

Publication Number Publication Date
CN108509339A true CN108509339A (en) 2018-09-07

Family

ID=63378070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810239941.9A Pending CN108509339A (en) 2018-03-22 2018-03-22 Method for generating test case, device based on browser and mind map and equipment

Country Status (1)

Country Link
CN (1) CN108509339A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542784A (en) * 2018-11-19 2019-03-29 中国银行股份有限公司 A kind of test cases inspection method and device
CN109684209A (en) * 2018-12-17 2019-04-26 北京奇虎科技有限公司 A kind of method for generating test case, device and electronic equipment
CN109726125A (en) * 2018-12-21 2019-05-07 郑州云海信息技术有限公司 The processing method and processing device of test case in a kind of mind map
CN109800147A (en) * 2018-12-14 2019-05-24 平安普惠企业管理有限公司 A kind of test cases generation method and terminal device
CN112148593A (en) * 2020-09-01 2020-12-29 杭州大搜车汽车服务有限公司 Test case management method, device and equipment
CN112181849A (en) * 2020-10-23 2021-01-05 网易(杭州)网络有限公司 Test case identification method, device, equipment and storage medium
CN112346987A (en) * 2020-11-25 2021-02-09 武汉光庭信息技术股份有限公司 Test case generation and conversion method and system based on Xmind
CN112463596A (en) * 2020-11-17 2021-03-09 武汉木仓科技股份有限公司 Test case data processing method, device and equipment and processing equipment
CN112988605A (en) * 2021-05-10 2021-06-18 云账户技术(天津)有限公司 Method and device for realizing WEB application automatic test
CN113094288A (en) * 2021-05-18 2021-07-09 绿漫科技有限公司 Method for converting mind map into test case based on Xmind
CN113238932A (en) * 2021-04-30 2021-08-10 西南电子技术研究所(中国电子科技集团公司第十研究所) Automatic test case generation method
CN113377661A (en) * 2021-06-23 2021-09-10 深圳平安智汇企业信息管理有限公司 Interface testing method and device, electronic equipment and storage medium
CN113495827A (en) * 2020-03-20 2021-10-12 株洲中车时代电气股份有限公司 Method for exporting excel test case based on mind mapping tool
CN113791980A (en) * 2021-09-17 2021-12-14 中国平安人寿保险股份有限公司 Test case conversion analysis method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050193269A1 (en) * 2000-03-27 2005-09-01 Accenture Llp System, method, and article of manufacture for synchronization in an automated scripting framework
EP1749264A2 (en) * 2004-05-05 2007-02-07 Silverdata Limited An analytical software design system
CN101201740A (en) * 2007-10-12 2008-06-18 北京赛柏科技有限责任公司 Method for generating test case based on process model
CN101464797A (en) * 2008-12-09 2009-06-24 北京星网锐捷网络技术有限公司 Method and system for automatically generating test use case based on unified modeling language activity graph
CN104407977A (en) * 2014-12-08 2015-03-11 北京航空航天大学 Model detection based automatic joint debugging test method for staged task system
CN106033389A (en) * 2015-03-11 2016-10-19 腾讯科技(深圳)有限公司 A test use case display method and device
CN107273297A (en) * 2017-06-28 2017-10-20 百度在线网络技术(北京)有限公司 Method and apparatus for generating test case
CN107491394A (en) * 2017-08-25 2017-12-19 中国银行股份有限公司 A kind of method for testing and analyzing and device based on digraph identification

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050193269A1 (en) * 2000-03-27 2005-09-01 Accenture Llp System, method, and article of manufacture for synchronization in an automated scripting framework
EP1749264A2 (en) * 2004-05-05 2007-02-07 Silverdata Limited An analytical software design system
CN101201740A (en) * 2007-10-12 2008-06-18 北京赛柏科技有限责任公司 Method for generating test case based on process model
CN101464797A (en) * 2008-12-09 2009-06-24 北京星网锐捷网络技术有限公司 Method and system for automatically generating test use case based on unified modeling language activity graph
CN104407977A (en) * 2014-12-08 2015-03-11 北京航空航天大学 Model detection based automatic joint debugging test method for staged task system
CN106033389A (en) * 2015-03-11 2016-10-19 腾讯科技(深圳)有限公司 A test use case display method and device
CN107273297A (en) * 2017-06-28 2017-10-20 百度在线网络技术(北京)有限公司 Method and apparatus for generating test case
CN107491394A (en) * 2017-08-25 2017-12-19 中国银行股份有限公司 A kind of method for testing and analyzing and device based on digraph identification

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542784A (en) * 2018-11-19 2019-03-29 中国银行股份有限公司 A kind of test cases inspection method and device
CN109800147B (en) * 2018-12-14 2024-03-08 天航长鹰(江苏)科技有限公司 Test case generation method and terminal equipment
CN109800147A (en) * 2018-12-14 2019-05-24 平安普惠企业管理有限公司 A kind of test cases generation method and terminal device
CN109684209A (en) * 2018-12-17 2019-04-26 北京奇虎科技有限公司 A kind of method for generating test case, device and electronic equipment
CN109726125A (en) * 2018-12-21 2019-05-07 郑州云海信息技术有限公司 The processing method and processing device of test case in a kind of mind map
CN113495827A (en) * 2020-03-20 2021-10-12 株洲中车时代电气股份有限公司 Method for exporting excel test case based on mind mapping tool
CN112148593A (en) * 2020-09-01 2020-12-29 杭州大搜车汽车服务有限公司 Test case management method, device and equipment
CN112148593B (en) * 2020-09-01 2024-04-19 杭州大搜车汽车服务有限公司 Test case management method, device and equipment
CN112181849A (en) * 2020-10-23 2021-01-05 网易(杭州)网络有限公司 Test case identification method, device, equipment and storage medium
CN112181849B (en) * 2020-10-23 2023-07-25 网易(杭州)网络有限公司 Test case identification method, device, equipment and storage medium
CN112463596A (en) * 2020-11-17 2021-03-09 武汉木仓科技股份有限公司 Test case data processing method, device and equipment and processing equipment
CN112346987A (en) * 2020-11-25 2021-02-09 武汉光庭信息技术股份有限公司 Test case generation and conversion method and system based on Xmind
CN113238932A (en) * 2021-04-30 2021-08-10 西南电子技术研究所(中国电子科技集团公司第十研究所) Automatic test case generation method
CN113238932B (en) * 2021-04-30 2024-03-19 西南电子技术研究所(中国电子科技集团公司第十研究所) Automatic test case generation method
CN112988605B (en) * 2021-05-10 2021-07-16 云账户技术(天津)有限公司 Method and device for realizing WEB application automatic test
CN112988605A (en) * 2021-05-10 2021-06-18 云账户技术(天津)有限公司 Method and device for realizing WEB application automatic test
CN113094288B (en) * 2021-05-18 2022-06-21 绿漫科技有限公司 Method for converting mind map into test case based on Xmind
CN113094288A (en) * 2021-05-18 2021-07-09 绿漫科技有限公司 Method for converting mind map into test case based on Xmind
CN113377661A (en) * 2021-06-23 2021-09-10 深圳平安智汇企业信息管理有限公司 Interface testing method and device, electronic equipment and storage medium
CN113791980A (en) * 2021-09-17 2021-12-14 中国平安人寿保险股份有限公司 Test case conversion analysis method, device, equipment and storage medium
CN113791980B (en) * 2021-09-17 2024-05-14 中国平安人寿保险股份有限公司 Conversion analysis method, device and equipment for test cases and storage medium

Similar Documents

Publication Publication Date Title
CN108509339A (en) Method for generating test case, device based on browser and mind map and equipment
CN108519967B (en) Chart visualization method and device, terminal and storage medium
US11023500B2 (en) Systems and methods for code parsing and lineage detection
US8601438B2 (en) Data transformation based on a technical design document
US10318595B2 (en) Analytics based on pipes programming model
EP2778929A1 (en) Test script generation system
US8959475B2 (en) Generating a semantic graph that allows a user to intelligently and efficiently connect with people and assets involved in projects
CN114116065B (en) Method and device for acquiring topological graph data object and electronic equipment
CN113238740B (en) Code generation method, code generation device, storage medium and electronic device
CN111813409A (en) Code generation method, device, equipment and storage medium of interactive interface
US20180121526A1 (en) Method, apparatus, and computer-readable medium for non-structured data profiling
CN115599386A (en) Code generation method, device, equipment and storage medium
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
US10417234B2 (en) Data flow modeling and execution
CN113792138B (en) Report generation method and device, electronic equipment and storage medium
US10503823B2 (en) Method and apparatus providing contextual suggestion in planning spreadsheet
US9208046B2 (en) Method and system for optimizing testing efforts in system of systems testing
CN113806556A (en) Method, device, equipment and medium for constructing knowledge graph based on power grid data
CN114860566A (en) Source code testing method and device, electronic equipment and storage medium
EP2851812A1 (en) Exposing relationships between universe objects
CN111949259A (en) Risk decision configuration method, system, electronic equipment and storage medium
CN110750569A (en) Data extraction method, device, equipment and storage medium
CN117076515B (en) Metadata tracing method and device in medical management system, server and storage medium
US12072882B2 (en) Database query processing
CN117130946B (en) Test scene generation method and device, electronic equipment and readable storage 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180907

RJ01 Rejection of invention patent application after publication