Design test Cases by scene analysis

Source: Internet
Author: User

Design test Cases by scene analysis

1. Event flow, the same event different triggering sequence and processing results to form an event stream, the event flow is divided into basic and alternative flows

1) Basic flow: The shortest path through which the program starts execution until the successful end.

·2) Alternate stream: An alternate stream may start from the base stream, execute under certain conditions, and then rejoin the base stream, or it may originate from another alternative stream, and then join the basic stream or terminate the use case after execution.

2. Usage scenarios: Typically used when analyzing business processes or process-processing functions.

3. Scenario analysis procedure for designing test cases:

1) Analyze software specification descriptions, and sort out basic and alternative flows

·2) generate a scenario based on a combination of basic and alternate flows

·3) Analyze all scenarios and merge the scenarios where the test content repeats

4) Design test cases per scenario

Example:

Credit Card online payment function input credit card number, query password and real-time SMS verification code, all correct and the account amount is sufficient to complete the payment. If the relevant information is incorrect then give the corresponding prompt information, if more than the information is incorrect when the input sequence prompt, the verification code in one minute valid, error three times to quit the payment.

1) Organize basic and alternative streams

Basic flow: normal payment

Alternate Stream 1: account does not exist

Alternate Stream 2: The query password is incorrect

Alternate stream 3: The SMS Verification Code is incorrect

Alternate stream 4: Invalid SMS Verification code

Alternate Stream 5: Insufficient account balance

Alternate Stream 6: Exit payment

2) Generate scenarios based on event flow

Scenario 1: Basic flow--test the normal payment process processing

Scenario 2: Basic stream-alternate flow-Verify that the account is not present and that the program control is correct

Scenario 3: Basic stream-Alternate stream 2--verifying that the password is incorrect when program control is correct

Scenario 4: Basic stream-Alternate stream 3--SMS verification code is incorrect when program control is correct

Scenario 5: Basic stream-Alternate stream 4--program control is correct when SMS verification code fails

Scenario 6: Basic stream-Alternate stream 5-alternate stream 6--test account balance under insufficient conditions program control is correct

Scenario 7: Basic stream-Alternate stream 1-Alternate stream 2-alternate stream 3-alternate stream 6--test if error three exits this payment

Scenario 8: Basic stream-Alternate stream 3-Alternate stream 4-Alternate stream 5-Alternate stream 6--test error three times and control of account balances conflict

3) Merging repeating scenes

Scenario 1: Basic flow

Scenario 2: Basic stream-Alternate stream 5-Alternate stream 6

Scenario 3: Basic stream-Alternate stream 1-Alternate stream 2-alternate stream 3-Alternate stream 6

Scenario 4: Basic stream-Alternate stream 3-Alternate stream 4-Alternate stream 5-Alternate stream 6

4) Design test cases according to the final scenario



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.