Sunday, July 7, 2013

Testing Methodologies - Part 2



Dynamic testing:

Dynamic testing analyzes the software program in different operating environments. This includes different brands of computers and other hardware differences, possibly including multiple monitors, different operating systems, and different sets of software applications coexisting on the machine. In addition, testers may have external modules or plug-ins that they use in connection with the software being testing that increases the differentiation of the testing environments in the dynamic testing.


1. White-box Testing

2. Black-box Testing

3. Gray-box Testing
 

White-box Testing

Ø       White box testing strategy deals with the internal logic and structure of the code. It is also called glass, structural, open or clear box testing. The tests that are written based on the white box testing strategy incorporate coverage of the code written, branches, paths, statements and internal logic of the code, etc. In order to implement white box testing, the tester has to deal with the code, and hence is required to possess knowledge of coding and logic i.e., internal working of the code. White box test also needs the tester to look into the code and find out which unit/statement/chunk of the code is malfunctioning.

Ø      In white-box testing the tester is concentrating on how the software does it. For example, a structural technique may be concerned with exercising loops in the software.
Ø       Different test cases may be derived to exercise the loop once, twice, and many times. This may be done regardless of the functionality of the software.

         Structure-based techniques can also be used at all levels of testing. Developers use structure-based techniques in component testing and component integration testing, especially where there is good tool support for code coverage.

         Structure-based techniques are also used in system and acceptance testing, but the structures are different. For example, the coverage of menu options or major business transactions could be the structural element in system or acceptance testing.

The areas of the code, that are tested using white box testing are:

1.     Code Coverage
2.     Segment Coverage
3.     Branch Coverage
4.     Condition Coverage
5.     Loop Coverage
6.     Path Testing
7.     Data Flow Coverage


Types of Testing under White/Glass Box Testing Strategy

Unit Testing:

The developer carries out unit testing in order to check if the particular module or unit of code is working fine. The unit testing comes at the very basic level as it is carried out as and when the unit of the code is developed or a particular functionality is built.

Statement Coverage:

In this type of testing, the code is executed in such a manner that every statement of the application is executed at least once. It helps in assuring that all the statements are executed without any side effect. Different coverage management tools are used to assess the percentage of the executable elements, which are currently been tested. (These tools are used for both statement as well as branch coverage.)

Loop Testing:

        A white box testing technique that exercises program loops.

        A typical spot for a semantic bug  in most programming languages are the loops.

Ø     Cause execution of the loop to be skipped completely. (Exception: Repeat loops).Loop to be executed exactly  once. Loop to be executed more than once

Path Testing:

Ø      Ensures that all independent paths through code module have been tested

        Path testing has been one of the first test methods, and even though it is a typical white box test , it is nowadays also used in black box tests. The procedure itself is similar to the walk-through. First, a certain path through the program is chosen. Possible inputs and the correct result are written down. Then the program is executed by hand, and its result is compared to the predefined. Possible faults have to be written down at once.


Branch Testing (Conditional Testing):

       Test method which aims to ensure that each possible branch from each decision point (e.g. "if" statement) is executed at least once, thus ensuring that all reachable code is executed.

        No software application can be written in a continuous mode of coding. At some point we need to branch out the  code in order to perform a particular functionality. Branch coverage testing helps in validating of all the branches in the code, and helps make sure that no branching leads to abnormal behavior of the application.

Security Testing:

         Security testing is carried out in order to find out how well the system can protect itself from unauthorized access, hacking (cracking, any code damage, etc.) which deals with the code of application. This type of testing needs sophisticated testing techniques.

Advantages of White Box Testing:

        As the knowledge of internal coding structure is prerequisite, it becomes very easy to find out which type of input/data can help in testing the application effectively.

        Yet another advantage of white box testing is that it helps in optimizing the code.

         It helps in removing the extra lines of code, which can introduce defects in the code.

        As the knowledge of internal coding structure is pre-requisite, it becomes very easy to find out which type of input/data can help in testing the application effectively.

         It helps in removing the extra lines of code, which can bring in hidden defects

        Reduction in the amount of debugging.

         Improvement in the quality of the released software.

Disadvantages of White Box Testing:

         As knowledge of code and internal structure is a prerequisite, a skilled tester is needed to carry out this type of testing, and this, in turn, increases the cost of the software.
Ø 
It is nearly impossible to look into every bit of code to find out hidden errors, which may create problems, resulting in failure of the application.


No comments: