Software Test (vi): black box test

Source: Internet
Author: User

1. Common black box test Case Design Method

Equivalence class partitioning method, boundary value analysis method, causality diagram method, state transfer method, decision table method, flow analysis method, orthogonal test method, error guessing method, input/Output domain test method, anomaly analysis method,

2. Equivalence class Partitioning method

concept: A collection of input fields in which each input condition is equivalent.

principles:

A Specify the range of values or the number of values, you can determine a valid equivalence class and two invalid equivalence classes

B Specifies a set of input values, or a condition that specifies what must be, you can determine a valid equivalence class and an invalid equivalence class

C Boolean, you can determine a valid equivalence class and an invalid equivalence class

D A set of values for the input data is assumed to be N, and the program is to process each input value separately, you can determine the n valid equivalence class and an invalid equivalence class

E. A valid equivalence class and several invalid equivalence classes can be determined in case the input data must obey

F. The equivalence classes have been zoned, and the methods of each element in the process of processing are different, so it should be further divided

Steps:

    1. Dividing equivalence classes
    2. Design test Cases for valid equivalence classes
    3. Design at least one test case for each invalid equivalence class
3. Boundary Value Analysis method

boundary Value usage conditions:

    1. The input criteria explicitly define the range of values or specify the number of values
    2. The input condition explicitly sets an ordered set

Edge value points definition: up, off, inside points

principles:

    1. If the output condition specifies the range or number of values, the value within or near the boundary should be selected
    2. The output condition specifies the number of values, the maximum value, the minimum value, the maximum value + 1, the minimum value-1,
    3. The output condition is an ordered set, then the first and last of the collection
    4. If internal data is used, the boundary value of this internal data should be selected

Steps:

    1. Analyze the type of input parameters (from SRS)
    2. Equivalence class partitioning (optional)
    3. Defining boundaries
    4. Correlation analysis (optional)
    5. Forming test items
4. Equivalence class + boundary value

Scope of application: between the input and the input, output and output of the relationship between the non-containment situation.

Example: User Registration

applicable test types: functional test, performance test, GUI test, configuration test, etc.

5. Decision Table Method

Concept: a tool for analyzing and expressing situations where different operations are performed under multiple logic conditions.

Application:

    1. Test based on decision table is the most rigorous and logical
    2. Combined values for different logical conditions

composition: condition pile, condition item, action pile, action item

Steps:

    1. Determine the number of rules
    2. List all condition items piles and action piles
    3. Fill in Conditional items
    4. Fill in the action item to get the initial decision table
    5. Simplify decision tables, merge similar rules (optional)
    6. Turn each rule into a use case

Advantages: can be a complex problem according to a variety of possible situations listed not, concise and easy to understand, can avoid omission.

Cons: There is a leak in the merger.

Scope of application:

    1. Specifications are given in the form of a decision table or easily converted into a decision table
    2. conditions, order of rules do not affect execution results
    3. Each rule is relatively independent
    4. A rule can be converted into one or more use cases, the number of use cases of a rule depends on the conditions of conversion
6. Causality Diagram method

is the systematic method of translating specifications into judgment tables. It is suitable for checking the various combinations of input conditions.

steps: 1. Break down the large system specification to a testable specification fragment (optional)

2. Find out what is the cause and which are the results

3. Draw a causal diagram

4. Convert the causality diagram to a decision table

5. Simplified decision table (optional)

6. Generating Test Cases

Advantages:

    1. An error is ignored when multiple input conditions in an equivalence class are combined.
    2. Design multiple input condition combination cases
    3. Can point out what is wrong with the description of the program specification

Disadvantages:

    1. Causal relationship between input conditions and output results, sometimes difficult to obtain from SRS
    2. Even if a causal relationship is obtained, the number of use cases and their large size can be caused by complex causal relationships.

conditions and results: identity, non-, or, and

    1. Identity relationship: When an entry occurs, the corresponding output is generated, and the output is not generated when the input item does not occur
    2. Non-relationship: Contrary to the identity relationship (myth: If the former does not occur, then the latter occurs, the former occurs, the latter does not occur)
    3. or relationship: in multiple input conditions, a corresponding output is generated as long as one occurs
    4. Relationship: In multiple input conditions, the corresponding output is generated only when all the inputs occur

conditions and Conditions: XOR, sole, requirement, or

    1. XOR: Up to one input condition occurs
    2. Or: At least one input condition occurs
    3. Unique: There is only one occurrence in all inputs

Requirements: As long as one of the inputs occurs, other inputs will also occur (myth: Why the top-up and top-up success is not this, because they are not the same as the input conditions, but by the condition, no relationship)

7. Process Analysis Method

This is a test analysis method which is extended to the black box test from the path covering analysis method in the White box test.

Steps:

    1. Draw a business flowchart
    2. Defining state nodes and conditional branches
    3. Determine the test path
    4. Constructing test Cases

Summary: focus on the test process, the process test no problem does not explain the system function is no problem

8. State Migration Diagram method
    1. The test of state machine focuses on the correctness of the test state transfer.
    2. In this way, reverse test cases, such as the illegal combination of States and events, can be designed.

concept: The State migration method is actually testing the transformation of various States, the test of these state transitions is very easy to miss in the actual work, as long as the transition of these states to test, is not the use of State migration method is not important, Because the state migration diagram is simply a way to test the transformation of multiple states into a string.

Steps:

1. Draw a State migration diagram

2. List Status-event table

3. Draw a State conversion tree (list each state and draw all States from this state)

4. Derive the test path from the state transformation tree

5. Write legitimate test cases based on test path

6. Writing illegal test cases

9. Orthogonal test method

concept: It is a scientific test design method of reasonable arrangement experiment to choose the appropriate and representative points from the large quantity and test points, and apply the "orthogonal table" derived from the theory of Gad.

Related concepts: the status of indicators, factors, and factors

Steps:

    1. Construction Factor State Table
    2. Select Orthogonal table (when the number of factor states is not available, select Factor +1, remove multiple columns)
    3. Holing
    4. Merge
    5. Mapping
    6. Write Use Cases

Summary: Do not consider the actual value of the meaning, so delete the invalid combination, to supplement the missing common combination.

10. Input domain test method

You only need to consider the special value and the long time input after using the equivalence class and the boundary value.

11. Output domain Override method

Expected to achieve output or equivalence class coverage

12. Anomaly Analysis method

Fault-tolerant, fail-back capability

13. Error-Guessing method

Based on empirical speculation. Can only be used as a complement to a test design, not as a separate design test case.

14. Summary of use case design methods

Method name

Characteristics

Insufficient

Test Type

System type

Note

equivalence class, Boundary Value

Classification, coverage

Do not consider the combination

All types

All Systems

Need to focus on the information behind the data

Decision table Causality diagram

The combination of all permutations, artificial simplification

More cumbersome

Functional Testing

Control systems, games

For testing more complex processes

Orthogonal test

22 Combination, Auto Select

Don't care about the actual meaning of the combination

Functional testing, configuration testing

All Systems

The key is the selection of orthogonal table

State Migration

Test modifications

Functional Testing

Mobile phone, MP3

Edit Modify function can also be used

Process Analysis

Testing process

Functional testing, installation testing

Financial systems, logistics systems, e-commerce systems

Business process complex system applicable, only check the process, does not guarantee that the single function is correct

Software Test (vi): black box test

Related Article

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.