CN111124883A - Test case library introduction method, system and equipment based on tree form - Google Patents
Test case library introduction method, system and equipment based on tree form Download PDFInfo
- Publication number
- CN111124883A CN111124883A CN201911122213.0A CN201911122213A CN111124883A CN 111124883 A CN111124883 A CN 111124883A CN 201911122213 A CN201911122213 A CN 201911122213A CN 111124883 A CN111124883 A CN 111124883A
- Authority
- CN
- China
- Prior art keywords
- node
- tree
- test case
- nodes
- case library
- 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 33
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012216 screening Methods 0.000 claims description 3
- 238000004422 calculation algorithm Methods 0.000 abstract description 3
- 238000012795 verification Methods 0.000 abstract 1
- 238000012545 processing Methods 0.000 description 6
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 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
- 230000003287 optical effect 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
Abstract
According to the test case library introduction method, system and equipment based on the tree form, the selected node data of the treegrid multi-hierarchy structure is reassembled, the selected baseline case node information is subjected to multi-level verification in the project case library, and the fact that the multi-level father nodes of each selected baseline node are stored in the project case library and the child father node relation needs to be correctly introduced is guaranteed. And traversing and storing the multi-level child nodes by using a recursive algorithm. The method is used for introducing the baseline case library of the treegrid multi-level structure, can be used for more efficiently and accurately improving the management efficiency of the test cases, and further promotes the test efficiency of products such as servers.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method, a system and equipment for introducing a test case base based on a tree form.
Background
The use case is a description of how a system reacts to an external request in software engineering or system engineering, and is a technology for acquiring a demand through a use scene of a user. Each use case provides one or more scenarios that illustrate how the system interacts with the end user or other system, i.e., who can do what with the system, to achieve a clear business goal. Technical terminology is to be avoided when writing use cases, and the language of the end user or domain expert should be used. Use cases are typically coauthored by software developers and end users.
In the test management system, a plurality of project example libraries are provided, and one baseline example library is provided. The baseline case library often contains a plurality of cases required by the project case library, and the traditional project case library is maintained by using cases in an Excel importing mode, so that the method is complicated and is easy to make mistakes. How to directly introduce the baseline case of the tree-form multi-hierarchy structure into each project case library in a line mode and process the introduction of the multi-hierarchy structure in an efficient mode is a problem to be solved urgently.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method, a system, and a device for introducing a test case base based on a tree-form table, which are capable of efficiently introducing a baseline case into each project case base on line by processing nodes of a multi-level structure of the tree-form table and efficiently processing test cases and belonging level data in combination with a recursive traversal algorithm.
In order to achieve the purpose, the invention is realized by the following technical scheme: a test case library introduction method based on a tree form comprises the following steps:
s1: assembling a node object list;
s2: circularly traversing the node object list to ensure that the parents of the selected nodes are all introduced;
s3: the node objects are recursively saved.
Further, the tree table is treegrid, and step S1 includes:
acquiring a node list selected by treegrid at a foreground and circularly traversing;
screening use case nodes and fully selected level nodes;
and transmitting the use case or all selected hierarchical assembly node object to the background.
Further, the step S2 includes:
acquiring the number of use cases under the project according to the project name;
selecting a use case and acquiring a selected node id and a node id in a project use case table;
entering a selected use case;
and circularly traversing the nodes at all levels to ensure that the parents of the selected nodes are all introduced.
Further, the step S3 includes:
if the selected node is a use case, the selected node is directly introduced and stored into the project.
If the selected node is a hierarchy, the child nodes are recursively traversed, and the child hierarchies and use cases are saved.
Further, acquiring a baseline case entity;
judging whether the selected node exists under the project or not according to the hierarchy or the use case name;
and if the selected node is a leaf node, directly judging and storing, otherwise traversing all child nodes and storing and traversing, if the selected node does not exist, adding a new node, and inquiring the id of the new node as a father node of the next traversal.
Further, the storing of the node's predicate specifically includes:
firstly, deleting an old case and putting the old case into a history table; and then deleting the corresponding data in the formal table.
Correspondingly, the invention also discloses a test case base introducing system based on the tree form, which comprises the following steps:
a list assembling unit for assembling a node object list;
the list traversal unit is used for circularly traversing the node object list to ensure that the parents of the selected nodes are all introduced;
and the node storage unit is used for recursively storing the node objects.
Correspondingly, the invention also discloses a test case library introducing device based on the tree form, which comprises the following steps:
a memory for storing a computer program;
a processor for implementing the tree table based test case base introduction method steps as described in any one of the above when the computer program is executed.
Compared with the prior art, the invention has the beneficial effects that: the invention provides a test case library introduction method, a test case library introduction system and test case library introduction equipment based on a tree form. And traversing and storing the multi-level child nodes by using a recursive algorithm. The method is used for introducing the baseline case library of the treegrid multi-level structure, can be used for more efficiently and accurately improving the management efficiency of the test cases, and further promotes the test efficiency of products such as servers.
The invention processes the data of the multi-level tree structure between the similar level and the use case more reasonably and accurately, improves the test management efficiency, saves the labor cost and ensures the product quality.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a system block diagram of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made with reference to the accompanying drawings.
As shown in fig. 1, the present invention provides a test case base importing method based on a tree form, which includes the following steps:
s1: and acquiring a node list selected by the treegrid at the foreground and circularly traversing.
S2: and screening case nodes and all selected hierarchical nodes.
S3: and transmitting the use case or all selected hierarchical assembly node object to the background.
S4: and acquiring the number of use cases under the project according to the project name.
S5: and selecting a use case and acquiring the id of the selected node and the id of the node in the project use case table.
S6: and entering the selected use case.
S7: and circularly traversing the nodes at all levels to ensure that the parents of the selected nodes are all introduced.
S8: if the selected node is a use case, the selected node is directly introduced, namely is stored in the project.
S9: if the selected node is a hierarchy, the child nodes are recursively traversed, and the child hierarchies and use cases are saved.
On the basis, the steps S8 and S9 are specifically: firstly, acquiring a baseline case entity;
judging whether the selected node exists under the project or not according to the hierarchy or the use case name; and if the selected node is a leaf node, directly judging and storing, otherwise traversing all child nodes and storing and traversing, if the selected node does not exist, adding a new node, and inquiring the id of the new node as a father node of the next traversal.
The node judgment and storage specifically comprises the following steps: firstly, deleting an old case and putting the old case into a history table; and then deleting the corresponding data in the formal table.
On the basis, the specific script content of the tree-form-based test case library introduction method provided by the invention by taking JAVA as a main development language is as follows:
1. assembling node object list:
correspondingly, as shown in fig. 2, the present invention also discloses a test case library importing system based on a tree form, which includes:
a list assembling unit for assembling a node object list;
the list traversal unit is used for circularly traversing the node object list to ensure that the parents of the selected nodes are all introduced;
and the node storage unit is used for recursively storing the node objects.
Correspondingly, the invention also discloses a test case library introducing device based on the tree form, which comprises the following steps: a memory for storing a computer program;
a processor for implementing the tree table based test case base introduction method steps as described in any one of the above when the computer program is executed.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention. The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided by the present invention, it should be understood that the disclosed system, system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit.
Similarly, each processing unit in the embodiments of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units are integrated into one functional module.
The invention is further described with reference to the accompanying drawings and specific embodiments. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and these equivalents also fall within the scope of the present application.
Claims (8)
1. A test case library introduction method based on a tree form is characterized by comprising the following steps:
s1: assembling a node object list;
s2: circularly traversing the node object list to ensure that the parents of the selected nodes are all introduced;
s3: the node objects are recursively saved.
2. The tree table-based test case library introduction method of claim 1, wherein the tree table is treegrid, and the step S1 includes:
acquiring a node list selected by treegrid at a foreground and circularly traversing;
screening use case nodes and fully selected level nodes;
and transmitting the use case or all selected hierarchical assembly node object to the background.
3. The tree table-based test case library introduction method as claimed in claim 1, wherein the step S2 includes:
acquiring the number of use cases under the project according to the project name;
selecting a use case and acquiring a selected node id and a node id in a project use case table;
entering a selected use case;
and circularly traversing the nodes at all levels to ensure that the parents of the selected nodes are all introduced.
4. The tree table-based test case library introduction method as claimed in claim 3, wherein the step S3 includes:
if the selected node is a use case, directly introducing and storing the selected node into a project;
if the selected node is a hierarchy, the child nodes are recursively traversed, and the child hierarchies and use cases are saved.
5. The tree-table-based test case library introduction method as claimed in claim 4, wherein the step S3 specifically includes:
acquiring a baseline case entity;
judging whether the selected node exists under the project or not according to the hierarchy or the use case name;
and if the selected node is a leaf node, directly judging and storing, otherwise traversing all child nodes and storing and traversing, if the selected node does not exist, adding a new node, and inquiring the id of the new node as a father node of the next traversal.
6. The tree form based test case library introduction method according to claim 5, wherein the node null storage specifically includes:
firstly, deleting an old case and putting the old case into a history table; and then deleting the corresponding data in the formal table.
7. A tree-form-based test case library introduction system is characterized by comprising:
a list assembling unit for assembling a node object list;
the list traversal unit is used for circularly traversing the node object list to ensure that the parents of the selected nodes are all introduced;
and the node storage unit is used for recursively storing the node objects.
8. A test case library importing device based on a tree form is characterized by comprising:
a memory for storing a computer program;
a processor for implementing the tree table based test case base introduction method steps as claimed in any one of claims 1 to 6 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911122213.0A CN111124883B (en) | 2019-11-15 | 2019-11-15 | Test case library introduction method, system and equipment based on tree form |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911122213.0A CN111124883B (en) | 2019-11-15 | 2019-11-15 | Test case library introduction method, system and equipment based on tree form |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111124883A true CN111124883A (en) | 2020-05-08 |
CN111124883B CN111124883B (en) | 2023-01-10 |
Family
ID=70495974
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911122213.0A Active CN111124883B (en) | 2019-11-15 | 2019-11-15 | Test case library introduction method, system and equipment based on tree form |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111124883B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112966040A (en) * | 2021-03-29 | 2021-06-15 | 深圳市优必选科技股份有限公司 | Method, device, terminal and storage medium for converting data structure |
CN113051270A (en) * | 2021-03-26 | 2021-06-29 | 合安科技技术有限公司 | Grouping method and device based on special-shaped structure tree, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105117333A (en) * | 2015-08-24 | 2015-12-02 | 深圳市高斯贝尔家居智能电子有限公司 | Method and system for management of test cases |
CN105893254A (en) * | 2016-03-29 | 2016-08-24 | 乐视控股(北京)有限公司 | Test case input method and device |
CN108595317A (en) * | 2017-12-28 | 2018-09-28 | 合肥工大高科信息科技股份有限公司 | A kind of embedded automated testing method of safety computer of rail transit |
-
2019
- 2019-11-15 CN CN201911122213.0A patent/CN111124883B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105117333A (en) * | 2015-08-24 | 2015-12-02 | 深圳市高斯贝尔家居智能电子有限公司 | Method and system for management of test cases |
CN105893254A (en) * | 2016-03-29 | 2016-08-24 | 乐视控股(北京)有限公司 | Test case input method and device |
CN108595317A (en) * | 2017-12-28 | 2018-09-28 | 合肥工大高科信息科技股份有限公司 | A kind of embedded automated testing method of safety computer of rail transit |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113051270A (en) * | 2021-03-26 | 2021-06-29 | 合安科技技术有限公司 | Grouping method and device based on special-shaped structure tree, electronic equipment and storage medium |
CN113051270B (en) * | 2021-03-26 | 2023-05-12 | 合安科技技术有限公司 | Grouping method and device based on special-shaped structure tree, electronic equipment and storage medium |
CN112966040A (en) * | 2021-03-29 | 2021-06-15 | 深圳市优必选科技股份有限公司 | Method, device, terminal and storage medium for converting data structure |
Also Published As
Publication number | Publication date |
---|---|
CN111124883B (en) | 2023-01-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109582473A (en) | Across chain data access method and device based on block chain | |
EP3812917A1 (en) | Data structure reading method and apparatus, data structure updating method and apparatus, and electronic device | |
CN111124883B (en) | Test case library introduction method, system and equipment based on tree form | |
CN116204438A (en) | Test case generation method, automatic test method and related device | |
CN112181430A (en) | Code change statistical method and device, electronic equipment and storage medium | |
CN111159040A (en) | Test data generation method, device, equipment and storage medium | |
CN110888972A (en) | Sensitive content identification method and device based on Spark Streaming | |
CN112052157B (en) | Method, device and system for constructing test message | |
CN112561690A (en) | Method, system, equipment and storage medium for testing credit card staging service interface | |
CN112035676A (en) | User operation behavior knowledge graph construction method and device | |
CN112417020B (en) | Service expansion realization method, device, computer equipment and storage medium | |
CN110471708B (en) | Method and device for acquiring configuration items based on reusable components | |
CN114297236A (en) | Data blood relationship analysis method, terminal equipment and storage medium | |
US10402391B2 (en) | Processing method, device and system for data of distributed storage system | |
CN114115833B (en) | Automatic protocol audit code generation method and device | |
CN110597517A (en) | Method and device for dynamically analyzing mat file | |
CN115061723A (en) | Information processing method, information processing device, electronic equipment and computer readable storage medium | |
CN113778886B (en) | Processing method and device for test cases | |
CN115328787A (en) | System building method, device, equipment and readable storage medium | |
CN113010588B (en) | Data form processing method | |
CN117743721A (en) | Data processing method and device | |
CN116048470A (en) | Method, device, equipment and storage medium for establishing analog data service | |
CN116010341A (en) | Method, system, equipment and medium for generating DBC (direct digital control) based on CAN (controller area network) signal matrix | |
CN115629958A (en) | Universal field level automatic checking method and device for different service interfaces | |
CN117827664A (en) | Interface testing method and device |
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 |