Sunday, February 28, 2010

Dynamic Analysis - Testing Techniques

The testing of software mostly end up in testing an executable on a computer. To test such an object we give a set of inputs and we look for some expected outputs. If we are able to see the required outputs we end up saying that the software works well. This is a kind of testing where we've the entire software to be tested. But there are also scenarios where only partial software will be developed and we've to test those too. In such cases the test object can be embedded into a test bed for testing. The test bed will have stubs and drivers which can be used for testing.

The Stubs and drivers together form the test bed. Stubs just simulate the I/O behavior of the part of the test object. Often the testers need to modify the existing test drivers and make them generic to test the required test objects. Most of the testing goes by gut felling. Though such kind of testing reveals some bugs on top of the test object, it does not reveal all the bugs inside the test object.
In order to reveal the bugs hidden inside the software a proper test methodology should be followed. There are two different approaches for testing a software .They are Black box testing and White box testing


In Black box testing we cannot see the internal structure of the code .Only the test object is jsut like a complete black box. The inputs are given and the output is observed from the Point Of Observation (POO) in the test object. Black Box Testing is also called as functional testing. In white box testing the internal structure of the code is seen and it is under test. Here the Internal code is the Point Of Examination. Here the test cases are written to cover the internal structure of the code. White Box Testing is also called us Structural Testing. Black Box Testing Techniques During the Black Box Testing the internal structure of the code is not considered. Though it is a matter of testing how the DUT behaves, it cannot be tested the way we like. There are certain methods that are available, which can help us in arriving at some reasonable number of test cases assuring maximum coverage.
The methods that can be used while developing the test cases for Black Box testing are

1. Equivalence Class partioning
2. Boundary Value Analysis
3. State Transistion Testing
4. Use Case Method
5. Cause Effect and Decision Table
Equivalence Class Partioning (ECP)
The DUT always has to respond with some kind of information or output whenever some input is given. Whatever may be the input data, whether it’s valid or invalid the device has to respond with some kind of input. Our test case has both invalid and valid data to test the DUT. In ECP the test cases are separated on the basis of the class which it falls.