Test Case Design White paper--The scene design party sends

Source: Internet
Author: User

Test Case Design White paper--The scene design party sends
Author:vince Source: Http://blog.csdn.net/vincetest

A. Introduction to Methods

Today's software is almost always using event triggering to control the process, the event triggered when the scene is formed, and the same event different trigger sequence and processing results to form an event stream. This idea of software design can also be introduced into the software testing, can be more vivid picture of the event triggered when the scene, the test designer to design test cases, while making test cases easier to understand and execute.

Basic and alternate streams: as shown in the following illustration, each path through a use case is represented by a basic stream and an alternate stream, and the straight black line represents the basic flow, which is the simplest path through the use case. Alternative streams are expressed in different colors, and an alternate stream may start from the base stream, execute under a specific condition, and then rejoin the base stream (such as alternate streams 1 and 3), or it may originate from another alternative stream (such as alternative stream 2) or terminate the use case without re-joining a stream (such as alternate streams 2 and 4).

two. Combat Drills

1. Example Description

The diagram below shows the flow diagram for the ATM example.

2. Scene Design: The resulting scenario is shown in the following table.

Table 3-8 Scene Design

Successful withdrawal of scene

Basic flow

No cash in scene 2--ATM

Basic flow

Alternate Stream 2

Insufficient cash in scene 3--ATM

Basic flow

Alternate Stream 3

Scene 4--pin error (and input opportunity)

Basic flow

Alternate Stream 4

Scene 5--pin error (no more input opportunities)

Basic flow

Alternate Stream 4

Scenario 6--account Not present/Wrong account type

Basic flow

Alternate Stream 5

Scenario 7--account balance Insufficient

Basic flow

Alternate Stream 6

Note: For convenience, loops in alternate streams 3 and 6 (scenes 3 and 7) and loop combinations are not included in the table above.

3. Use case design

For each of these 7 scenarios, you need to determine the test case. You can use matrices or decision tables to identify and manage test cases. The following shows a common format in which the rows represent the individual test cases, and the columns represent the information for the test case. In this example, for each test case, there is a test case ID, a condition (or description), all the data elements involved in the test case (as input or already in the database), and the expected results.

Table 3-9 test Case tables

tr>
TC (test case) ID number scene/Condition PIN account enter (or select) the amount book amount amount in ATM expected result
CW1 Scenario 1: Successful withdrawals v v v V v Successful withdrawals
CW2 no cash in scene 2:atm v v v V I withdrawal options unavailable, use case closed
CW3 scene 3:atm cash shortage v v v v I warning message, return to basic stream step 6, enter amount
cw4</

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.