CN108287788A - A kind of use-case step matching method based on test case, system - Google Patents
A kind of use-case step matching method based on test case, system Download PDFInfo
- Publication number
- CN108287788A CN108287788A CN201711436050.4A CN201711436050A CN108287788A CN 108287788 A CN108287788 A CN 108287788A CN 201711436050 A CN201711436050 A CN 201711436050A CN 108287788 A CN108287788 A CN 108287788A
- Authority
- CN
- China
- Prior art keywords
- case
- case step
- test
- file
- information
- 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
-
- 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
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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A kind of use-case step collocation system based on test case, the use-case step collocation system include creating use-case step block, management use-case step block and establishment test case module;The establishment use-case step block is for creating use-case step and being preserved to the use-case step of establishment;The management use-case step block is for modifying and deleting to the use-case step created;The establishment test case module is for creating test case and being preserved to test case.It is an object of the invention to propose a kind of use-case step matching method based on test case, system, it is encoded by each step to test case in automatic test, it is carried out writing test case and test code according to different situations, while facilitating developer to test, the tester for being also convenient for write code writes test case and generates code, and use-case step of flexibly arranging in pairs or groups realizes use-case test.
Description
Technical field
The present invention relates to software auxiliary development field more particularly to a kind of use-case step collocation sides based on test case
Method, system.
Background technology
Present company is also mostly in without test or the autonomous test phase of developer, does not touch test
Use-case, test case (TestCase) are one group of test input, execution condition and the expection worked out for some special objective
As a result, to test some Program path or to verify whether meet some particular demands.Test case reflects the need to be verified
It asks.However, verifying these demands may implement by different modes and by different test mans;
And common primary test case management tool is also with execl, word, relatively advanced has testlink,
Bugzilla etc..But these softwares cannot all be tested according to use-case automatic code generating, and non-technical personnel is being tested certainly
Dynamicization can only look at use-case and not know how to determine whether that test is correct when testing.
Invention content
It is an object of the invention to propose a kind of use-case step matching method based on test case, system, by from
Each step of test case is encoded in dynamicization test, is carried out writing test case and test code, side according to different situations
Just while developer tests, the tester for being also convenient for write code writes test case and generates code,
Flexibly collocation use-case step realizes use-case test.
For this purpose, the present invention uses following technical scheme:
A kind of use-case step matching method based on use-case test, the use-case step matching method include creating use-case step
Suddenly it, manages use-case step and creates three interior methods of test case, include the process of use-case step collocation:
Step A:Into use-case step system, and obtain operating right;
Step B:It chooses whether to create use-case step, if so, use-case Step Information is write, and the use-case to writing completion
Step Information is preserved;If it is not, then choosing whether management use-case step;
Step C:If selection management use-case step, it is that use-case step is deleted or changed to continue selection;If choosing
It selects and use-case step is deleted, then directly delete use-case step file;If selection modifies to use-case step, to use-case
The information and code of step are modified and are preserved;
Step D:If not selecting management use-case step, choose whether to create test case, if selection creates test case,
Suitable use-case step is then selected according to use-case Step Information, determines use-case;And use-case is preserved.
Preferably, it is included in and creates in use-case step, writes the process of use-case Step Information:
Step B1:Write use-case step shorthand information;
Step B2:Write use-case Step Details;
Step B3:Write use-case step code.
Preferably, after creating use-case step, it includes filename, file remarks and text to need the use-case step file preserved
Part content;The filename includes the shorthand information for the use-case step for needing to preserve;The file remarks include needing to preserve
The details of use-case step;File content includes the code for writing use-case step.
Preferably, include the process of determining use-case:
Step d1:It is created according to use-case Step Information and selects suitable use-case step;
Step d2:Write use-case shorthand information and use-case details;
Step d3:It adjusts use-case sequence of steps and preserves.
Preferably, it is included in when creating test case, process that determining use-case is preserved:
Step D1:Confirm and preserve use-case, and establishment file is pressed from both sides, the title expression of the file simply describes use-case;
Step D2:The code of use-case step is extracted to file;
Step D3:It creates public function file f unction and creates principal function file main;
Step D4:Public operation step is copied in public function file f unction;
Step D5:It is inserted into detailed use case description in principal function file main, according to use-case step, calls a step in order
Rapid code and return information.
A kind of use-case step collocation system based on test case, the use-case step collocation system include creating use-case step
Rapid module, management use-case step block and establishment test case module;
The establishment use-case step block is for creating use-case step and being preserved to the use-case step of establishment;
The management use-case step block is for modifying and deleting to the use-case step created;
The establishment test case module is for creating test case and being preserved to test case.
Preferably, the establishment use-case step block includes writing use-case Step Information module and preservation use-case step mould
Block;
The use-case Step Information module of writing is for writing use-case step shorthand information, writing use-case Step Details
With write use-case step code;
For the preservation use-case step block for preserving the use-case step file created, the file includes file
Name, file remarks and file content;
The filename includes the shorthand information for the use-case step for needing to preserve;The file remarks include needing to preserve
The details of use-case step;File content includes the code for writing use-case step.
Preferably, the establishment test case module includes determining use-case module and preservation use-case module;
The determining use-case module creates according to use-case Step Information and selects suitable use-case step, writes use-case and simply believes
Breath and use-case details, adjust use-case sequence of steps and preserve;
The preservation use-case module is used to preserve the test case created, including:Confirm and preserve use-case, and creates
File is built, the title expression of the file simply describes use-case;The code of use-case step is extracted to file;It creates public
Function file function and establishment principal function file main altogether;Public operation step is copied into public function file
In function;It is inserted into detailed use case description in principal function file main, according to use-case step, calls a step in order
Code and return information.
Description of the drawings
Fig. 1 is use-case step collocation flow chart of the present invention;
Fig. 2 be the present invention write use-case Step Information flow chart;
Fig. 3 is the determination use-case flow chart of the present invention;
Fig. 4 is that the present invention preserves the flow chart for determining use-case
Fig. 5 is the system framework figure of the present invention.
Specific implementation mode
Technical solution to further illustrate the present invention below with reference to the accompanying drawings and specific embodiments.
A kind of use-case step matching method based on use-case test of the present embodiment, the use-case step matching method include
It creates use-case step, management use-case step and creates three interior methods of test case, as shown in Figure 1, including that use-case step is taken
The process matched:
Step A:Into use-case step system, and obtain operating right;
Step B:It chooses whether to create use-case step, if so, use-case Step Information is write, and the use-case to writing completion
Step Information is preserved;If it is not, then choosing whether management use-case step;
Step C:If selection management use-case step, it is that use-case step is deleted or changed to continue selection;If choosing
It selects and use-case step is deleted, then directly delete use-case step file;If selection modifies to use-case step, to use-case
The information and code of step are modified and are preserved;
Step D:If not selecting management use-case step, choose whether to create test case, if selection creates test case,
Suitable use-case step is then selected according to use-case Step Information, determines use-case;And use-case is preserved.
Each use-case is allocated as much walking according to operation, a step portion code, it can be according to operating procedure when combining use-case
Manually sorted.Code has been fixed in use-case, needs to change when there is data, it is only necessary to change initial input step generation
Code, the data of the output of every part of code halfway can be monitored and checked, final to obtain tester's demand data.System
Effect is that these step codes are recorded, and is preserved, redjustment and modification, and a use-case of generation can be used for a long time according to demand.
In order to mitigate the pressure of developer and tester, can be walked according to the use-case preserved when creating use-case
Suddenly it is added, generates new use-case code.While facilitating developer to test, it is also convenient for that the survey of code will not be write
Examination personnel write test case and generate code, and use-case step of flexibly arranging in pairs or groups realizes use-case test.It is this establishment and generation for
Pressure test, automatic test, system testing, regression test can be supported, greatly reduce the development time and facilitate various
The people in type post tests and adjusts.
Preferably, it is created in use-case step as shown in Fig. 2, being included in, writes the process of use-case Step Information:
Step B1:Write use-case step shorthand information;
Step B2:Write use-case Step Details;
Step B3:Write use-case step code.
Preferably, after creating use-case step, it includes filename, file remarks and text to need the use-case step file preserved
Part content;The filename includes the shorthand information for the use-case step for needing to preserve;The file remarks include needing to preserve
The details of use-case step;File content includes the code for writing use-case step.
Preferably, as shown in figure 3, the process including determining use-case:
Step d1:It is created according to use-case Step Information and selects suitable use-case step;
Step d2:Write use-case shorthand information and use-case details;
Step d3:It adjusts use-case sequence of steps and preserves.
Preferably, as shown in figure 4, being included in when creating test case, the process that is preserved to determining use-case:
Step D1:Confirm and preserve use-case, and establishment file is pressed from both sides, the title expression of the file simply describes use-case;
Step D2:The code of use-case step is extracted to file;
Step D3:It creates public function file f unction and creates principal function file main;
Step D4:Public operation step is copied in public function file f unction;
Step D5:It is inserted into detailed use case description in principal function file main, according to use-case step, calls a step in order
Rapid code and return information.
A kind of use-case step collocation system based on test case, as shown in figure 5, the use-case step collocation system includes
It creates use-case step block, management use-case step block and creates test case module;
The establishment use-case step block is for creating use-case step and being preserved to the use-case step of establishment;
The management use-case step block is for modifying and deleting to the use-case step created;
The establishment test case module is for creating test case and being preserved to test case.
Preferably, the establishment use-case step block includes writing use-case Step Information module and preservation use-case step mould
Block;
The use-case Step Information module of writing is for writing use-case step shorthand information, writing use-case Step Details
With write use-case step code;
For the preservation use-case step block for preserving the use-case step file created, the file includes file
Name, file remarks and file content;
The filename includes the shorthand information for the use-case step for needing to preserve;The file remarks include needing to preserve
The details of use-case step;File content includes the code for writing use-case step.
Preferably, the establishment test case module includes determining use-case module and preservation use-case module;
The determining use-case module creates according to use-case Step Information and selects suitable use-case step, writes use-case and simply believes
Breath and use-case details, adjust use-case sequence of steps and preserve;
The preservation use-case module is used to preserve the test case created, including:Confirm and preserve use-case, and creates
File is built, the title expression of the file simply describes use-case;The code of use-case step is extracted to file;It creates public
Function file function and establishment principal function file main altogether;Public operation step is copied into public function file
In function;It is inserted into detailed use case description in principal function file main, according to use-case step, calls a step in order
Code and return information.
The technical principle of the present invention is described above in association with specific embodiment.These descriptions are intended merely to explain the present invention's
Principle, and it cannot be construed to limiting the scope of the invention in any way.Based on the explanation herein, the technology of this field
Personnel would not require any inventive effort the other specific implementation modes that can associate the present invention, these modes are fallen within
Within protection scope of the present invention.
Claims (8)
1. a kind of use-case step matching method based on use-case test, it is characterised in that:The use-case step matching method includes
It creates use-case step, management use-case step and creates three interior methods of test case, include the process of use-case step collocation:
Step A:Into use-case step system, and obtain operating right;
Step B:It chooses whether to create use-case step, if so, use-case Step Information is write, and the use-case step to writing completion
Information is preserved;If it is not, then choosing whether management use-case step;
Step C:If selection management use-case step, it is that use-case step is deleted or changed to continue selection;If selection pair
Use-case step is deleted, then directly deletes use-case step file;If selection modifies to use-case step, to use-case step
Information and code modify and preserve;
Step D:If not selecting management use-case step, choose whether to create test case, if selection creates test case, root
Suitable use-case step is selected according to use-case Step Information, determines use-case;And use-case is preserved.
2. a kind of use-case step matching method based on test case according to claim 1, it is characterised in that:It is included in wound
It builds in use-case step, writes the process of use-case Step Information:
Step B1:Write use-case step shorthand information;
Step B2:Write use-case Step Details;
Step B3:Write use-case step code.
3. a kind of use-case step matching method based on test case according to claim 1, it is characterised in that:
After creating use-case step, it includes filename, file remarks and file content to need the use-case step file preserved;It is described
Filename includes the shorthand information for the use-case step for needing to preserve;The file remarks include the detailed of the use-case step for needing to preserve
Thin information;File content includes the code for writing use-case step.
4. a kind of use-case step matching method based on test case according to claim 1, it is characterised in that:
Process including determining use-case:
Step d1:It is created according to use-case Step Information and selects suitable use-case step;
Step d2:Write use-case shorthand information and use-case details;
Step d3:It adjusts use-case sequence of steps and preserves.
5. a kind of use-case step matching method based on test case according to claim 1, it is characterised in that:
It is included in when creating test case, process that determining use-case is preserved:
Step D1:Confirm and preserve use-case, and establishment file is pressed from both sides, the title expression of the file simply describes use-case;
Step D2:The code of use-case step is extracted to file;
Step D3:It creates public function file f unction and creates principal function file main;
Step D4:Public operation step is copied in public function file f unction;
Step D5:It is inserted into detailed use case description in principal function file main, according to use-case step, calls a step in order
Code and return information.
6. a kind of use-case step collocation system based on test case, it is characterised in that:The use-case step collocation system includes
It creates use-case step block, management use-case step block and creates test case module;
The establishment use-case step block is for creating use-case step and being preserved to the use-case step of establishment;
The management use-case step block is for modifying and deleting to the use-case step created;
The establishment test case module is for creating test case and being preserved to test case.
7. a kind of use-case step collocation system based on test case according to claim 6, it is characterised in that:
The establishment use-case step block includes writing use-case Step Information module and preservation use-case step block;
The use-case Step Information module of writing is for writing use-case step shorthand information, writing use-case Step Details and volume
Write use-case step code;
For the preservation use-case step block for preserving the use-case step file created, the file includes filename, text
Part remarks and file content;
The filename includes the shorthand information for the use-case step for needing to preserve;The file remarks include the use-case for needing to preserve
The details of step;File content includes the code for writing use-case step.
8. a kind of use-case step collocation system based on test case according to claim 6, it is characterised in that:
It includes determining use-case module and preservation use-case module to create test case module;
The determining use-case module creates according to use-case Step Information and selects suitable use-case step, write use-case shorthand information and
Use-case details are adjusted use-case sequence of steps and are preserved;
The preservation use-case module is used to preserve the test case created, including:Confirm and preserve use-case, and creates text
Part presss from both sides, and the title expression of the file simply describes use-case;The code of use-case step is extracted to file;Create public letter
Number file f unction and establishment principal function file main;Public operation step is copied into public function file f unction
In;It is inserted into detailed use case description in principal function file main, according to use-case step, the code of a step is called in order and returns
It writes in reply and ceases.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711436050.4A CN108287788A (en) | 2017-12-26 | 2017-12-26 | A kind of use-case step matching method based on test case, system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711436050.4A CN108287788A (en) | 2017-12-26 | 2017-12-26 | A kind of use-case step matching method based on test case, system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108287788A true CN108287788A (en) | 2018-07-17 |
Family
ID=62832379
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711436050.4A Pending CN108287788A (en) | 2017-12-26 | 2017-12-26 | A kind of use-case step matching method based on test case, system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108287788A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109359049A (en) * | 2018-11-12 | 2019-02-19 | 郑州云海信息技术有限公司 | A kind of execution method and system of test case |
CN115687140A (en) * | 2022-11-10 | 2023-02-03 | 江苏衫数科技集团有限公司 | Test case compiling method and system based on automatic test |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101025686A (en) * | 2007-03-22 | 2007-08-29 | 中兴通讯股份有限公司 | Automation test system and test script generating and operating method |
CN101221503A (en) * | 2008-02-01 | 2008-07-16 | 中国建设银行股份有限公司 | Software testing method and device |
US20100229155A1 (en) * | 2009-03-09 | 2010-09-09 | Pandiyan Adiyapatham | Lifecycle management of automated testing |
CN103984626A (en) * | 2014-05-13 | 2014-08-13 | 华为技术有限公司 | Method and device for generating test-case script |
CN103984628A (en) * | 2014-05-15 | 2014-08-13 | 中国南方航空股份有限公司 | Automatic function test method and system applied to BS (browser/server) framework |
CN107391378A (en) * | 2017-07-27 | 2017-11-24 | 郑州云海信息技术有限公司 | The generation method and device of a kind of test script |
-
2017
- 2017-12-26 CN CN201711436050.4A patent/CN108287788A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101025686A (en) * | 2007-03-22 | 2007-08-29 | 中兴通讯股份有限公司 | Automation test system and test script generating and operating method |
CN101221503A (en) * | 2008-02-01 | 2008-07-16 | 中国建设银行股份有限公司 | Software testing method and device |
US20100229155A1 (en) * | 2009-03-09 | 2010-09-09 | Pandiyan Adiyapatham | Lifecycle management of automated testing |
CN103984626A (en) * | 2014-05-13 | 2014-08-13 | 华为技术有限公司 | Method and device for generating test-case script |
CN103984628A (en) * | 2014-05-15 | 2014-08-13 | 中国南方航空股份有限公司 | Automatic function test method and system applied to BS (browser/server) framework |
CN107391378A (en) * | 2017-07-27 | 2017-11-24 | 郑州云海信息技术有限公司 | The generation method and device of a kind of test script |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109359049A (en) * | 2018-11-12 | 2019-02-19 | 郑州云海信息技术有限公司 | A kind of execution method and system of test case |
CN115687140A (en) * | 2022-11-10 | 2023-02-03 | 江苏衫数科技集团有限公司 | Test case compiling method and system based on automatic test |
CN115687140B (en) * | 2022-11-10 | 2024-01-30 | 江苏衫数科技集团有限公司 | Test case writing method and system based on automatic test |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107908541B (en) | Interface testing method and device, computer equipment and storage medium | |
CN109271326B (en) | Cloud database testing method and device, equipment and storage medium thereof | |
CN104317589B (en) | A kind of code automatic generation method and device for being used to load dynamic link library | |
CN104794048B (en) | A kind of UI automated testing methods and system | |
CN104809056B (en) | A kind of generation method and device of interface testing code | |
CN107864052A (en) | Method and its system based on lasting application deployment configuration automatic updating | |
US20080276221A1 (en) | Method and apparatus for relations planning and validation | |
CN110990274B (en) | Data processing method, device and system for generating test cases | |
WO2016026328A1 (en) | Information processing method and device and computer storage medium | |
US20070061641A1 (en) | Apparatus and method for generating test driver | |
CN108469955B (en) | Annotation-based Android injection framework implementation method | |
CN108563572A (en) | A kind of regression testing method, device and server | |
CN108446398A (en) | A kind of generation method and device of database | |
US7272753B2 (en) | Methods and apparatus for translating application tests for execution with simulation software tools | |
CN106919431B (en) | Code comparison method, equipment and system in continuous integration | |
Hamza et al. | Web and mobile applications' testing using black and white box approaches | |
US10146530B1 (en) | Simulating and evaluating code branch merge | |
CN103049374B (en) | Automatic testing method and device | |
CN108287788A (en) | A kind of use-case step matching method based on test case, system | |
EP2530460A2 (en) | Manufacture of engineering components with designed defects for analysis of production components | |
CN111143228B (en) | Test code generation method and device based on decision table method | |
CN116561003A (en) | Test data generation method, device, computer equipment and storage medium | |
CN105653445A (en) | Implementation method capable of meeting DO-178C test result | |
CN106155665A (en) | Accordance puts to the proof system and method | |
CN112685400A (en) | Method and system for detecting quality of health medical data based on SDK rule engine |
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: 20180717 |