Black box testing methods

Source: Internet
Author: User

Boundary Value Analysis

Very simple, not explained.

Division equivalence class

An equivalence class refers to a subset of an input field. All input data can be reasonably divided into several equivalence classes, and a data in each equivalence class is used as the input condition for testing, A small amount of representative test data can be used. obtain good test results.

There are two differences between equivalence classes: Valid equivalence classes and invalid equivalence classes.

Discriminant table

A table is divided into four parts. The left part is the name of the condition or array element, the upper right part is the combination of all conditions, and the lower left part is the name of the processing activity, indicate the relationship between the condition combination and the corresponding activity in the lower right corner.

A discriminant table consists of the following four parts:

  1. Condition stub: lists all the conditions for the problem. It is generally considered that the Order of the listed conditions is irrelevant.
  2. Action stub: lists the actions that may be performed as specified by the problem. The order of these operations is not restricted.
  3. Condition entry: lists the values of the condition in its left column. True/false values in all possible circumstances
  4. Action entry: lists the actions that should be taken when the condition items have different values.

Causal Method

Background:

Both the equivalence classification method and the Boundary Value Analysis Method Focus on the input conditions, but do not consider the combinations of input conditions and the mutual constraints between input conditions. In this way, although various input conditions may fail, the combination of multiple input conditions may lead to errors, which has been ignored.

Steps for designing a test case using the causal method:

  1. Find out the cause (input condition) and result (output result or program status change) from the description of the program specification)
  2. Cause and effect
  3. Converts a sequence into a discriminant table.
  4. Design a test case for each column in The discriminant table

Generally, CI is used to indicate the cause, EI is used to indicate the result, and each node is used to indicate the status. The value can be "0" or "1 ". "0" indicates that a status does not appear, and "1" indicates that a status appears.




Constant: If C1 is 1 (0), E1 is 1 (0)

Non: If C1 is 1 (0), E1 is 0 (1)

Or, if one of C1 C2 C3 is true, E1 is true.

And: C1 and C2 are both established, and E1 is established.

The following is an example to describe how to convert the sequence into a table:

Example:

There is a vending machine software that handles boxed drinks at a unit price of 1 RMB and 5 cents. If you invest 1 RMB 5 cent coin, press the "Cola", "sprite", and "Black Tea" buttons and the corresponding drinks will be sent out. If a two-dollar coin is invested, the 5-cent coin will be returned when the beverage is sent

Analysis

Cause: ① 1 RMB 5 cent coin; ② 2 RMB coin; ③ press the "Cola" button; ④ press the "sprite" button; ⑤ press the "Black Tea" button.

Intermediate status: ① coin invested; ② button.

RESULTS: ① five coins were returned; ② "Cola" drinks; ③ "sprite" drinks; and ④ "Black Tea" drinks.

Cause and effect

Convert a factor into a decision table

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.