WHITE BOX TESTING
The name symbolizes the ability to see through the software’s outer shell into its inner workings.
How do you perform WBT?
CODE COVERAGE ANALYSIS
1. Statement Coverage:
Every possible statement is tested in the code to be tested at least once during the testing process.
2. Branch Coverage:
Checks every possible path (If-else and while loops) of a software application.
3. 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.
4. Decision/Condition Coverage:
In this mixed type of white box testing technique 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.
5. Multiple Condition Coverage:
In this type of testing we use to cover each entry point of the system to be execute once.
Disadvantages of White Box Testing -
Functional Testing
Not related to a specific functionality, but non-functional requirements such as performance, scalability and usability.
Regression Testing
It is done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code.
HOW TO PERFORM BBT?
Generic steps to be followed to carry out any type of BBT
Graph Based Testing Methods:
Each and every application is build up of some objects. All such objects are identified and graph is prepared. From this object graph each object relationship is identified and test cases written accordingly to discover the errors.
Error Guessing:
This is purely based on previous experience and judgment of tester. Error Guessing is the art of guessing where errors can be hidden. For this technique there are no specific tools, writing the test cases that cover all the application paths.
Boundary Value Analysis:
Many systems have tendency to fail on boundary. So testing boundry values of application is important. Boundary Value Analysis (BVA) is a test Functional Testing technique where the extreme boundary values are chosen. Boundary values include maximum, minimum, just inside/outside boundaries, typical values, and error values.
Extends equivalence partitioning
Test both sides of each boundary
Look at output boundaries for test cases too
Test min, min-1, max, max+1, typical values
BVA techniques:
1. Number of variables
For n variables: BVA yields 4n + 1 test cases.
2. Kinds of ranges
Generalizing ranges depends on the nature or type of variables
Advantages of Boundary Value Analysis
1. Robustness Testing – Boundary Value Analysis plus values that go beyond the limits
2. Min – 1, Min, Min +1, Nom, Max -1, Max, Max +1
3. Forces attention to exception handling
Limitations of Boundary Value Analysis
Boundary value testing is efficient only for variables of fixed values i.e boundary.
Equivalence Partitioning:
Equivalence partitioning is a black box testing method that divides the input domain of a program into classes of data from which test cases can be derived.
How is this partitioning performed while testing:
1. If an input condition specifies a range, one valid and one two invalid classes are defined.
2. If an input condition requires a specific value, one valid and two invalid equivalence classes are defined.
3. If an input condition specifies a member of a set, one valid and one invalid equivalence class is defined.
4. If an input condition is Boolean, one valid and one invalid class is defined.
Comparison Testing:
Different independent versions of same software are used to compare to each other for testing in this method.
TOOLS USED FOR BBT?
Largely depends on the type of BBT
For functional or Regression – QTP
Non functional – Load Runner
The name symbolizes the ability to see through the software’s outer shell into its inner workings.
- It is the testing of a software solutions internal coding and infrastructure.
- It focuses primarily on strengthening security and the flow of inputs and outputs through the application and improving design and usability
- It is also known as Unit testing, Clear, Open, Structural and Glass box testing.
- The input is from the Design.
- Basically verify the security holes in the code.
- Verify the broken or incomplete paths in the code.
- Verify the flow of structure mention in the specification document
- Verify the Expected outputs
- Verify the all conditional loops in the code to check the complete functionality of the application.
- Verify the line by line or Section by Section in the code & cover the 100% testing.
How do you perform WBT?
- Understand of the source code
- Create test cases and execute
CODE COVERAGE ANALYSIS
- It identifies areas of a program that are not exercised by a set of test cases
- It helps to identifying the gaps in a test case suite.
- It allows you to find the area in the code to which is not executed by given set of test cases.
- Upon identifying the gaps in the test case suite you can add the respective test case.
1. Statement Coverage:
Every possible statement is tested in the code to be tested at least once during the testing process.
2. Branch Coverage:
Checks every possible path (If-else and while loops) of a software application.
3. 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.
4. Decision/Condition Coverage:
In this mixed type of white box testing technique 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.
5. 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 make use of the combination of techniques those are suitable for their 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.
- It is quite complex but the complexity involved has a lot to do with the application being tested.
- To start the testing of the software no need to wait for the GUI, you can start the White Box Testing.
- As covering 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 introduction of 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 tester need to create fill range of inputs which may be a time consuming.
- The functionality of the software under test is checked without looking at the internal code structure, implementation details or knowledge of internal paths of the software.
- Entirely based on the software requirements and specification.
- Focusing on the inputs and outputs without knowing their internal code implementation.
- It is also called as acceptance testing
- the input is from the requirement
Functional Testing
- Related to functional requirements of a system.
- Done by the testers.
Not related to a specific functionality, but non-functional requirements such as performance, scalability and usability.
Regression Testing
It is done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code.
HOW TO PERFORM BBT?
Generic steps to be followed to carry out any type of BBT
- Initially requirements and specification of the system are examined
- Tester chooses valid inputs and invalid inputs to verify that AUT or SUT is able to detect them
- Tester determines expected outputs for all those inputs
- Software tester creates test cases with the selected input
- The test cases are executed
- Software tester compares the actual output with the expected outputs
- Defects if any are fixed and retested
Graph Based Testing Methods:
Each and every application is build up of some objects. All such objects are identified and graph is prepared. From this object graph each object relationship is identified and test cases written accordingly to discover the errors.
Error Guessing:
This is purely based on previous experience and judgment of tester. Error Guessing is the art of guessing where errors can be hidden. For this technique there are no specific tools, writing the test cases that cover all the application paths.
Boundary Value Analysis:
Many systems have tendency to fail on boundary. So testing boundry values of application is important. Boundary Value Analysis (BVA) is a test Functional Testing technique where the extreme boundary values are chosen. Boundary values include maximum, minimum, just inside/outside boundaries, typical values, and error values.
Extends equivalence partitioning
Test both sides of each boundary
Look at output boundaries for test cases too
Test min, min-1, max, max+1, typical values
BVA techniques:
1. Number of variables
For n variables: BVA yields 4n + 1 test cases.
2. Kinds of ranges
Generalizing ranges depends on the nature or type of variables
Advantages of Boundary Value Analysis
1. Robustness Testing – Boundary Value Analysis plus values that go beyond the limits
2. Min – 1, Min, Min +1, Nom, Max -1, Max, Max +1
3. Forces attention to exception handling
Limitations of Boundary Value Analysis
Boundary value testing is efficient only for variables of fixed values i.e boundary.
Equivalence Partitioning:
Equivalence partitioning is a black box testing method that divides the input domain of a program into classes of data from which test cases can be derived.
How is this partitioning performed while testing:
1. If an input condition specifies a range, one valid and one two invalid classes are defined.
2. If an input condition requires a specific value, one valid and two invalid equivalence classes are defined.
3. If an input condition specifies a member of a set, one valid and one invalid equivalence class is defined.
4. If an input condition is Boolean, one valid and one invalid class is defined.
Comparison Testing:
Different independent versions of same software are used to compare to each other for testing in this method.
TOOLS USED FOR BBT?
Largely depends on the type of BBT
For functional or Regression – QTP
Non functional – Load Runner
BBT vs WBT
S.N. | Black Box Testing | White Box Testing |
1 | The Internal Workings of an application are not required to be known | Tester has full knowledge of the Internal workings of the application |
2 | Also known as closed box testing, data driven testing and functional testing | Also known as clear box testing, structural testing or code based testing |
3 | Performed by end users and also by testers and developers | Normally done by testers and developers |
4 | Testing is based on external expectations - Internal behavior of the application is unknown | Internal workings are fully known and the tester can design test data accordingly |
5 | This is the least time consuming and exhaustive | The most exhaustive and time consuming type of testing |
6 | Not suited to algorithm testing | Suited for algorithm testing |
7 | This can only be done by trial and error method | Data domains and Internal boundaries can be better tested |
easily understandable
ReplyDelete