Wednesday 2 September 2015

White Box Testing

White Box Testing:
White box testing is a program based testing to estimate the completeness and correctness of the internal logic of each program structure. It is also called as Structural testing / Glass box testing or clear bos testing. It is done by developers. For this type of testing, Tester should have programming knowledge.It forces developer to reason  carefully about implementation.It reveals errors in hidden code.It find outs the dead code or other issues with respect to the programming practices.

White Box testing Process:
The AUT (application under test) / SUT (system under test) implementation is analyzed and paths through the SUT are identified. There will be different paths for an AUT. It performs Path Sensitization. Expected outputs for the results are determined and compared. The Tests are executed. Actual outputs which are derived after the execution are compared with expected outputs which are determined earlier. They check whether the SUT functionality is proper and as expected or not.
White box Testing Techniques :
As per BS-7925-2 Standards White Box testing has different techniques to test the internal logic of a SUT/AUT.They are
  • Statement Coverage Testing
  • Branch/ Decision Coverage Testing
  • Data Flow Coverage Testing
  • Branch Condition Testing   
  • Branch Condition Decision Coverage
  • Modified Condition Decision Testing
  • Linear Code Sequence and Jump (LCSAJ)   

Statement Coverage:
In this white box testing technique we try to cover 100% statement coverage of the code, it means while testing the every possible statement in the code all the statements are executed at least once.The formula to calculate the Statement coverage is 

Statement Coverage = Number of statements executed /Total number of Statements 
Tools: To test the Statement Coverage the Cantata++ can be used as white box testing tool.
Decision Coverage:
In this white box testing technique try to cover 100% decision coverage of the code, it means while testing the every possible decision conditions like if-else, for loop and other conditional loops in the code is executed at least once.
Tools: To cover the Decision Coverage testing in the code the TCAT-PATH is used. This supports for the C, C++ and Java applications.

Condition Coverage:
In this white box testing technique try to cover 100% Condition coverage of the code, it means while testing the every possible conditions in the code is executed at least once.

Decision/Condition Coverage:
In this mixed type of white box testing technique developers try to cover 100% Decision/Condition coverage of the code, it means while testing the every possible Decisions/Conditions in the code is executed at least once.

Multiple Condition Coverage:
In this type of testing we use to cover each entry point of the system to be execute once..
In the actual development process developers are making use of the combination of techniques those are suitable for there software application.Using above mentions testing white box testing techniques the 80% to 90% code coverage is completed which might be sufficient with white box testing.

Advantages of White Box Testing –
  • To start the testing of the software no need to wait for the GUI, you can start the White Box Testing.
  • As we cover all possible paths of code so this is a thorough testing.
  • Tester can ask about implementation of each section, so it might be possible to remove unused lines of code which might be causing a bug.
  • By executing equivalence use to approximates the partitioning.
  • As the tester is aware of internal coding structure, then it is helpful to derive which type of input data is needed to testing software application effectively.
  • White box testing allows you to help in the code optimization.
Disadvantages of White Box Testing 
  • To test the software application a highly skilled resource is required to carry out testing who know the deep knowledge of internal structure of the code which increase the cost.
  • Update test script is required if changing the implementation too frequently.
  • If the application under test large is size then exhaustive testing is impossible.
  • It is not possible for testing each and every path/condition of software program, which might miss the defects in code.
  • White box testing very expensive type of testing.
  • To analyze each line by line or path by path is nearly impossible work which may introduce or miss the defects in the code.
To test each paths or conditions may require different input conditions, so to test full application t



ester need to create fill range of inputs which may be a time consuming
                                                     


3 comments:

  1. It is natural to make mistake while developing your application as a developer. Keep updating more knowledge on Software testing. Selenium is the best automation testing tool to test any application.
    Best software testing training institute in chennai | Software testing courses in chennai

    ReplyDelete

  2. I hope your Testing tools content has unique identity across the world. Each and every blog in your website is very informative users. I am eagerly waiting for the next content.
    QTP training Chennai | Loadrunner Course in Chennai

    ReplyDelete