Key Points for Final Review of Software Testing Chapter 4 Black Box Testing

Everyone thinks the writing is okay, you can like, bookmark, and pay attention to it!
You can also visit my personal blog , it is estimated that it will be updated in recent years! Be friends with me! https://motongxue.cn


Article directory

Chapter 4 Black Box Testing

  1. basic concept

    1. This method does not require knowledge of the internal logical structure and internal characteristics of the program
    2. Test software function requirements, software interface, external database access and software initialization, etc.
  2. black box testing method

    1. equivalence class division

      • The input data is divided into several disjoint subsets according to relevant regulations , and the union of all subsets is the entire input domain.
      1. Localization of defects: The set of all inputs to a software can be divided into at least two subsets:
        1. one containing all normal and legal inputs;
        2. The other contains all exceptions and illegal inputs.
      2. The principle of equivalence class division is to test the software with any input in the same equivalence class, and the software will output the same result. The test cases of all equivalence classes constitute a complete test case set.
        1. effective equivalence class
        2. invalid equivalence class
      3. Steps to Divide Equivalence Classes
        1. Determine the input field
        2. equivalence class division
        3. composite equivalence class
        4. Determine and eliminate untestable equivalence classes
        5. Design Test Cases Based on Testable Equivalence Classes
      4. Test steps for equivalence classes
        1. Divide equivalence classes to form equivalence class table;
        2. Specify a unique number for each equivalence class;
        3. Design a new test case to cover as many valid equivalence classes that have not been covered as possible , and repeat this step until all valid equivalence classes are covered.
        4. Design a new test case. Make it cover one and only one invalid equivalence class , and repeat this step until all invalid equivalence classes are covered.
      5. Design of Test Cases Based on Equivalence Classes P71
      6. Equivalence Class Tests for Triangle Problems
    2. boundary value analysis

      1. Overview: Mainly analyze the boundary data of the defined domain of the data , and select and test legal and illegal boundary data.
      2. The values ​​of the input variables during the test: minimum value (min), slightly higher than the minimum value (min+), normal value (nom), slightly lower than the maximum value (max-), maximum value (max).
      3. robustness test
        • In addition to taking the five boundary values ​​​​mentioned above, values ​​​​out of the range should also be considered
        • min-、min、min+、nom、max-、max、max+
    3. Decision Table Method (Decision Table Method)

      1. Overview: Able to list complex problems according to various possible situations, be concise and avoid omissions, and design a complete set of test cases. (most stringent test method)

      2. composition

        1. Condition pile: lists all the conditions of the problem. The order in which the conditions are listed is generally considered to be immaterial.

        2. Action Stakes: Lists the possible actions specified in the question. The order in which these operations are listed is not constrained.

        3. Condition item: List the value of the condition on its left column. True and false values ​​in all possible cases.

        4. Action item: lists the actions that should be taken under various values ​​of the condition item.

          Rules: The specific value of any combination of conditions and the corresponding actions to be performed are called rules.

          In the decision table, if there are n conditions, and each condition has two value permutations, 2 n 2^n can be obtained2n rules.

      3. type

        1. Finite entry decision table: All conditions are binary conditions (true/false).
        2. Extended Entry Decision Table: A condition can have multiple values.
      4. There are 5 basic steps in constructing a decision table:

        1. List all condition stubs and action stubs.
        2. Determine the number of rules.
        3. Fill in the conditions.
        4. Fill in the action items to get the initial decision table.
        5. Merge similar rules to get an optimized decision table
        6. Design Test Cases Based on Decision Tables
    4. causal diagram

      1. overview
        1. Cause-and-effect diagrams, also known as dependency models. It is mainly used to describe the dependency between software input conditions (causes) and software output results (results).
        2. The cause-and-effect diagram method is especially suitable for the situation that the program under test has multiple input conditions, and the output of the program depends on various combinations of input conditions .
      2. Basic Notation and Constraints
        1. The symbols of causality are: correspondence relation, negation relation, selection relation and juxtaposition relation;
        2. Constraint relationship symbols are: mutual exclusion relationship, inclusion relationship, unique relationship, requirement relationship and shielding relationship;
        3. insert image description here
      3. Design steps of cause and effect diagram test case
        1. Analyze what in the program specification is cause and what is effect. Causes are often input conditions or equivalence classes of input conditions, and effects are output conditions.
        2. Analyze the semantics and limitations of the content described in the program specification, find out two types of relationships, and draw a cause-and-effect diagram .
        3. Convert the cause-and-effect diagram into a decision table .
        4. Write a test case for each column of the decision table .
    5. Other black box testing methods

      1. Classification method: is a systematic method for generating test cases from software requirements.
      2. Predicate Tests: Tests to verify that predicate implementations are correct.
      3. Error guessing method: intuition and experience guess the types of errors that may go wrong, and write test cases.
  3. Application example of black box testing - insurance calculation program

  4. Comparison of black box testing and white box testing

    white box testing black box testing
    program structure known program structure unknown program structure
    scale small scale test large-scale testing
    in accordance with Detailed Design Description Requirements description, outline design description
    facing program structure Input/Output Interface/Functional Requirements
    Be applicable unit test Assembly, system testing
    test driver Additional test drivers need to be written Typically no need to write additional test drivers
    Testers Developer Dedicated Testers/Externals
    advantage Ability to cover specific parts of the program, etc. Can stand in the user's position to test
    shortcoming Cannot test external properties of the program Cannot detect omissions to requirements, etc. Cannot test specific parts inside the program If the specification is wrong, it cannot be found, etc.
  5. practise

    1. Conduct the black box test on the triangle problem operation questions in Chapter 3 as follows
      1. equivalence class division
      2. boundary value analysis
      3. causal diagram
    2. What is black box testing? What is the basis and process of black box testing?
    3. What are the common methods of black box testing? In the specific testing process, how to choose the corresponding black box testing method?
    4. What is the main difference between black box testing and white box testing?

Updated on December 20, 2020

Everyone thinks the writing is okay, you can like, bookmark, and pay attention to it!
You can also visit my personal blog , it is estimated that it will be updated in recent years! Be friends with me! https://motongxue.cn


Guess you like

Origin blog.csdn.net/CrazyMooo/article/details/111414957