Search This Blog

Pages

Friday, February 6, 2009

Testing Techniques

Black Box/Functional Testing Techniques:

Equivalence Partitioning:
Equivalence partitioning is the process of methodically reducing the huge(infinite)set of possible test cases into a much smaller, but still equally effective set. when looking for equivalence partitions, think about ways to group similar inputs, similar outputs, and similar operations of the software. These groups are the equivalence partitions

For example:
Bank account can be 500 to 1000 or 0 to 499 or 2000 (the field type is integer). What are the equivalence classes?
  • Valid class: 0 <= account <= 499
  • Valid class: 500 <= account <= 1000
  • Valid class: 2000 <= account <= 2000
  • Invalid class: account < 0
  • Invalid class: 1000 < account < 2000
  • Invalid class: account > 2000

Boundary Value Analysis
If software can operate on the edge of its capabilities, it will almost certainly operate well under normal conditions. This technique consist of developing test cases and data that focus on the input and output boundaries of a given function. 
The boundary value analysis can have 6 text cases.
n, n-1,n+1 for the upper limit and n, n-1,n+1 for the lower limit.

For Example:
Username field should take only 5 - 15 characters.  If we apply BVA rule then we need to do field validation in 6 ways as follows

Username with 4 characters (Invalid)
Username with 5 characters (Valid)
Username with 6 characters (Valid)
Username with 14 characters (Valid)
Username with 15 characters (Valid)
Username with 16 characters (Invalid)

Error Guessing
This is based on the theory that test cases can be developed based upon the intuition and experience of the Test-Engineer.

For Example: 
In the example of date, where one of the inputs is the date, a test may try February 29, 2000 or 9.9.99 

    White Box/Structural Testing Techniques:
     
    Statement Coverage - Executes all statements at least once
     
    Decision Coverage - Executes each decision direction at least once

    Condition Coverage - Executes every condition in the program with all possible outcomes at least once  

    Cyclomatic Complexity - he complexity M is then defined as M = EN + 2P where 
     E = the number of edges of the graph 
    N = the number of nodes of the graph 
    P = the number of connected components

      No comments:

      Post a Comment