White Box Testing Part 2

3. Loop Testing

Here developers will test the loop and make sure that loop is repeating for all the defined number of cycles and also developers make sure that terminating condition is working properly or not this is called loop testing.(For loop, while loop and do-while loop)


White Box Testing Part 2
Suppose if loop is written for 1 lakh time then doing loop testing manually is very tough job in this case developers will go for Automation.

4. Unit Testing

          Customer gives the requirement developer will write main program and corresponding test program in the same language and run the test program against the main program. Test program will automatically test the main program and give the result as pass or fail this is called unit testing.
   Collection of test program is called as unit test suite.


White Box Testing Part 2
 While doing unit testing we come across three different cases.

Case 1:- If error is in test program developer will fix the error in test program and run the test program against the corresponding main program.

Case 2:- If error is in main program developer will fix the error in main program and run the corresponding test program against the main program and chances are there fixing defect      might effect other main program so developer will run entire unit test suite.

Case 3:- Suppose if customer changes requirement for module 'A' developers will modify main program of module 'A' and corresponding test program of  module 'A' and run the test program of module 'A' against main program of module 'A'. Chances are there changing requirement in module 'A' might effect other modules so developer will run entire unit test suite.


White Box Testing Part 2

5. Testing code from memory point of view

  1. By changing the logic of the code developers improve the memory because writing logic varies for person to person.
  2. If there are duplicate codes or repetition of the same code then we can convert the code into generic function / user define function.
  3. By removing unwanted functions and unused commands form the code memory can be improved.
  4. By removing dead code we can improve the memory.
  5. By using built-in functions we can improve the memory. Eg: sort(), strlen() and strrev().
  6. By removing unused variables memory can be improved.

6.Testing the code from performance point of view

  1. By writing good logic performance can be improve (like remove unnecessary wait() statement).
  2. Instead of using nested if developers can go for switch cases.
  3. 'AND' and 'OR' operators should be properly used while writing conditional statement.
  4. If many lines of code is there then testing the code manually from the performance point of view is very tough so developer will use a tool called 'Rational Quantifier' to do performance testing on the code.

What are the difference in black box testing and white box testing ?

White Box Testing

  1. Code is visible.
  2. Developer will do white box testing.
  3. Developer will test logic of the code.
  4. Programming knowledge is required.
  5. White box is done before software isn(given to test engineer) developed.
  6. Knowledge on internal design of code is required.
  7. Developers will give the input to the source code and check the output according to the requirement.                               

Black Box Testing

  1. Code is not visible.
  2. Test Engineer will do black box testing.
  3. Test Engineer will test functionality of the software or application.
  4. Programming knowledge is not required.
  5. Black box is done after software is (given to test engineer) developed.
  6. Knowledge on internal design of code is not required.
  7. Test Engineer will give the input to the software and check the output according to the requirement.

Previous
Next Post »