CN104866424A - Method for designing software test cases based on scenario analysis - Google Patents
Method for designing software test cases based on scenario analysis Download PDFInfo
- Publication number
- CN104866424A CN104866424A CN201510266816.3A CN201510266816A CN104866424A CN 104866424 A CN104866424 A CN 104866424A CN 201510266816 A CN201510266816 A CN 201510266816A CN 104866424 A CN104866424 A CN 104866424A
- Authority
- CN
- China
- Prior art keywords
- test
- test case
- test cases
- software
- case
- 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
Abstract
The present invention relates to the technical field of software testing, and in particular relates to a method for designing software test cases based on scenario analysis. The method according to the present invention comprises the following basic steps: 1, describing a basic flow and various standby flows of a program according to description; 2, generating different scenarios according to the basic flow and the various standby flows; 3, generating a test case for each scenario; 4, reviewing all the generated test cases and removing redundant test cases; and 5, upon determination of the test cases, determining a test data value for each test case. The method according to the present invention improves the quality of test case drafting and design, and the test efficiency, and can be used for the design and drafting of software test cases.
Description
Technical field
The present invention relates to software testing technology field, particularly a kind of method according to scene analysis design software test case.
Background technology
Software test is the important means improving software quality, and test case is the guidance in software test procedure, is the criterion that must observe of software test, the basic guarantee that software testing quality is stable especially.In software test procedure, testing example design and establishment are most important in software test activity, are the correctness of test execution, the basis of validity.How effectively design test case is the problem that tester pays close attention to always.Present software nearly all triggers control flow by event, and sight when event triggers just defines scene, and the different trigger sequence of same event and result just form flow of event.This thought in Software for Design also can be incorporated in software test, by the description of using scene to come function point to system or operation flow, more vivo can depict sight when event triggers, be conducive to test design use-case scene and be used for describing the path flowing through use-case, to all basic stream and alternative flows on this paths of end traversal from use-case; Thus improve the quality of Test Sample Design and the quality of software test.
Summary of the invention
The technical matters that the present invention solves is to provide a kind of method according to scene analysis design software test case; Solve that testing example design is complete, redundancy, of low quality thus cause test mass not high etc. problem.
The technical scheme that the present invention solves the problems of the technologies described above is:
Described method comprises following basic step:
Step 1: according to explanation, describes out the basic stream of program and every alternative flows;
Step 2: generate different scenes according to basic stream and every alternative flows;
Step 3: corresponding test case is generated to each scene;
Step 4: to all test cases review again generated, remove unnecessary test case;
Step 5: after test case is determined, to each test case determination test data values.
The invention has the beneficial effects as follows: by solving according to the method for scene analysis design software test case, testing example design is complete, redundancy, of low quality thus cause test mass not high etc. problem.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further described:
Fig. 1 is process flow diagram of the present invention.
Embodiment
As shown in Figure 1, the present invention is with an online shopping for example, and user enters an online shopping site and does shopping, after shopping goods, carry out on-line purchase, at this moment need to use account number to log in, after logining successfully, carry out transaction of paying, after Transaction Success, generate order form, complete whole shopping process to tell about and carry out design test case by the analysis of scene method, concrete steps are as follows:
Step 1: according to explanation, describes out the basic stream of program and every alternative flows; Scene method generally comprises basic stream and standby stream, and from a flow process, the process determined by the path describing process, through traveling through all basic stream and standby stream to complete whole scene;
Basic stream | Log in online shopping site, select article, log in account number, transaction of paying, generate order |
Alternative flows 1 | Account number does not exist |
Alternative flows 2 | Account number or code error |
Alternative flows 3 | Sorry, your ticket has not enough value for user account |
Alternative flows 4 | User account is out of funds |
Alternative flows X | User log off |
Step 2: generate different scenes according to basic stream and every alternative flows;
Step 3: corresponding test case is generated to each scene; For each test case in this example, there are all data elements (as input or Already in database) and expected results that relate in a test case ID, condition (or illustrate), test case; By structure matrix of starting with from the data element determined needed for execution use-case scene.Then, for each scene, the test case comprising the felicity condition performed needed for scene at least to be determined.Such as, in matrix below, V (effectively) is for showing that this condition must be that VALID (effectively) just can perform basic stream, and I (invalid) will activate required alternative flows under showing this condition." n/a " (inapplicable) used in following table shows that this condition is not suitable for test case.(note: only write partial test use-case)
Step 4: to all test cases review again generated, remove unnecessary test case;
Step 5: after test case is determined, to each test case determination test data values.(note: only write partial test use-case)
Claims (1)
1., according to a method for scene analysis design software test case, it is characterized in that: described method comprises following basic step:
Step 1: according to explanation, describes out the basic stream of program and every alternative flows;
Step 2: generate different scenes according to basic stream and every alternative flows;
Step 3: corresponding test case is generated to each scene;
Step 4: to all test cases review again generated, remove unnecessary test case;
Step 5: after test case is determined, to each test case determination test data values.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510266816.3A CN104866424A (en) | 2015-05-22 | 2015-05-22 | Method for designing software test cases based on scenario analysis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510266816.3A CN104866424A (en) | 2015-05-22 | 2015-05-22 | Method for designing software test cases based on scenario analysis |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104866424A true CN104866424A (en) | 2015-08-26 |
Family
ID=53912270
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510266816.3A Pending CN104866424A (en) | 2015-05-22 | 2015-05-22 | Method for designing software test cases based on scenario analysis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104866424A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105306294A (en) * | 2015-10-20 | 2016-02-03 | 上海斐讯数据通信技术有限公司 | Test case generation system and method for switch |
CN105374131A (en) * | 2015-10-28 | 2016-03-02 | 深圳怡化电脑股份有限公司 | Method and device for automatic testing |
CN105405220A (en) * | 2015-10-28 | 2016-03-16 | 深圳怡化电脑股份有限公司 | Method and device for automated test |
CN105405221A (en) * | 2015-10-28 | 2016-03-16 | 深圳怡化电脑股份有限公司 | Method and device for automated test |
CN106250314A (en) * | 2016-08-04 | 2016-12-21 | 合网络技术(北京)有限公司 | A kind of test data capture method and system |
CN110221968A (en) * | 2019-05-20 | 2019-09-10 | 平安普惠企业管理有限公司 | Method for testing software and Related product |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102354297A (en) * | 2011-07-20 | 2012-02-15 | 中兴通讯股份有限公司 | Test method and device |
CN104572446A (en) * | 2014-12-17 | 2015-04-29 | 北京京东尚科信息技术有限公司 | Automatic testing method and automatic testing system |
-
2015
- 2015-05-22 CN CN201510266816.3A patent/CN104866424A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102354297A (en) * | 2011-07-20 | 2012-02-15 | 中兴通讯股份有限公司 | Test method and device |
CN104572446A (en) * | 2014-12-17 | 2015-04-29 | 北京京东尚科信息技术有限公司 | Automatic testing method and automatic testing system |
Non-Patent Citations (2)
Title |
---|
NEIHOUHOU: "《百度文库》", 12 July 2013 * |
殷人昆等: "《实用软件工程》", 31 December 2010 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105306294A (en) * | 2015-10-20 | 2016-02-03 | 上海斐讯数据通信技术有限公司 | Test case generation system and method for switch |
CN105306294B (en) * | 2015-10-20 | 2018-04-27 | 上海斐讯数据通信技术有限公司 | A kind of Test cases technology system and method for interchanger |
CN105374131A (en) * | 2015-10-28 | 2016-03-02 | 深圳怡化电脑股份有限公司 | Method and device for automatic testing |
CN105405220A (en) * | 2015-10-28 | 2016-03-16 | 深圳怡化电脑股份有限公司 | Method and device for automated test |
CN105405221A (en) * | 2015-10-28 | 2016-03-16 | 深圳怡化电脑股份有限公司 | Method and device for automated test |
CN106250314A (en) * | 2016-08-04 | 2016-12-21 | 合网络技术(北京)有限公司 | A kind of test data capture method and system |
CN106250314B (en) * | 2016-08-04 | 2019-05-28 | 合一网络技术(北京)有限公司 | A kind of test data acquisition methods and system |
CN110221968A (en) * | 2019-05-20 | 2019-09-10 | 平安普惠企业管理有限公司 | Method for testing software and Related product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104866424A (en) | Method for designing software test cases based on scenario analysis | |
CN106294171B (en) | Test macro, the method and apparatus of product automatic deployment | |
EP3021225B1 (en) | Automated configuration code based selection of test cases for payment terminals | |
US9514034B1 (en) | Ordered test execution to enable faster feedback | |
CN105654945A (en) | Training method of language model, apparatus and equipment thereof | |
CN108846660B (en) | Method and system for identifying abnormal fund | |
CN107016019B (en) | Database index creation method and device | |
CN106682036A (en) | Data exchange system and exchange method thereof | |
US10235267B2 (en) | Online testing system and method thereof | |
CN104753909A (en) | Updated information authentication method, device and system | |
CN104572474B (en) | A kind of lightweight location of mistake Implementation Technology based on Dynamic Slicing | |
CN103577388A (en) | Excel template based data processing method and device | |
CN107578210A (en) | The automated testing method and device of contract approval flow | |
CN103810092A (en) | Application system testing method and device | |
CN109857714A (en) | Journal obtaining method, device, electronic equipment and computer readable storage medium | |
CN104317707A (en) | Program structure influence sensing based software error positioning method | |
CN111429155A (en) | Bank card dispute processing method and device | |
KR102013657B1 (en) | Apparatus for statically analyzing assembly code including assoxiated multi files | |
Lin et al. | Taiwan llm: Bridging the linguistic divide with a culturally aligned language model | |
CN105224455A (en) | A kind of method of automatic generation character string type test case | |
CN106598843B (en) | A kind of software log behavior automatic identifying method based on program analysis | |
CN111639028B (en) | Method, device, engine and storage medium for testing account checking rule script | |
CN105183633A (en) | Method and system for generating test case | |
CN107783896B (en) | Optimization method and device of data processing model | |
CN112037069B (en) | Fund transfer certificate generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate 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: 20150826 |