CN110334024B - Test case management method, device and terminal based on tree structure - Google Patents

Test case management method, device and terminal based on tree structure Download PDF

Info

Publication number
CN110334024B
CN110334024B CN201910577577.1A CN201910577577A CN110334024B CN 110334024 B CN110334024 B CN 110334024B CN 201910577577 A CN201910577577 A CN 201910577577A CN 110334024 B CN110334024 B CN 110334024B
Authority
CN
China
Prior art keywords
node
preset
test case
data
test
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.)
Active
Application number
CN201910577577.1A
Other languages
Chinese (zh)
Other versions
CN110334024A (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.)
Zhejiang Geely Holding Group Co Ltd
Hangzhou Youxing Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Hangzhou Youxing 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 Zhejiang Geely Holding Group Co Ltd, Hangzhou Youxing Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN201910577577.1A priority Critical patent/CN110334024B/en
Publication of CN110334024A publication Critical patent/CN110334024A/en
Application granted granted Critical
Publication of CN110334024B publication Critical patent/CN110334024B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a test case management method, a device and a terminal based on a tree structure, wherein the method comprises the following steps: acquiring a test case file; acquiring a data storage strategy and a data storage space; reading the test case file to establish a node tree, and recording the node tree in the data storage space according to the data storage strategy; reading the node tree to obtain splice points and data corresponding to the splice points; acquiring a test case title and a test case step based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point; according to the invention, through the constructed node tree, the leaf nodes in the node tree are directly spliced to form the test case title and the test case step, so that the labor cost is reduced, and the conversion efficiency is improved.

Description

Test case management method, device and terminal based on tree structure
Technical Field
The present invention relates to the field of data processing technologies for big data, and in particular, to a method, an apparatus, and a terminal for managing test cases based on a tree structure.
Background
When the test case is designed, a complete requirement is required to be disassembled, and the complete requirement is divided into a module and a smaller module; after the disassembly is completed, the small function points are disassembled again from each dimension, such as basic functions, scene workflow, control life cycle, abnormal scenes and the like;
the current general technical scheme is to divide according to large modules, and then start writing the title of the test case and the steps of the test case. When a test case is uploaded from an open management (xmind) file to a test case management platform, conversion is manually written, which requires a lot of time.
Disclosure of Invention
In order to solve the technical problems, the invention discloses a test case management method based on a tree structure, and leaf nodes in a node tree are directly spliced to form a test case title and a test case step through the constructed node tree, so that the labor cost is reduced, and the conversion efficiency is improved.
In order to achieve the above object, the present invention provides a test case management method based on a tree structure, which includes:
acquiring a test case file;
acquiring a data storage strategy and a data storage space;
reading the test case file to establish a node tree, and recording the node tree in the data storage space according to the data storage strategy;
reading the node tree to obtain splice points and data corresponding to the splice points;
and obtaining a test case title and a test case step based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point.
Further, the obtaining the test case file includes:
acquiring an open management file containing test cases;
decompressing the open management file to obtain the test case file recorded in the extensible markup language format.
Further, the reading the test case file to build a node tree, and recording the node tree in the data storage space according to the data storage policy includes:
reading the test case file to obtain node data, wherein the node data comprises root node data and data of each leaf node;
and recording the node data in the data storage space according to the data storage strategy to generate a node tree.
Further, the reading the node tree to obtain a splice point and data corresponding to the splice point includes:
obtaining test function nodes on the node tree, wherein the test function node data are leaf nodes with preset marks;
acquiring data corresponding to a preset first leaf node, the test function node and a preset second leaf node according to the preset first leaf node, the test function node and the preset second leaf node on the same branch of the node tree;
and taking the preset first leaf node, the test function node, the preset second leaf node, the node between the preset first leaf node and the test function node and the node between the test function node and the preset second leaf node as splice points.
Further, the step of obtaining the test case title and the test case based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point includes:
capturing data corresponding to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, and the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node;
and according to the data corresponding to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, and the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, splicing based on a preset splicing rule to obtain the test case title.
Further, the step of obtaining the test case title and the test case based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point further includes:
capturing the test function node, the preset second leaf node and nodes between the test function node and the preset second leaf node, and data corresponding to the test function node, the preset second leaf node and nodes between the test function node and the preset second leaf node;
and according to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, and the data corresponding to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, the step of obtaining the test case by splicing based on the preset splicing rule.
Further, after the step of obtaining the test case title and the test case based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point, the method further includes:
acquiring a test case module and a test case type;
and importing the test case module, the test case type and the node data information into a preset electronic table to obtain an electronic table file.
The invention provides a test case management device based on a tree structure, which comprises:
the file acquisition module is used for acquiring a test case file;
the first acquisition module is used for acquiring a data storage strategy and a data storage space;
the file processing module is used for reading the test case file to establish a node tree, and recording the node tree in the data storage space according to the data storage strategy;
the second acquisition module is used for reading the node tree and acquiring splice points and data corresponding to the splice points;
and the data processing module is used for obtaining a test case title and a test case step based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point.
Further, the method further comprises the following steps:
the third acquisition module is used for acquiring the test case module and the test case type;
and the data importing module is used for importing the test case module, the test case type and the node data information into a preset electronic form to obtain an electronic form file.
The invention provides a test case management terminal based on a tree structure, which comprises a processor and a memory, wherein the processor is used for storing test cases;
the processor is suitable for realizing one or more instructions;
the memory stores one or more instructions suitable for the processor to load and execute to implement the tree-based test case management method described above.
The embodiment of the invention has the following beneficial effects:
according to the test case management method based on the tree structure, through the constructed node tree, leaf nodes in the node tree are directly spliced to form the test case title and the test case step, so that the labor cost is reduced, and the conversion efficiency is improved.
Drawings
In order to more clearly illustrate the test case management method, device and terminal based on the tree structure of the present invention, the drawings required by the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained according to the drawings without any inventive effort for those skilled in the art.
FIG. 1 is a flow chart of a test case management method based on a tree structure according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for obtaining splice points according to an embodiment of the present invention;
FIG. 3 is an exemplary schematic diagram of a node tree according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of an example of a spreadsheet file according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a test case management device based on a tree structure according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a test case management terminal based on a tree structure according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The invention can be applied to the design of test cases, and the node tree generated by adopting an open management file is disassembled from a node level to a single functional point and a granularity of a single dimension, and leaf nodes are combined to generate a complete test case title according to the level of segmentation.
Referring to fig. 1, a flowchart of a test case management method based on a tree structure according to an embodiment of the present invention is shown, and the present specification provides the method operation steps described in the embodiment or the flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The step sequence listed in the embodiments is only one mode of a plurality of step execution sequences, does not represent a unique execution sequence, and can be executed according to the method sequence shown in the embodiments or the drawings when the test case is actually designed. As shown in fig. 1, the method includes:
s101, acquiring a test case file;
in this embodiment of the present specification, obtaining the test case file includes:
acquiring an open management file containing test cases;
in this embodiment of the present disclosure, the open management file may be an XMind format file, and in particular, the XMind format file essentially consists of an xml+zip structure, and is an open file format, where a user may develop a plug-in for the open XML API or perform secondary development.
Decompressing the open management file to obtain the test case file recorded in the extensible markup language format.
In the embodiment of the present specification, decompressing the open management file may be decompressing a zip file in an xmind format file to obtain a test case file recorded in an extensible markup language format; in particular, the extensible markup language format may be an xml format file.
S103, acquiring a data storage strategy and a data storage space;
in the embodiment of the present disclosure, the data storage policy may be a preset data storage policy, for example, may be to store data according to a preset data storage topology; the data storage space can be a preset storage space on the test case management platform, such as a data storage space in an established java program.
S105, reading the test case file to establish a node tree, and recording the node tree in the data storage space according to the data storage strategy;
in an embodiment of the present disclosure, the reading the test case file to build a node tree, and recording the node tree in the data storage space according to the data storage policy includes:
s1, reading the test case file to obtain node data, wherein the node data comprises root node data and data of each leaf node;
in the embodiment of the specification, a mapping case file (such as an xml format test case file) can be read in a cyclic recursion manner; specifically, text information and father level information of the test case file in the xml format can be read; obtaining node data;
s2, recording the node data in the data storage space according to the data storage strategy to generate a node tree.
As shown in fig. 3, in the embodiment of the present disclosure, node data may be stored according to a preset data storage topology, and a node tree corresponding to the topology may be generated.
In a preferred embodiment of the present disclosure, when reading an xml format file, first read the first topic, and then begin to use the recursive method to read the title and child nodes in the topic: finally, storing the result in the Topic, and assigning the stored Topic with the id and the parent_id;
specifically, the reading of the first topic includes the following steps:
when reading title nodes, storing the title in a TopicTree;
when the child node is read, the child node is a recursive node, the recursive method is started to be called to read child, the read child is stored in a topicTreeList,
specifically, when the child node is recursively read
The child node comprises topics, a column of topics is contained in the topics, and the topics are sequentially read; when a title node in the topic structure is read, storing the title in the topicTree;
when the child node in the topic structure is read, calling a recursion method; the final result is stored in Topic.
Assigning the stored Topic with an id and parent_id, specifically, the following steps are:
first, assigning an id and parent_id to a parent node, and assigning other leaf nodes by using a recursion method.
S107, reading the node tree to obtain splice points and data corresponding to the splice points;
as shown in fig. 2, in the embodiment of the present disclosure, fig. 2 is a schematic flow chart of a method for obtaining a splice point according to an embodiment of the present disclosure; specifically, the following are adopted:
s201, obtaining test function nodes on the node tree, wherein the test function node data are leaf nodes with preset marks;
in the embodiment of the present specification, a recursive method may be used to read the node tree to obtain the test function node on the node tree, where the test function node may be a leaf node with a chinese bracket flag.
S203, acquiring data corresponding to a preset first leaf node, the test function node and a preset second leaf node according to the preset first leaf node, the test function node and the preset second leaf node on the same branch of the node tree;
in this embodiment of the present disclosure, the preset first leaf node may be a first leaf node adjacent to a parent node on the node tree, and the preset second leaf node may be a last layer of leaf nodes of the same branch as the preset first leaf node;
specifically, a recursive method may be used to read a preset first leaf node, the test function node, a preset second leaf node, a node between the preset first leaf node and the test function node, and a node between the test function node and the preset second leaf node, so as to obtain data corresponding to the preset first leaf node, the test function node, the preset second leaf node, the node between the preset first leaf node and the test function node, and the node between the test function node and the preset second leaf node.
S205, taking the preset first leaf node, the test function node, the preset second leaf node, the node between the preset first leaf node and the test function node and the node between the test function node and the preset second leaf node as splicing points.
In this embodiment of the present disclosure, the data corresponding to the preset first leaf node, the preset test function node, the preset second leaf node, the node between the preset first leaf node and the test function node, and the node between the test function node and the preset second leaf node are used as the data corresponding to the splicing point.
S109, acquiring a test case title and a test case step based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point;
in this embodiment of the present disclosure, the step of obtaining, according to the splice point and the data corresponding to the splice point, a test case title and a test case based on the preset splice rule includes:
a, capturing data corresponding to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, and the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node;
and B, splicing according to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, and the data corresponding to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, and based on a preset splicing rule, so as to obtain the test case title.
In this embodiment of the present disclosure, the preset splicing rule may be to splice the splicing points according to a set order, for example, a first leaf node, a node located between the preset first leaf node and the test function node, and the test function node are sequentially arranged according to a sequencing order, and the first leaf node, the node located between the preset first leaf node and the test function node, and the data corresponding to the test function node are spliced together to obtain a test case title.
In this embodiment of the present disclosure, the step of obtaining, based on the preset splicing rule, the test case title and the test case step according to the splicing point and the data corresponding to the splicing point further includes:
c, capturing the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, and data corresponding to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node;
and D, splicing according to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, and the data corresponding to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, and based on a preset splicing rule, obtaining a test case step.
In this embodiment of the present disclosure, the preset splicing rule may be to splice splicing points according to a set order, for example, the test function node, a node located between the test function node and the preset second leaf node, and the preset second leaf node are sequentially arranged according to a sequential order, and the test function node, the node located between the test function node and the preset second leaf node, and the data corresponding to the preset second leaf node are spliced together to obtain the test case step. According to the invention, the leaf nodes are combined to generate a complete test case title according to the steps of segmentation, so that the test case title accords with granularity from one node to a single functional point and a single dimension in a step-by-step manner, the labor cost is reduced, and the conversion efficiency is improved.
In this embodiment of the present disclosure, after obtaining the test case title and the test case step according to the splice point and the data corresponding to the splice point based on the preset splice rule, the method further includes:
s111, acquiring a test case module and a test case type;
in the embodiment of the present disclosure, the test case module may be a channel module number, that is, a name of the test case module on a channel;
s113, importing the test case module, the test case type and the node data information into a preset electronic form to obtain an electronic form file.
As shown in fig. 4, in a preferred embodiment of the present disclosure, the electronic table may be an excel table, and the test case module, the test case type and the node data information are written into the excel table according to a preset test case template and directly exported; the exported excel file can be directly used on the test case management platform. The method of the invention ensures that the granularity of the test cases is higher in definition degree, so that the multiplexing degree of the test cases is also higher; further reducing the labor cost.
The embodiment of the method, the device and the terminal for managing the test case based on the tree structure provided by the invention can be seen that the embodiment of the invention obtains the test case file; acquiring a data storage strategy and a data storage space; reading the test case file to establish a node tree, and recording the node tree in the data storage space according to the data storage strategy; reading the node tree to obtain splice points and data corresponding to the splice points; acquiring a test case title and a test case step based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point; acquiring a test case module and a test case type; importing the test case module, the test case type and the node data information into a preset electronic form to obtain an electronic form file; by utilizing the technical scheme provided by the embodiment of the specification, the leaf nodes in the node tree are directly spliced to form the test case title and the test case step through the constructed node tree, so that the labor cost is reduced, and the conversion efficiency is improved.
The embodiment of the invention also provides a test case management device based on the tree structure, as shown in fig. 3, which is a schematic structural diagram of the test case management device based on the tree structure; specifically, the device comprises:
the file obtaining module 510 is configured to obtain a test case file;
a first obtaining module 520, configured to obtain a data storage policy and a data storage space;
the file processing module 530 is configured to read the test case file to build a node tree, and record the node tree in the data storage space according to the data storage policy;
a second obtaining module 540, configured to read the node tree, and obtain a splice point and data corresponding to the splice point;
and the data processing module 550 is configured to obtain a test case title and a test case step based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point.
In the embodiment of the present disclosure, the file obtaining module 510 includes:
the first acquisition unit is used for acquiring an open management file containing the test cases;
and the decompression unit is used for decompressing the open management file to obtain the test case file recorded in the extensible markup language format.
In the embodiment of the present disclosure, the file processing module 530 includes:
the first reading unit is used for reading the test case file to obtain node data, wherein the node data comprises root node data and data of each leaf node;
and the first recording unit is used for recording the node data in the data storage space according to the data storage strategy so as to generate a node tree.
In the embodiment of the present disclosure, the second obtaining module 540 includes:
the second acquisition unit is used for acquiring the test function nodes on the node tree, wherein the test function node data are leaf nodes with preset marks;
a third obtaining unit, configured to obtain data corresponding to a preset first leaf node, the test function node, and a preset second leaf node according to the preset first leaf node, the test function node, and the preset second leaf node on the same branch of the node tree;
and the execution unit is used for taking the preset first leaf node, the test function node, the preset second leaf node, the node between the preset first leaf node and the test function node and the node between the test function node and the preset second leaf node as splicing points.
In the present embodiment, the data processing module 550 includes:
a first capturing unit, configured to capture data corresponding to the preset first leaf node, the test function node, and a node located between the preset first leaf node and the test function node, and the preset first leaf node, the test function node, and a node located between the preset first leaf node and the test function node;
the first splicing unit is used for splicing the data corresponding to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, and the data corresponding to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node based on a preset splicing rule to obtain the test case title.
In the embodiment of the present disclosure, the data processing module 550 further includes:
the second capturing unit is used for capturing the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, and data corresponding to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node;
the second splicing unit is used for splicing the data corresponding to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, and the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node based on a preset splicing rule to obtain the test case step.
In this embodiment of the present specification, further includes:
the third acquisition module is used for acquiring the test case module and the test case type;
and the data importing module is used for importing the test case module, the test case type and the node data information into a preset electronic form to obtain an electronic form file.
The embodiment of the invention provides a test case management terminal based on a tree structure, which comprises a processor and a memory;
the processor is suitable for realizing one or more instructions;
the memory stores one or more instructions suitable for the processor to load and execute to implement the tree-based test case management method according to the method embodiment.
The memory may be used to store software programs and modules that the processor executes to perform various functional applications and data processing by executing the software programs and modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide access to the memory by the processor.
Fig. 6 is a schematic structural diagram of a test case management terminal based on a tree structure according to an embodiment of the present invention, where the internal structure of the test case management terminal based on the tree structure may include, but is not limited to: the processor, the network interface and the memory in the test case management terminal based on the tree structure may be connected by a bus or other means, and in fig. 6 shown in the embodiment of the present specification, the connection by the bus is taken as an example.
The processor (or CPU (Central Processing Unit, central processing unit)) is a computation core and a control core of the test case management terminal based on a tree structure. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI, mobile communication interface, etc.). A Memory (Memory) is a Memory device in the test case management terminal based on a tree structure for storing programs and data. It will be appreciated that the memory herein may be a high speed RAM memory device or a non-volatile memory device, such as at least one magnetic disk memory device; optionally, at least one memory device located remotely from the processor. The memory provides a storage space storing an operating system of the test case management terminal based on a tree structure, which may include, but is not limited to: windows (an operating system), linux (an operating system), etc., as the present invention is not limited in this regard; also stored in the memory space are one or more instructions, which may be one or more computer programs (including program code), adapted to be loaded and executed by the processor. In the embodiment of the specification, the processor loads and executes one or more instructions stored in the memory to realize the test case management method based on the tree structure provided by the embodiment of the method.
The embodiment of the invention also provides a storage medium which can be arranged in the test case management terminal based on the tree structure to store at least one instruction, at least one section of program, code set or instruction set related to the test case management method based on the tree structure in the method embodiment, and the at least one instruction, the at least one section of program, the code set or the instruction set can be loaded and executed by a processor of the electronic equipment to realize the test case management method based on the tree structure provided by the method embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The embodiment of the method, the device and the terminal for managing the test case based on the tree structure provided by the invention can be seen that the embodiment of the invention obtains the test case file; specifically, the method comprises the following steps: acquiring an open management file containing test cases; decompressing the open management file to obtain the test case file recorded in the extensible markup language format. Acquiring a data storage strategy and a data storage space; reading the test case file to establish a node tree, and recording the node tree in the data storage space according to the data storage strategy; specifically, the method comprises the following steps: reading the test case file to obtain node data, wherein the node data comprises root node data and data of each leaf node; and recording the node data in the data storage space according to the data storage strategy to generate a node tree. Reading the node tree to obtain splice points and data corresponding to the splice points; specifically, the method comprises the following steps: obtaining test function nodes on the node tree, wherein the test function node data are leaf nodes with preset marks; acquiring data corresponding to a preset first leaf node, the test function node and a preset second leaf node according to the preset first leaf node, the test function node and the preset second leaf node on the same branch of the node tree; and taking the preset first leaf node, the test function node, the preset second leaf node, the node between the preset first leaf node and the test function node and the node between the test function node and the preset second leaf node as splice points. Acquiring a test case title and a test case step based on the preset splicing rule according to the splicing point and the data corresponding to the splicing point; specifically, the method comprises the following steps: capturing data corresponding to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, and the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node; and according to the data corresponding to the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, and the preset first leaf node, the test function node and the node between the preset first leaf node and the test function node, splicing based on a preset splicing rule to obtain the test case title. Further comprises: capturing the test function node, the preset second leaf node and nodes between the test function node and the preset second leaf node, and data corresponding to the test function node, the preset second leaf node and nodes between the test function node and the preset second leaf node; and according to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, and the data corresponding to the test function node, the preset second leaf node and the node between the test function node and the preset second leaf node, the step of obtaining the test case by splicing based on the preset splicing rule. Acquiring a test case module and a test case type; importing the test case module, the test case type and the node data information into a preset electronic form to obtain an electronic form file; by utilizing the technical scheme provided by the embodiment of the specification, through the constructed node tree, the leaf nodes are combined according to the stage of the segmentation to generate a complete test case title, so that granularity from one node to a single functional point and a single dimension is met, the labor cost is reduced, and the conversion efficiency is improved; the granularity of the test cases is higher in refinement degree, so that the multiplexing degree of the test cases is also higher; further reducing the labor cost.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device and server embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and references to the parts of the description of the method embodiments are only required.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above disclosure is only a preferred embodiment of the present invention, and it is needless to say that the scope of the invention is not limited thereto, and therefore, the equivalent changes according to the claims of the present invention still fall within the scope of the present invention.

Claims (6)

1. A test case management method based on a tree structure is characterized by comprising the following steps: the method comprises the following steps:
acquiring a test case file;
acquiring a data storage strategy and a data storage space; the data storage strategy comprises a preset data storage topology;
reading the test case file to obtain node data, wherein the node data comprises root node data and data of each leaf node;
recording the node data in the data storage space according to the preset data storage topology to generate a node tree corresponding to the data storage topology;
obtaining test function nodes on the node tree, wherein the test function node data are leaf nodes with preset marks; acquiring data corresponding to a preset first leaf node, the test function node and a preset second leaf node according to the preset first leaf node, the test function node and the preset second leaf node on the same branch of the node tree; taking the preset first leaf node, the test function node, the preset second leaf node, a node between the preset first leaf node and the test function node and a node between the test function node and the preset second leaf node as splice points; the data corresponding to the splicing point comprises data corresponding to a preset first leaf node, data corresponding to a test function node, data corresponding to a preset second leaf node, data corresponding to a node between the preset first leaf node and the test function node and data corresponding to a node between the test function node and the preset second leaf node;
according to the splicing point and the data corresponding to the splicing point, sequencing the preset first leaf node, the node between the preset first leaf node and the test function node according to a set sequence, and splicing the data corresponding to the preset first leaf node, the node between the preset first leaf node and the test function node and the data corresponding to the test function node together to obtain a test case title;
and sequencing the test function node, the node between the test function node and the preset second leaf node according to a set sequence, and splicing the data corresponding to the test function node, the node between the test function node and the preset second leaf node and the data corresponding to the preset second leaf node together to obtain a test case step.
2. The tree structure-based test case management method according to claim 1, wherein: the obtaining the test case file includes:
acquiring an open management file containing test cases;
decompressing the open management file to obtain the test case file recorded in the extensible markup language format.
3. The tree structure-based test case management method according to claim 1, wherein: the method further comprises the steps of:
acquiring a test case module and a test case type;
and importing the test case module, the test case type and the node data information into a preset electronic table to obtain an electronic table file.
4. A test case management device based on a tree structure is characterized in that: the device comprises:
the file acquisition module is used for acquiring a test case file;
the first acquisition module is used for acquiring a data storage strategy and a data storage space; the data storage strategy comprises a preset data storage topology;
the file processing module is used for reading the test case file to obtain node data, wherein the node data comprises root node data and data of each leaf node; recording the node data in the data storage space according to the preset data storage topology to generate a node tree corresponding to the data storage topology;
the second acquisition module is used for acquiring the test function nodes on the node tree, wherein the test function node data are leaf nodes with preset marks; acquiring data corresponding to a preset first leaf node, the test function node and a preset second leaf node according to the preset first leaf node, the test function node and the preset second leaf node on the same branch of the node tree; taking the preset first leaf node, the test function node, the preset second leaf node, a node between the preset first leaf node and the test function node and a node between the test function node and the preset second leaf node as splice points; the data corresponding to the splicing point comprises data corresponding to a preset first leaf node, data corresponding to a test function node, data corresponding to a preset second leaf node, data corresponding to a node between the preset first leaf node and the test function node and data corresponding to a node between the test function node and the preset second leaf node;
the data processing module is used for sequencing the preset first leaf node, the node between the preset first leaf node and the test function node according to the splicing point and the data corresponding to the splicing point in a set sequence, and splicing the data corresponding to the preset first leaf node, the node between the preset first leaf node and the test function node and the data corresponding to the test function node together to obtain a test case title; and sequencing the test function node, the node between the test function node and the preset second leaf node according to a set sequence, and splicing the data corresponding to the test function node, the node between the test function node and the preset second leaf node and the data corresponding to the preset second leaf node together to obtain a test case step.
5. The tree-based test case management apparatus of claim 4, wherein: further comprises:
the third acquisition module is used for acquiring the test case module and the test case type;
and the data importing module is used for importing the test case module, the test case type and the node data information into a preset electronic form to obtain an electronic form file.
6. A test case management terminal based on a tree structure is characterized in that: the terminal comprises a processor and a memory;
the processor is used for realizing one or more instructions;
the memory stores one or more instructions for loading and executing by the processor to implement the tree-based test case management method of any one of claims 1 to 3.
CN201910577577.1A 2019-06-28 2019-06-28 Test case management method, device and terminal based on tree structure Active CN110334024B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910577577.1A CN110334024B (en) 2019-06-28 2019-06-28 Test case management method, device and terminal based on tree structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910577577.1A CN110334024B (en) 2019-06-28 2019-06-28 Test case management method, device and terminal based on tree structure

Publications (2)

Publication Number Publication Date
CN110334024A CN110334024A (en) 2019-10-15
CN110334024B true CN110334024B (en) 2023-08-08

Family

ID=68144598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910577577.1A Active CN110334024B (en) 2019-06-28 2019-06-28 Test case management method, device and terminal based on tree structure

Country Status (1)

Country Link
CN (1) CN110334024B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559318A (en) * 2020-11-02 2021-03-26 浙江诺诺网络科技有限公司 Test case generation method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176896A (en) * 2011-12-23 2013-06-26 阿里巴巴集团控股有限公司 Generating method and generating device of test cases
CN105893254A (en) * 2016-03-29 2016-08-24 乐视控股(北京)有限公司 Test case input method and device
CN109726125A (en) * 2018-12-21 2019-05-07 郑州云海信息技术有限公司 The processing method and processing device of test case in a kind of mind map
CN109726113A (en) * 2018-08-17 2019-05-07 平安普惠企业管理有限公司 Method for generating test case, unit and computer readable storage medium
CN109740122A (en) * 2018-12-11 2019-05-10 中国联合网络通信集团有限公司 The conversion method and device of mind map use-case file

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10007597B2 (en) * 2016-09-23 2018-06-26 American Express Travel Related Services Company, Inc. Software testing management
US10210076B2 (en) * 2016-09-26 2019-02-19 International Business Machines Corporation White box testing
US10169215B2 (en) * 2016-09-26 2019-01-01 Cognizant Technology Solutions India Pvt. Ltd. Method and system for analyzing test cases for automatically generating optimized business models

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176896A (en) * 2011-12-23 2013-06-26 阿里巴巴集团控股有限公司 Generating method and generating device of test cases
CN105893254A (en) * 2016-03-29 2016-08-24 乐视控股(北京)有限公司 Test case input method and device
CN109726113A (en) * 2018-08-17 2019-05-07 平安普惠企业管理有限公司 Method for generating test case, unit and computer readable storage medium
CN109740122A (en) * 2018-12-11 2019-05-10 中国联合网络通信集团有限公司 The conversion method and device of mind map use-case file
CN109726125A (en) * 2018-12-21 2019-05-07 郑州云海信息技术有限公司 The processing method and processing device of test case in a kind of mind map

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XmindToExcelJava;sun-of-sun;《https://github.com/sun-of-sun/XmindToExcelJava/tree/53b3747cd48c005be182c9b3522d0dbbd777c3fe》;20190214;全文第1-19页 *

Also Published As

Publication number Publication date
CN110334024A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
CN102520972B (en) Video game development system and method thereof
CN109740122B (en) Method and device for converting thinking guide graph use case file
CN110543427B (en) Test case storage method and device, electronic equipment and storage medium
CN105045602A (en) Method and device for constructing Hadoop application development framework and electronic device
CN108021621A (en) Database data acquisition method, application server and computer-readable recording medium
CN110659027A (en) Code generation method and device and electronic equipment
CN108170602B (en) Test case generation method and device, terminal and computer readable medium
CN110334024B (en) Test case management method, device and terminal based on tree structure
CN114003451B (en) Interface testing method, device, system and medium
CN111290996A (en) Document format conversion method, device, equipment and readable storage medium
CN114546432A (en) Multi-application deployment method, device, equipment and readable storage medium
CN112114866B (en) Data conversion loading method and device of JSON file and storage medium
CN110287182B (en) Big data comparison method, device, equipment and terminal
CN116071590A (en) Model training method, system, computer device and storage medium
CN116048609A (en) Configuration file updating method, device, computer equipment and storage medium
CN107291439B (en) Target incremental data construction method and device
CN110058855B (en) Method, device and equipment for updating interface and workflow of software
CN115170700A (en) Method for realizing CSS animation based on Flutter framework, computer equipment and storage medium
CN108021389A (en) The method and device of ARouter is introduced in a kind of Android
CN113778820A (en) Application program data export method, device, electronic device and storage medium
CN115705297A (en) Code call detection method, device, computer equipment and storage medium
CN115686733A (en) Service deployment method and device, electronic equipment and storage medium
CN108415814B (en) Method for automatically recording field change, application server and computer readable storage medium
CN106778301A (en) Reliable cross-platform data storage method and system based on cocos2d x
CN111400245A (en) Art resource migration 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