Firstly we will learn what is Black
Box Testing? Here we will discuss about how black box testing is perform,
different BBT Techniques used in testing.
Black Box Testing Method:
Black box testing is the Software
testing method which is used to test the software without knowing the internal
structure of code or program.
Most likely this testing method is
what most of tester actual perform and used the majority in the practical life.
Basically software under test is
called as “Black-Box”, we are treating this as black box & without checking
internal structure of software we test the software. All testing is done as
customer’s point of view and tester is only aware of what is software is
suppose to do but how these requests are processing by software is not aware.
While testing tester is knows about the input and expected output’s of the
software and they do not aware of how the software or application actually
processing the input requests & giving the outputs. Tester only passes
valid as well as invalid inputs & determines the correct expected outputs.
All the test cases to test using such method are calculated based on
requirements & specifications document.
The main purpose of the Black Box is
to check whether the software is working as per expected in requirement
document & whether it is meeting the user expectations or not.
There are different types of testing
used in industry. Each testing type is having its own advantages &
disadvantages. So fewer bugs cannot be find using the black box testing or
white box testing.
Types of Black Box Testing
Techniques: Following black box testing
techniques are used for testing the software application.
- Boundary Value Analysis (BVA)
- Equivalence Class Partitioning
- Decision Table based testing
- Cause-Effect Graphing Technique
- Error Guessing
1) Boundary Value Analysis (BVA):
Boundary Value Analysis is the most
commonly used test case design method for black box testing. As all we
know the most of errors occurs at boundary of the input values. This is one of
the techniques used to find the error in the boundaries of input values rather
than the center of the input value range.
Boundary Value Analysis is the next
step of the Equivalence class in which all test cases are design at the
boundary of the Equivalence class.
Let us take an example to explain
this:
Suppose we have software application
which accepts the input value text box ranging from 1 to 1000, in this case we
have invalid and valid inputs:
Invalid Input
|
Valid Input
|
Invalid Input
|
0 – less
|
1 – 1000
|
1001 – above
|
Here are the Test cases for input
box accepting numbers using Boundary value analysis:
Min
value – 1
|
0
|
Min
Value
|
1
|
Min
value + 1
|
2
|
Normal
Value
|
1
– 1000
|
Max
value – 1
|
999
|
Max
value
|
1000
|
Max
value +1
|
1001
|
This is testing techniques is not
applicable only if input value range is not fixed i.e. the boundary of input is
not fixed.
2) Equivalence Class Partitioning
The equivalence class partition is
the black box test case design technique used for writing test cases. This
approach is use to reduce huge set of possible inputs to small but equally
effective inputs. This is done by dividing inputs into the classes and gets one
value from each class. Such method is used when exhaustive testing is most
wanted & to avoid the redundancy of inputs.
In the equivalence partitioning input are divided based on the input values:
In the equivalence partitioning input are divided based on the input values:
- If input value is Range, then we one valid equivalence
class & two invalid equivalence classes.
- If input value is specific set, then we one valid equivalence
class & one invalid equivalence classes.
- If input value is number, then we one valid equivalence
class & two invalid equivalence classes.
- If input value is Boolean, then we one valid
equivalence class & one invalid equivalence classes.
White Box Testing
Definition:
“Testing based on an analysis of the internal structure of the component or
system.”In this method of testing the testcases are calculated based on analysis internal structure of the system based on Code coverage, branches coverage, paths coverage, condition Coverage etc.
White box testing involves the testing by looking at the internal structure of the code & when you completely aware of the internal structure of the code then you can run your test cases & check whether the system meet requirements mentioned in the specification document. Based on derived test cases the user exercised the test cases by giving the input to the system & checking for expected outputs with actual output. In this is testing method user has to go beyond the user interface to find the correctness of the system.
Typically such method are used at Unit Testing of the code but this different as Unit testing done by the developer & White Box Testing done by the testers, this is learning the part of the code & finding out the weakness in the software program under test.
For tester to test the software application under test is like a white/transparent box where the inside of the box is clearly seen to the tester (as tester is aware/access of the internal structure of the code), so this method is called as White Box Testing.
The White-box testing is one of the best method to find out the errors in the software application in early stage of software development life cycle. In this process the deriving the test cases is most important part. The test case design strategy include such that all lines of the source code will be executed at least once or all available functions are executed to complete 100% code coverage of testing.
What do you verify in White Box Testing ?
- 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
- Verifyt 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.
In the White Box Testing verify the flow of the application. The pre designed test cases are executed with the help of input data & compare the output with the expected one & found mismatch if any means you found a bug.
White Box Testing Techniques
In the White box testing the Code Coverage analysis is main part.
Code Coverage analysis 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 ht gaps in the test case suite you can add the respective test case. So it helps to improve the quality of the software application.
In the market lots of white box testing tools are available to perform Code Coverage analysis. Here are some White Box Testing Techniques
Statement Coverage:
In this white box testing technique try to cover 100% statement coverage of the code, it means while testing the every possible statement in the code is executed at least once.
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 buy modafinil online us techniquie 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 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 make 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.
How do you perform White Box Testing?
Let take a simple website application. The end user is simply access the website, Login & Logout, this is very siple and day 2 days life example. As end users point of view user able to access the website from GUI but inside there are lots of things going on to check the internal things are going right or not, the white box testing method is used. To explain this we have to divide this part in two steps. This is all is being done when the tester is testing the application using White box testing techniques.
STEP 1) UNDERSTAND OF THE SOURCE CODEStep 2) CREATE TEST CASES AND EXECUTE
STEP 1) UNDERSTAND OF THE SOURCE CODE
The first & very important steps is to understand the source code of the application is being test. As tester should know about the internal structure of the code which helps to test the application. Better knowldge of Source code will helps to indentify & write the important test case which causes the security issues & also helps to cover the 100% test coverage. Before doing this the tester should know the programming languange what is being used in the developing the application. As security of application is primary objective of application so tester should aware of the security concerns of the project which help in testing. If the tester is aware of the security issues then he can prevents the security issues like attacks from hackers & users who are tring to inject the macious things in the application.
Step 2) CREATE TEST CASES AND EXECUTE
In the second step invovles the actual writing of test cases based on Statement/Decision/Condition/Branch coverage & actual execution of test cases to cover the 100% testing coverage of the software appliction. The Tester will write the test cases by diving the applications by Statement/Decision/Condition/Branch wise. Other than this tester can include the trial and error testing, manual testing and using the Software testing tools as we covered in the previous article.
Advantages and Disadvantages 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 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.
- 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.
#
|
Black
Box Testing
|
White
Box Testing
|
1
|
Black box testing is the Software
testing method which is used to test the software without knowing the
internal structure of code or program.
|
White box testing is the software
testing method in which internal structure is being known to tester who is
going to test the software.
|
2
|
This type of testing is carried
out by testers.
|
Generally, this type of testing is
carried out by software developers.
|
3
|
Implementation Knowledge is not
required to carry out Black Box Testing.
|
Implementation Knowledge is
required to carry out White Box Testing.
|
4
|
Programming Knowledge is not
required to carry out Black Box Testing.
|
Programming Knowledge is required
to carry out White Box Testing.
|
5
|
Testing is applicable on higher
levels of testing like System Testing, Acceptance testing.
|
Testing is applicable on lower
level of testing like Unit Testing, Integration testing.
|
6
|
Black box testing means
functional test or external testing.
|
White box testing means structural
test or interior testing.
|
7
|
In Black Box testing is primarily
concentrate on the functionality of the system under test.
|
In White Box testing is primarily
concentrate on the testing of program code of the system under test like code
structure, branches, conditions, loops etc.
|
8
|
The main aim of this testing to
check on what functionality is performing by the system under test.
|
The main aim of White Box testing
to check on how System is performing.
|
9
|
Black Box testing can be started
based on Requirement Specifications documents.
|
White Box testing can be started
based on Detail Design documents.
|
10
|
The Functional testing, Behavior
testing, Close box testing is carried out under Black Box testing, so there
is no required of the programming knowledge.
|
The Structural testing, Logic
testing, Path testing, Loop testing, Code coverage testing, Open box testing
is carried out under White Box testing, so there is compulsory to know about
programming knowledge.
|
No comments:
Post a Comment