Week 2 - Test Cases

Equivalence Class Partitioning

  Divide the input domain of the program into subsets, and select a small amount of representative data from the subsets

    The most typical black-box testing method does not consider the internal structure of the program at all, but only designs test cases according to the requirements and instructions of the program

  HOW

      The tester conducts a detailed analysis of the requirements of the requirements specification, especially the functional requirements , divides the input field of the program into several parts, and selects a few representatives from each part as test cases

      Divide equivalence classes (based on requirements) - establish an equivalence class table (valid and invalid) - design test cases

 Classification:

    Effective data equivalence class : a set of input data that is meaningful and reasonable for the specification of the program

    Invalid data equivalence class : unreasonable or meaningless input to the specification of the program

 

boundary value method

  Complementary to equivalence classes, a black-box testing method for testing boundary values ​​of inputs and outputs

   Advantages : The test is relatively sufficient

     Disadvantages : effect for efficiency, many use cases, the degree of subdivision depends on progress and manpower

     Scope of use : Divide the input condition into multiple sub-conditions, and the sub-conditions are independent of each other and have no constraints.

Judgment table method

Analyze and express situations and tools for performing different operations under multiple logic challenges

  Condition Stub : Lists all conditions of the problem

  Action Stubs : Lists possible actions to be taken by the problem specification

  Condition item : Lists the values ​​for the conditions it lists, true and false in all possible cases

  Action item : List the actions that should be taken under various values ​​of the condition item

  Rule : The specific value of any combination of conditions and the corresponding action to be performed

  Note: A column in the decision table that runs through condition items and action items is a rule

 

cause and effect diagram

 

  Find the cause (input condition) and effect (change of output or program state ) from the requirement , and convert it into a decision table through the cause and effect diagram

 

relationship between input conditions

 

relationship between input and output

 

  Limitation: The number of test cases is large, which is not easy to maintain

 

Common symbols

 

    CI : Reason

 

    EI : result

 

  Identity : cause and effect occur at the same time

 

  Non ~ : one of the causes and effects does not appear (the cause appears, the effect does not appear or the cause does not appear, the effect appears)

 

  or v : as long as a cause is satisfied, the effect appears (the cause does not appear, the effect does not appear)

 

  And ^ : the cause needs to be satisfied, the result will appear

 

Restrictions

 

  input into consideration

 

    E (mutual exclusion) : Indicates that ab will not be established at the same time, at most one (maybe neither of them)

 

    I (inclusive) : at least one of abc must hold

 

    O (unique) : there must be one and only one in abc

 

    R (required) : ab appears simultaneously

 

  output consideration

 

    M (mandatory or masked) : when a is 1 , b must be 0 ; when a is 0 , b is indeterminate

 

 

 

 

state transition method

 

  Black box testing technology based on product specification analysis, test each state of the system and functions related to the state, and verify the logic flow of the program through different states

 

 

Orthogonal test method

 

  Also known as the combined test method, in order to effectively reduce the test time and cost

 

  According to Galois theory, select appropriate and representative points (test cases) from a large amount of test data (test cases), and rationally arrange the test scientific experimental design method

 

How to choose an orthogonal table (principle):

 

  Number of factors (variables) to consider

 

  The number of factor levels (values ​​of variables) to be considered

 

  Consider the number of rows in the orthogonal table

 

  Take the one with the least number of rows

 

 Number of test cases: n= number of factors * (number of states -1 ) +1

 

 The more factor levels, the more streamlined the experiment will be

 

 A feature of the orthogonal table is that each level occurs the same number of times throughout the experiment

 

 

scene method

 

  Each path through a use case in the figure is represented by a basic flow and an alternative flow. The black straight line represents the basic flow, which is the simplest path through the use case.

step:

 

  According to the description, describe the basic flow of the program and the various alternative flows

 

  Generate different scenarios based on the basic flow and various alternative flows

 

  Generate corresponding test cases for each scenario

 

  Reiterate each use case, remove excess, and determine data values ​​later

 

 

Other tests:

 

  There are two basic methods of software testing: pass test and fail test

 

Pass test : It is mainly used to verify whether it is consistent with its requirements, and to determine at least what the software can do. Generally, test cases are designed by analyzing the requirements specification. In order to determine whether a program meets its goals, a pass test must be performed.

 

Failing tests : After you are confident that it works under normal conditions, you can use various means to find defects. Purely for sabotage, used to prove "a system doesn't do what it doesn't need to do". Examines the behavior of the program beyond the strict scope of the requirements specification, deliberately attacking the weak points of the software.

 

Wrong guessing : Also called wrong guessing, it is not a testing technique in itself, but a testing skill that can be applied to all testing techniques to produce a more effective test (guess all possibilities in the program based on experience and intuition)

 

Random testing : All input data in the test are randomly generated, and the goal is to simulate user actions

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324847581&siteId=291194637