[go: up one dir, main page]

CN111124883A - Method, system and device for introducing test case library based on tree table - Google Patents

Method, system and device for introducing test case library based on tree table Download PDF

Info

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
use case
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
Application number
CN201911122213.0A
Other languages
Chinese (zh)
Other versions
CN111124883B (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911122213.0A priority Critical patent/CN111124883B/en
Publication of CN111124883A publication Critical patent/CN111124883A/en
Application granted granted Critical
Publication of CN111124883B publication Critical patent/CN111124883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明提出的种基于树形表格的测试用例库引入方法、系统及设备,通过对选中的treegrid多层级结构的节点数据进行再组装,将所选择的基线用例节点信息在项目用例库中进行多级校验,确保所选择的每一个基线节点的多级父节点,都已存在于项目用例库中,且子父节点关系要正确地被引入进来。再使用递归算法将其多级子节点进行遍历保存。本发明用于treegrid多层级结构的基线用例库引入中,可以更高效,更准确地提高测试用例的管理效率,进而推动服务器等产品的测试效率提升。

Figure 201911122213

The method, system and device for introducing a test case library based on a tree grid proposed by the present invention, by reassembling the node data of the selected treegrid multi-level structure, the selected baseline use case node information is multiplied in the project use case library. Level check to ensure that the multi-level parent nodes of each selected baseline node already exist in the project use case library, and the child-parent node relationship must be correctly introduced. Then use a recursive algorithm to traverse and save its multi-level child nodes. The present invention is used in the introduction of the baseline use case library of the treegrid multi-level structure, and can improve the management efficiency of test cases more efficiently and accurately, thereby promoting the test efficiency of products such as servers.

Figure 201911122213

Description

Test case library introduction method, system and equipment based on tree form
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:
Figure BDA0002275751970000051
Figure BDA0002275751970000061
Figure BDA0002275751970000071
Figure BDA0002275751970000081
Figure BDA0002275751970000091
Figure BDA0002275751970000101
Figure BDA0002275751970000111
Figure BDA0002275751970000121
Figure BDA0002275751970000131
Figure BDA0002275751970000141
Figure BDA0002275751970000151
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.一种基于树形表格的测试用例库引入方法,其特征在于,包括如下步骤:1. a test case library introduction method based on tree form, is characterized in that, comprises the steps: S1:组装节点对象列表;S1: Assemble a list of node objects; S2:循环遍历节点对象列表,确保选中节点的父级均被引入;S2: Loop through the list of node objects to ensure that the parent of the selected node is imported; S3:递归保存节点对象。S3: Recursively save node objects. 2.根据权利要求1所述的基于树形表格的测试用例库引入方法,其特征在于,所述树形表格采用treegrid,所述步骤S1包括:2. The method for introducing a test case library based on a tree-shaped table according to claim 1, wherein the tree-shaped table adopts treegrid, and the step S1 comprises: 在前台获取treegrid选中的节点列表并循环遍历;Get the list of nodes selected by treegrid in the foreground and loop through it; 筛选用例节点及全选的层级节点;Filter use case nodes and all selected hierarchical nodes; 将用例或全选的层级组装节点对象传到后台。Pass the use case or all selected hierarchical assembly node objects to the background. 3.根据权利要求1所述的基于树形表格的测试用例库引入方法,其特征在于,所述步骤S2包括:3. The method for introducing a test case library based on a tree table according to claim 1, wherein the step S2 comprises: 根据项目名称获取项目下的用例个数;Get the number of use cases under the project according to the project name; 选择用例并获取选中节点id和项目用例表中节点id;Select a use case and get the selected node id and the node id in the project use case table; 进入选中的用例;Enter the selected use case; 通过循环遍历各级节点,确保选中节点的父级均被引入。By looping through the nodes at all levels, ensure that the parents of the selected node are introduced. 4.根据权利要求3所述的基于树形表格的测试用例库引入方法,其特征在于,所述步骤S3包括:4. The method for introducing a test case library based on a tree table according to claim 3, wherein the step S3 comprises: 若被选节点是用例,则直接引入并保存到项目中;If the selected node is a use case, it is directly imported and saved into the project; 若被选节点是层级,则递归遍历其子节点,保存子层级和用例。If the selected node is a hierarchy, recursively traverse its sub-nodes and save the sub-hierarchy and use case. 5.根据权利要求4所述的基于树形表格的测试用例库引入方法,其特征在于,所述步骤S3具体为:5. the test case library introduction method based on tree table according to claim 4, is characterized in that, described step S3 is specifically: 获取基线用例实体;Get the baseline use case entity; 根据层级或用例名称,判断该项目下是否已存在选中的节点;According to the level or use case name, determine whether the selected node already exists under the project; 若选中节点为叶子节点,直接判空保存,否则遍历所有子节点并保存遍历后,若不存在所述选中节点,则新增节点,并查询新增节点id作为下次遍历的父节点。If the selected node is a leaf node, it is directly judged to be empty and saved. Otherwise, after traversing all child nodes and saving the traversal, if the selected node does not exist, a new node is added, and the id of the newly added node is queried as the parent node of the next traversal. 6.根据权利要求5所述的基于树形表格的测试用例库引入方法,其特征在于,所述节点的判空保存具体包括:6. the test case library introduction method based on tree table according to claim 5, is characterized in that, the empty judgment preservation of described node specifically comprises: 首先,删除旧用例并放入历史表中;然后在正式表删掉相应的数据。First, delete the old use cases and put them in the history table; then delete the corresponding data in the formal table. 7.一种基于树形表格的测试用例库引入系统,其特征在于,包括:7. a test case library introduction system based on tree form, is characterized in that, comprises: 列表组装单元,用于组装节点对象列表;List assembly unit, used to assemble a list of node objects; 列表遍历单元,用于循环遍历节点对象列表,确保选中节点的父级均被引入;The list traversal unit is used to loop through the list of node objects to ensure that the parents of the selected nodes are imported; 节点存储单元,用于递归保存节点对象。Node storage unit for recursively saving node objects. 8.一种基于树形表格的测试用例库引入设备,其特征在于,包括:8. A test case library introduction device based on tree form, is characterized in that, comprises: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至6任一项所述基于树形表格的测试用例库引入方法步骤。The processor is configured to implement the steps of the tree table-based test case library import method according to any one of claims 1 to 6 when executing the computer program.
CN201911122213.0A 2019-11-15 2019-11-15 Test case library introduction method, system and equipment based on tree form Active CN111124883B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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
US11675774B2 (en) Remote policy validation for managing distributed system resources
CN109740122B (en) Method and device for converting mind map use case files
CN111708805B (en) Data query method, device, electronic device and storage medium
TWI724570B (en) Method, device, electronic equipment and storage medium for reading and updating data structure
CN107870989A (en) webpage generating method and terminal device
CN111124883A (en) Method, system and device for introducing test case library based on tree table
CN114327493B (en) Data processing method and device, electronic device, and computer readable medium
CN112988278B (en) Meta file modification method and device of resource file, electronic equipment and storage medium
CN115437703A (en) Business process arranging method, device, equipment and storage medium
CN112052157B (en) Method, device and system for constructing test message
CN110888695A (en) Method and device for generating page based on permission
CN114297236A (en) Data blood relationship analysis method, terminal equipment and storage medium
TWI620134B (en) Integration device and integration method thereof
CN110851343A (en) A test method and device based on decision tree
Deutsch Implementing distribution lists in computer-based message systems
CN118051209A (en) Request parameter construction method, device, electronic device and storage medium
CN114519038A (en) Rule engine implementation method and device, electronic equipment and storage medium
CN115437704A (en) Business process orchestration method, device, device and storage medium
CN115061723A (en) Information processing method, information processing device, electronic equipment and computer readable storage medium
CN113778886B (en) Processing method and device for test cases
CN113779068A (en) Data query method, device, equipment and storage medium
CN114065067A (en) Table display method, device, readable storage medium and electronic device
CN113868138A (en) Method, system, equipment and storage medium for acquiring test data
CN115378824B (en) Model similarity determination method, device, equipment and storage medium
CN114186101B (en) Data processing method, device, computer equipment and 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
GR01 Patent grant
GR01 Patent grant