CN107818049A - Execution method, performs device and the execution equipment of a kind of test case - Google Patents
Execution method, performs device and the execution equipment of a kind of test case Download PDFInfo
- Publication number
- CN107818049A CN107818049A CN201711057722.0A CN201711057722A CN107818049A CN 107818049 A CN107818049 A CN 107818049A CN 201711057722 A CN201711057722 A CN 201711057722A CN 107818049 A CN107818049 A CN 107818049A
- Authority
- CN
- China
- Prior art keywords
- case
- catalogue
- execution
- storehouse
- subtree
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of execution method of test case, the execution method includes:The first class catalogue of the tree structure in use-case storehouse is built, wherein including the public precondition of each use-case in the use-case storehouse in the first class catalogue;According to the correlation of each use-case, the next stage catalogue corresponding to structure under each upper level catalogue successively, wherein, precondition script, use-case and rearmounted cleaning script are included in each next stage catalogue;According to the tree structure in the use-case storehouse, the execution sequence of each use-case is determined.The execution method clearly constructs the structural system in automation use-case storehouse, and can clearly show the correlation between each use-case, according to the tree structure in use-case storehouse, can further determine the execution sequence of each use-case.The invention also discloses a kind of performs device of test case, equipment and computer-readable recording medium are performed, is respectively provided with above-mentioned technique effect.
Description
Technical field
The present invention relates to software test field, the execution method of more particularly to a kind of test case;Further relate to a kind of test
The performs device of use-case, perform equipment and computer-readable recording medium.
Background technology
Software project can continue to produce automatic test cases for supporting follow-up test event in progradation.Cause
This, clearly builds automatic test cases storehouse, clearly shows the phase between automation use-case catalogue framework and each use-case
Mutual relation is particularly important.
Therefore, how to solve above-mentioned technical problem is those skilled in the art's urgent problem to be solved.
The content of the invention
It is an object of the invention to provide a kind of execution method of test case, this method builds the test case of tree structure
Framework, the structural system in automation use-case storehouse is clearly constructed, can clearly show the correlation of each use-case.The present invention
Another purpose be to provide a kind of performs device of test case, perform equipment and computer-readable recording medium.
In order to solve the above technical problems, the present invention provides a kind of execution method of test case, methods described includes:
The first class catalogue of the tree structure in use-case storehouse is built, is respectively used in the use-case storehouse wherein being included in the first class catalogue
The public precondition of example;
According to the correlation of each use-case, the next stage catalogue corresponding to structure under each upper level catalogue successively, its
In, precondition script, use-case and rearmounted cleaning script are included in each next stage catalogue;
According to the tree structure in the use-case storehouse, the execution sequence of each use-case is determined.
Preferably, the tree structure according to the use-case storehouse, determining the execution sequence of each use-case includes:
If performing whole use-cases, according to the specific item under first class catalogue, left subtree second-level directory, left subtree second-level directory
Record, right subtree second-level directory, the order of subdirectory under right subtree second-level directory perform successively;
If performing single use-case, according in each upper level catalogue where first class catalogue, the single use-case in subtree
Precondition, the execution sequence of the single use-case catalogue performs successively.
Present invention also offers a kind of performs device of test case, described device includes:
First construction unit, the first class catalogue of the tree structure for building use-case storehouse, wherein being wrapped in the first class catalogue
Public precondition containing each use-case in the use-case storehouse;
Second construction unit, for the correlation according to each use-case, the structure pair under each upper level catalogue successively
The next stage catalogue answered, wherein, precondition script, use-case and rearmounted cleaning script are included in each next stage catalogue;
Execution unit, for the tree structure according to the use-case storehouse, determine the execution sequence of each use-case.
Preferably, the execution unit includes:
First performs subelement, if for performing whole use-cases, according to first class catalogue, left subtree second-level directory, Zuo Zi
Subdirectory, right subtree second-level directory under tree second-level directory, the order of the subdirectory under right subtree second-level directory perform successively;
Second performs subelement, if for performing single use-case, according to subtree where first class catalogue, the single use-case
On each upper level catalogue in precondition, the execution sequence of the single use-case catalogue performs successively.
Present invention also offers a kind of execution equipment of test case, including:
Memory, for storing computer program;
Processor, the step of the execution method of test case as described above is realized during for performing the computer program
Suddenly.
Present invention also offers a kind of computer-readable recording medium, meter is stored with the computer-readable recording medium
Calculation machine program, the computer program realizes the execution method of test case as described above when being executed by processor the step of.
The execution method of test case provided by the present invention, the first class catalogue of the tree structure in structure use-case storehouse, wherein
The public precondition of each use-case in the use-case storehouse is included in the first class catalogue;According to the correlation of each use-case,
The next stage catalogue corresponding to structure under each upper level catalogue successively, wherein, include precondition in each next stage catalogue
Script, use-case and rearmounted cleaning script;According to the tree structure in the use-case storehouse, the execution sequence of each use-case is determined.
It can be seen that the execution method of test case provided by the present invention, the use-case library directory of tree structure is built, in one-level
Catalogue is under root, according to the correlation of each use-case, further builds subdirectories at different levels and is determined according to the tree structure
The execution sequence of test.This method clearly constructs the structural system in automation use-case storehouse, clearly show each use-case it
Between correlation, for tester further operation provide conveniently.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
The schematic diagram of the execution method for the test case that Fig. 1 is provided by the embodiment of the present invention;
The schematic diagram for the test case catalogue tree structure that Fig. 2 is provided by the embodiment of the present invention;
The schematic diagram of the performs device for the test case that Fig. 3 is provided by the embodiment of the present invention;
The schematic diagram of the execution equipment for the test case that Fig. 4 is provided by the embodiment of the present invention.
Embodiment
The core of the present invention is to provide a kind of execution method of test case, can clearly construct automation use-case storehouse
Structure, and can clearly show the correlation between each use-case, according to holding for each use-case of the structure determination in the use-case storehouse
Row order.Another core of the present invention is to provide a kind of performs device of test case, performs equipment and computer-readable deposit
Storage media, it is respectively provided with above-mentioned technique effect.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
It refer to Fig. 1, the schematic diagram of the execution method for the test case that Fig. 1 is provided by the embodiment of the present invention.With reference to figure 1
Understand, this method may comprise steps of:
S101:The first class catalogue of the tree structure in use-case storehouse is built, each use-case in use-case storehouse is included wherein in first class catalogue
Public precondition;
S102:According to the correlation of each use-case, the next stage catalogue corresponding to structure under each upper level catalogue successively, its
In, precondition script, use-case and rearmounted cleaning script are included in each next stage catalogue;
Specifically, build second-level directory in the case where first class catalogue is root;Three-level catalogue is built under second-level directory;With this
Analogize, next stage catalogue is built under each upper level catalogue.
Wherein, the number of each next stage catalogue does not uniquely determine, and can be one or more, with specific reference to actual conditions
It is determined that.Do not uniquely determined in addition, each upper level catalogue is same with the corresponding relation of next stage catalogue, can be man-to-man pass
System, as built a three-level catalogue under a second-level directory, or one-to-many relation, as built under a second-level directory
Four three-level catalogues.It can specifically be determined according to actual conditions.
It is to be understood that the series of the depth of the tree structure of concrete use case library directory, the i.e. catalogue in use-case storehouse, can root
Difference Sexual behavior mode is made according to being actually needed, the present invention is not especially limited to this.
For convenience of understanding, Fig. 2 is referred to, Fig. 2 is a kind of showing for use-case catalogue tree structure provided in an embodiment of the present invention
It is intended to.With reference to figure 2, in use-case storehouse, root is three second-level directories of structure, respectively use-case A catalogues, use-case B under first class catalogue
Catalogue, use-case C catalogues.Two three-level catalogues, respectively use-case A1 catalogues, use-case are constructed under second-level directory use-case A catalogues
A2 catalogues;Unstructured next stage use-case catalogue under use-case B catalogues;A use-case C1 catalogue is built under use-case C catalogues.
Importantly, first class catalogue is that the public precondition that all use-cases may be used is placed with root;Under each
The content of first class catalogue includes precondition script, use-case and rearmounted cleaning script, thus can realize and rely between each use-case
Relation shows.
In addition, after the completion of use-case library directory structure, when performing use-case test every time, without again pulling up use-case library directory,
That is step S101 and S102 can Exactly-once.Certainly, can be according to above-mentioned if necessary to be modified to use-case library directory structure
The method of structure use-case library directory tree structure is modified;Or re-start structure according to above-mentioned steps.
S103:According to the tree structure in use-case storehouse, the execution sequence of each use-case is determined.
Specifically, when execution is docked in use-case storehouse with testing tool, schedule file Core Generator can be tree-shaped according to use-case storehouse
The characteristics of structure, generates specific execution sequence, can be further suitable according to the execution so as to complete the preparation work of test case
Sequence performs associative operation.
Preferably, if performing whole use-cases, according under first class catalogue, left subtree second-level directory, left subtree second-level directory
Subdirectory, right subtree second-level directory, the order of subdirectory under right subtree second-level directory perform successively;
If performing single use-case, before in each upper level catalogue where first class catalogue, single use-case in subtree
Put condition, the execution sequence of the single use-case catalogue performs successively.
Wherein, left subtree, right subtree can determine according to the relative position relation of tree structure, and each next stage catalogue is corresponding
The subdirectory of upper level catalogue.As use-case A catalogues, use-case A1 catalogues are to be located at the left subtree of tree structure in Fig. 2;Use-case B mesh
It is right subtree that position, which is recorded, relative to use-case A catalogues, and is left subtree relative to use-case C catalogues;Use-case A1 catalogues are use-case A
The subdirectory of catalogue, use-case B catalogues are the subdirectory of use-case root.
Specifically, Fig. 2 is equally may be referred to, can be according to following priority if performing all use-cases in structure shown in Fig. 2
Order performs successively:
Root, use-case A catalogues, use-case A1 catalogues, use-case A2 catalogues, use-case B catalogues, use-case C catalogues, use-case C1 catalogues
If only carrying out a use-case, use-case A1 is such as only carried out, can be performed successively according to following sequencing:
Root, the precondition in use-case A catalogues, use-case A1 catalogues
If executable portion use-case, use-case C and use-case C1 is such as performed, can be performed successively according to following sequencing:
Root, use-case C catalogues, use-case C1 catalogues
In summary, the execution method of test case provided by the present invention, the use-case library directory of tree structure is built,
First class catalogue is under root, according to the correlation of each use-case, further builds subdirectories at different levels, further can be according to the tree
The execution sequence of shape structure determination test.This method clearly constructs the structural system in automation use-case storehouse, and clearly opens up
Reveal the correlation between each use-case, further operation provides conveniently for tester.
Present invention also offers a kind of performs device of test case, the performs device described below can be with retouching above
The execution method stated is mutually to should refer to.With reference to figure 3, the performs device for the test case that Fig. 3 is provided by the embodiment of the present invention
Schematic diagram, with reference to Fig. 3 understand, the performs device includes:
First construction unit 1, the first class catalogue of the tree structure for building use-case storehouse, use is included wherein in first class catalogue
The public precondition of each use-case in example storehouse;
Second construction unit 2, for the correlation according to each use-case, successively under each upper level catalogue corresponding to structure
Next stage catalogue, wherein, precondition script, use-case and rearmounted cleaning script are included in each next stage catalogue;
Execution unit 3, for the tree structure according to use-case storehouse, determine the execution sequence of each use-case.
Preferably, execution unit 3 includes:
First performs subelement, if for performing whole use-cases, according to first class catalogue, left subtree second-level directory, Zuo Zi
Subdirectory, right subtree second-level directory under tree second-level directory, the order of the subdirectory under right subtree second-level directory perform successively;
Second performs subelement, if for performing single use-case, according in first class catalogue, single use-case place subtree
Each upper level catalogue in precondition, the execution sequence of the single use-case catalogue performs successively.
Present invention also offers a kind of execution equipment of test case, same equipment described below can be with retouching above
The execution method stated is mutually to should refer to.
With reference to figure 4, the schematic diagram of the execution equipment for the test case that Fig. 4 is provided by the embodiment of the present invention can by Fig. 4
Know, the execution equipment includes memory 4 and processor 5.
Memory 4, for storing computer program;
Processor 5, following steps are realized for performing computer program:
The first class catalogue of the tree structure in use-case storehouse is built, the public of each use-case in use-case storehouse is included wherein in first class catalogue
Precondition;According to the correlation of each use-case, the next stage catalogue corresponding to structure under each upper level catalogue successively, wherein,
Precondition script, use-case and rearmounted cleaning script are included in each next stage catalogue;According to the tree structure in use-case storehouse, it is determined that respectively
The execution sequence of use-case.
Present invention also offers a kind of computer-readable recording medium, calculating is stored with the computer-readable recording medium
Machine program, following steps can be realized when computer program is executed by processor:
The first class catalogue of the tree structure in use-case storehouse is built, the public of each use-case in use-case storehouse is included wherein in first class catalogue
Precondition;According to the correlation of each use-case, the next stage catalogue corresponding to structure under each upper level catalogue successively, wherein,
Precondition script, use-case and rearmounted cleaning script are included in each next stage catalogue;According to the tree structure in use-case storehouse, it is determined that respectively
The execution sequence of use-case.
Each embodiment is described by the way of progressive in specification, and what each embodiment stressed is and other realities
Apply the difference of example, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment, set
For standby and computer-readable recording medium, due to itself and embodiment
Disclosed method is corresponding, so description is fairly simple, related part is referring to method part illustration.
Professional further appreciates that, with reference to the unit of each example of the embodiments described herein description
And algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software, the composition and step of each example are generally described according to function in the above description.These
Function is performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme.Specialty
Technical staff can realize described function using distinct methods to each specific application, but this realization should not
Think beyond the scope of this invention.
Directly it can be held with reference to the step of method or algorithm that the embodiments described herein describes with hardware, processor
Capable software module, or the two combination are implemented.Software module can be placed in random access memory (RAM), internal memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Above the execution method to test case provided by the present invention, performs device, perform equipment and calculate that machine is readable deposits
Storage media is described in detail.Specific case used herein is set forth to the principle and embodiment of the present invention,
The explanation of above example is only intended to help the method and its core concept for understanding the present invention.It should be pointed out that for this technology
For the those of ordinary skill in field, under the premise without departing from the principles of the invention, some improvement can also be carried out to the present invention
And modification, these are improved and modification also falls into the protection domain of the claims in the present invention.
Claims (6)
1. a kind of execution method of test case, it is characterised in that including:
The first class catalogue of the tree structure in use-case storehouse is built, wherein including each use-case in the use-case storehouse in the first class catalogue
Public precondition;
According to the correlation of each use-case, the next stage catalogue corresponding to structure under each upper level catalogue successively, wherein, respectively
Precondition script, use-case and rearmounted cleaning script are included in the next stage catalogue;
According to the tree structure in the use-case storehouse, the execution sequence of each use-case is determined.
2. according to the method for claim 1, it is characterised in that the tree structure according to the use-case storehouse, determine institute
Stating the execution sequence of each use-case includes:
If performing whole use-cases, according to the subdirectory under first class catalogue, left subtree second-level directory, left subtree second-level directory, the right side
Subtree second-level directory, the order of subdirectory under right subtree second-level directory perform successively;
If performing single use-case, before in each upper level catalogue where first class catalogue, the single use-case in subtree
Put condition, the execution sequence of the single use-case catalogue performs successively.
A kind of 3. performs device of test case, it is characterised in that including:
First construction unit, the first class catalogue of the tree structure for building use-case storehouse, wherein including institute in the first class catalogue
State the public precondition of each use-case in use-case storehouse;
Second construction unit, for the correlation according to each use-case, successively under each upper level catalogue corresponding to structure
Next stage catalogue, wherein, precondition script, use-case and rearmounted cleaning script are included in each next stage catalogue;
Execution unit, for the tree structure according to the use-case storehouse, determine the execution sequence of each use-case.
4. device according to claim 3, it is characterised in that the execution unit includes:
First performs subelement, if for performing whole use-cases, according to first class catalogue, left subtree second-level directory, left subtree two
Subdirectory, right subtree second-level directory under level catalogue, the order of the subdirectory under right subtree second-level directory perform successively;
Second performs subelement, if for performing single use-case, according in first class catalogue, the single use-case place subtree
Precondition, the execution sequence of the single use-case catalogue in each upper level catalogue perform successively.
A kind of 5. execution equipment of test case, it is characterised in that including:
Memory, for storing computer program;
Processor, the execution method of test case as claimed in claim 1 or 2 is realized during for performing the computer program
Step.
6. a kind of computer-readable recording medium, it is characterised in that be stored with computer on the computer-readable recording medium
Program, the computer program realize the step of the execution method of test case as claimed in claim 1 or 2 when being executed by processor
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711057722.0A CN107818049A (en) | 2017-11-01 | 2017-11-01 | Execution method, performs device and the execution equipment of a kind of test case |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711057722.0A CN107818049A (en) | 2017-11-01 | 2017-11-01 | Execution method, performs device and the execution equipment of a kind of test case |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107818049A true CN107818049A (en) | 2018-03-20 |
Family
ID=61604650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711057722.0A Pending CN107818049A (en) | 2017-11-01 | 2017-11-01 | Execution method, performs device and the execution equipment of a kind of test case |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107818049A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109729407A (en) * | 2018-12-10 | 2019-05-07 | 视联动力信息技术股份有限公司 | A kind of catalog indication method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1987817A (en) * | 2005-12-22 | 2007-06-27 | 中兴通讯股份有限公司 | Method for realizing test exemple automation operation |
CN105068809A (en) * | 2015-08-13 | 2015-11-18 | 上海斐讯数据通信技术有限公司 | PyQt-based platform for implementing automation project management and case execution |
CN107220179A (en) * | 2017-05-26 | 2017-09-29 | 郑州云海信息技术有限公司 | A kind of automatic test script of storage system and the method for test |
CN107256148A (en) * | 2017-05-24 | 2017-10-17 | 龙芯中科技术有限公司 | The generation method and system at interface, electronic equipment and storage medium |
-
2017
- 2017-11-01 CN CN201711057722.0A patent/CN107818049A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1987817A (en) * | 2005-12-22 | 2007-06-27 | 中兴通讯股份有限公司 | Method for realizing test exemple automation operation |
CN105068809A (en) * | 2015-08-13 | 2015-11-18 | 上海斐讯数据通信技术有限公司 | PyQt-based platform for implementing automation project management and case execution |
CN107256148A (en) * | 2017-05-24 | 2017-10-17 | 龙芯中科技术有限公司 | The generation method and system at interface, electronic equipment and storage medium |
CN107220179A (en) * | 2017-05-26 | 2017-09-29 | 郑州云海信息技术有限公司 | A kind of automatic test script of storage system and the method for test |
Non-Patent Citations (1)
Title |
---|
ANLCY: ""python自动化-unittest批量执行用例"", 《HTTPS://WWW.CNBLOGS.COM/CAMILLA/P/7373329.HTML》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109729407A (en) * | 2018-12-10 | 2019-05-07 | 视联动力信息技术股份有限公司 | A kind of catalog indication method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103136243B (en) | File system duplicate removal method based on cloud storage and device | |
CN101923568B (en) | Method for increasing and canceling elements of Bloom filter and Bloom filter | |
CN103229151B (en) | A kind of partition extension method and device | |
CN106980636A (en) | Declaration form data processing method and device | |
AU2015347304B2 (en) | Testing insecure computing environments using random data sets generated from characterizations of real data sets | |
JP2011520189A5 (en) | ||
CN102662833A (en) | Method for managing test cases | |
CN103473298B (en) | Data archiving method and device and storage system | |
US10656934B2 (en) | Efficient software testing | |
CN110659257B (en) | Metadata object repairing method, device, equipment and readable storage medium | |
US10389823B2 (en) | Method and apparatus for detecting network service | |
CN106682021A (en) | Database migration method and device | |
CN106201591A (en) | The configuration file upgrade method of a kind of cloud management platform and device | |
JPWO2015087509A1 (en) | State storage / restoration apparatus, state storage / restoration method, and program | |
CN107818049A (en) | Execution method, performs device and the execution equipment of a kind of test case | |
CN108182278A (en) | A kind of FRU information maintenance methods and relevant apparatus | |
CN107766230A (en) | A kind of method and apparatus tested based on configuration file | |
CN109460366A (en) | A kind of software stability test method, device, equipment and medium | |
CN104166541A (en) | Method and device for updating measured control library | |
CN109445989A (en) | A kind of file system data backup method and device | |
CN107832455A (en) | A kind of data capture method of storage object, system, equipment and storage medium | |
CN108694162A (en) | The treating method and apparatus of file | |
US10725877B2 (en) | System, method and computer program product for performing a data protection operation | |
CN103268254B (en) | Control to rely on deadlock detection method and device | |
JP5516192B2 (en) | Model creation device, model creation program, and model creation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180320 |