Home » Testing techniques
Thread Testing !!!

 Thread Testing

1. Its a technique that often used during in the early integration testing.
2. Demonstrates key functional capabilities by testing a string of units that accomplishes a specific function in the application.

Incremental Testing !!!

 Incremental Testing
A disciple method of testing the interfaces between unit tested programs as well as between system components.

Types:
1. Top down Testing
2. Bottom up testing


1. Top Down
Begin testing from the top of the module hieracrchy and works down to the bottom using interior stubs to stimulate the lower interfacing modules or program.

It tests the program of LLD. If LLD is not ready means it uses a dummy module called STUB.
LLD - Low Level Design

2. Bottom up
* Begin testing from the bottom of the hierarchy and works up to the top.
* It requires the development of driver module which provide the test input call the module or program being testing and display the test output.

It tests the program of HLD. If it is not ready means it uses a dummy module called DRIVER.
HLD - High Level Design

If both dummy variables STUB and DRIVER are presented in the testing process then it is known as Sandwich Incremental Testing.

Black Box Testing !!!

Black Box Testing:

Testing of a function without knowing internal structure of the program.
Black box testing that is also known as functional or behavioral testing. This is testing a pre- release or release version of the program and trying various inputs looking for incorrect outputs or program crashes. It is one of the best ways to diagnose bugs before users discover them. Given the complexity of many software packages, much thought must be devoted to optimizing the testing process. Ideally only one test will be performed for each possible set of software conditions. Of all possible sets of software conditions there are groupings of conditions that if all tested would be testing the same code and reveal the same bugs (or hopefully the lack of bugs). These groups of conditions are considered an equivalent class or each is called an equivalent class partition.


Equivalence Partitioning:
A subset of data that is representation of a large class.
Ex: A program which exits credit limits with in a given range. (10000 – 15000)
Would have three equivalent classes.
• Less than 10000 (invalid)
• Between 10000 and 15000 ( valid)
• Above 15000. ( invalid)

Boundary Analysis:
Technique that consists of developing test cases and data that focus on the input and output boundaries of the given function.
• Low Boundary plus or minus one ( 9999 or 10001)
• On the boundary ( 10000 and 15000)
• Upper boundary plus or minus (14999 and 15001)

Error guessing
Based on the theory the test cases developed based on the experience of the Test engineer.
Ex : If one of the input is date, a test engineer must try Feb 29,2000 or 9/9/99.

Advantages of Black Box Testing
- Tester can be non-technical.
- This testing is most likely to find those bugs as the user would find.
- Testing helps to identify the vagueness and contradiction in functional specifications.
- Test cases can be designed as soon as the functional specifications are complete

Disadvantages of Black Box Testing
- Chances of having repetition of tests that are already done by programmer.
- The test inputs needs to be from large sample space.
- It is difficult to identify all possible inputs in limited testing time. So writing test cases is slow and difficult
Chances of having unidentified paths during this testing

White Box Testing !!!

Testing of a function with knowing internal structure of the program.

White box testing involves looking at the structure of the code. When you know the internal structure of a product, tests can be conducted to ensure that the internal operations performed according to the specification. And all internal components have been adequately exercised. In other word WBT tends to involve the coverage of the specification in the code.

Code coverage is defined in six types as listed below.

• Segment coverage – Each segment of code b/w control structure is executed at least once.
• Branch Coverage or Node Testing – Each branch in the code is taken in each possible direction at least once.
• Compound Condition Coverage – When there are multiple conditions, you must test not only each direction but also each possible combinations of conditions, which is usually done by using a ‘Truth Table’
• Basis Path Testing – Each independent path through the code is taken in a pre-determined order. This point will further be discussed in other section.
• Data Flow Testing (DFT) – In this approach you track the specific variables through each possible calculation, thus defining the set of intermediate paths through the code i.e., those based on each piece of code chosen to be tracked. Even though the paths are considered independent, dependencies across multiple paths are not really tested for by this approach. DFT tends to reflect dependencies but it is mainly through sequences of data manipulation. This approach tends to uncover bugs like variables used but not initialize, or declared but not used, and so on.
• Path Testing – Path testing is where all possible paths through the code are defined and covered. This testing is extremely laborious and time consuming.
• Loop Testing – In addition top above measures, there are testing strategies based on loop testing. These strategies relate to testing single loops, concatenated loops, and nested loops. Loops are fairly simple to test unless dependencies exist among the loop or b/w a loop and the code it contains.

In WBT, we use the control structure of the procedural design to derive test cases. Using WBT methods a tester can derive the test cases that
• Guarantee that all independent paths within a module have been exercised at least once.
• Exercise all logical decisions on their true and false values.
• Execute all loops at their boundaries and within their operational bounds
• Exercise internal data structures to ensure their validity.

White box testing (WBT) is also called Structural or Glass box testing.

We do WBT because Black box testing is unlikely to uncover numerous sorts of defects in the program. These defects can be of the following nature:

• Logic errors and incorrect assumptions are inversely proportional to the probability that a program path will be executed. Error tend to creep into our work when we design and implement functions, conditions or controls that are out of the program
• The logical flow of the program is sometimes counterintuitive, meaning that our unconscious assumptions about flow of control and data may lead to design errors that are uncovered only when path testing starts.
• Typographical errors are random, some of which will be uncovered by syntax checking mechanisms but others will go undetected until testing begins.

Talking theoretically, all we need to do in WBT is to define all logical paths, develop test cases to exercise them and evaluate results i.e. generate test cases to exercise the program logic exhaustively.

For this we need to know the program well i.e. We should know the specification and the code to be tested; related documents should be available too us .We must be able to tell the expected status of the program versus the actual status found at any point during the testing process.

Testing Techniques !!!

Testing Techniques

There are four types of testing techniques. They are
• White Box Testing
• Black Box Testing
• Incremental Testing
• Thread Testing

Comparison between Testing Levels and techniques: