Open In App

Loop Software Testing

Loop Testing is a type of software testing type that is performed to validate the loops. It is one of the type of Control Structure Testing. Loop testing is a white box testing technique and is used to test loops in the program.

Objectives of Loop Testing:
The objective of Loop Testing is:



Types of Loop Testing:
Loop testing is classified on the basis of the types of the loops:

  1. Simple Loop Testing:
    Testing performed in a simple loop is known as Simple loop testing. Simple loop is basically a normal “for”, “while” or “do-while” in which a condition is given and loop runs and terminates according to true and false occurrence of the condition respectively. This type of testing is performed basically to test the condition of the loop whether the condition is sufficient to terminate loop after some point of time.

    Example:

    while(condition)
      {
       statement(s);
      } 



  2. Nested Loop Testing:
    Testing performed in a nested loop in known as Nested loop testing. Nested loop is basically one loop inside the another loop. In nested loop there can be finite number of loops inside a loop and there a nest is made. It may be either of any of three loops i.e., for, while or do-while.

    Example:

    while(condition 1)
      {
       while(condition 2)
        {
         statement(s);
        }
      } 



  3. Concatenated Loop Testing:
    Testing performed in a concatenated loop is known as Concatenated loop testing. It is performed on the concatenated loops. Concatenated loops are loops after the loop. It is a series of loops. Difference between nested and concatenated is that in nested loop is inside the loop but here loop is after the loop.

    Example:

    while(condition 1)
      {
       statement(s);
      }
     while(condition 2)
     {
      statement(s);
     } 



  4. Unstructured Loop Testing:
    Testing performed in an unstructured loop is known as Unstructured loop testing. Unstructured loop is the combination of nested and concatenated loops. It is basically a group of loops that are in no order.

    Example:

    while()
      {
       for()
        {}
       while()
        {}
      } 



Advantages of Loop Testing:
The advantages of Loop testing are:

Disadvantages of Loop Testing:
The disadvantages of Loop testing are:

Article Tags :