International Journal of Computer Sciences and Engineering Open Access
Review Paper Volume-5, Issue-12 E-ISSN: 2347-2693
A Comparative Study of Black Box Testing and White Box Testing
Akanksha Verma1*, Amita Khatana2, Sarika Chaudhary3
1*
Department of Computer Science, Amity University, Gurgaon, India
2
Department of Computer Science, Amity University, Gurgaon, India
3
Department of Computer Science, Amity University, Gurgaon, India
*
Corresponding Author:
[email protected], Tel.: 8437155454
Available online at: www.ijcseonline.org
Received: 12/Nov/2017, Revised: 23/Nov/2017, Accepted: 14/Dec/2017, Published: 31/Dec/2017
Abstract— The most important and time consuming part of software development life cycle is Software testing. Its main
purpose is to detect software faults and failures so that defects can be recovered and corrected in early phases of testing.
Software Testing is a process of confirming that the product software that has been manufactured by programmers is a good
quality product and also to assure that the product is working according to the specification that has been intended so that
customer satisfaction can also be possible. In this paper, we have described and compared the two most important and
commonly used software testing techniques for detecting errors, which are: Black Box Testing and White Box Testing.
Keywords— Software Testing, Black Box Testing, White Box Testing, Software Development Life Cycle (SDLC)
I. INTRODUCTION This testing method is based on software requirement and
specification. It is a software testing technique whereby the
As we all make mistakes so Software testing is necessary.
internal workings of the item being tested are not known by
Some of those mistakes are not affected the system, but some
the tester.
of them are expensive and can be dangerous. So we need to
check each and everything and anything we produce because
It is also called specification based testing and behaviour
the things cannot be always correct as we are humans who
testing. This technique is named so because in this testing,
can do mistakes usually. The main objective of testing is to
tester needs not to know about the internal code
detect the errors in the software so that it can be corrected
implementation of application. This testing handles both
and removed. For other software quality factors like
valid and invalid inputs according to the customer
reliability, compatibility integrity, security, capability,
requirement.
efficiency etc, software testing is used.
The main focus of this paper is to discuss
different methods of white box and black box testing
technique. This work shows the comparison between black
box and white box testing techniques. Tester can use this
information in testing of software. All this information helps
to develop a high quality product. These are the important
testing techniques discussed in this paper.
1. Black Box Testing
2. White Box Testing
II. BLACK BOX TESTING Fig 1: Representation of Black Box Testing
Black box testing is a technique of software testing. It is
used to determine the functionality of application. The main BLACK BOX TESTING TECHNIQUES
focus of black box testing is available input for an
application and expected outputs for each input values. 1. Equivalence partitioning: It is a technique for designing
the test case. In this technique it takes all input values and
divides into partitions. It contains both valid and invalid
© 2017, IJCSE All Rights Reserved 301
International Journal of Computer Sciences and Engineering Vol. 5(12), Dec 2017, E-ISSN: 2347-2693
partitions. Test cases are designed from each partition to Black Box testing is performed at following levels of
uncover the errors. software testing:
1. Integration Testing
2. Boundary Value Analysis: This technique is used to 2. System Testing
design the test cases to uncover the errors. In this technique it
3. Acceptance Testing
takes the boundary values or nearby boundary value of input
domain for test data. Test Cases are designed for both valid
and invalid boundary values. One Test Case is selected from III. WHITE BOX TESTING
each boundary values.
White Box Testing is a software testing technique. The main
3. Cause Effect Graphing: It is a software test design focus of white box testing is structure of an application. It
technique that concentrates on external behaviour of system. investigates about the internal logic, code structure, and
It specifies logical relationship between input and output control flow of application. This technique is also known as
conditions with the help of Boolean operators. Input values Clear Box Testing, Open Box Testing, Glass Box Testing,
represent ‘Cause’ and output values represents ‘Effect’. The Transparent Box Testing, Code-Based Testing or Structural
relation of Cause and Effect helps to create test cases. Testing.
In white box testing, tester must have full
4. Decision Table Based Testing: It is a good technique to knowledge about the programming language (source code). It
deal with large number of inputs and there respected outputs. is concern with internal working of application. It requires
Decision Table has completeness property; it contains all detailed information about application.
possible values of condition values. It is very useful for
complex business flow to convert into test cases. White Box testing is testing method
that applies on the source code of the software. This
5. Error Guessing: It is a technique for assumption and technique examines all path of source code. For this testing
guessing. Experienced testers find out the defects. The technique tester must have strong programming skills. White
complete success of this technique is depending on skill of Box Testing needs highly skilled resources and
testers, a good tester knows where and what kind of defects implementation knowledge.
are mostly found.
BLACK BOX TESTING ADVANTAGES
1. Testing is performs according to the customer’s point of
view requirements.
2. Testing is performed by third party to avoid the
developer-bias.
3. Tester can be non technical person. Programming and
implementation knowledge is not required for this Fig 2: Representation of White Box Testing
testing technique.
4. Testing is efficient when used on a larger system. WHITE BOX TESTING TECHNIQUES
Test cases can be designed as soon as the specifications
are complete 1. Control Flow testing: It is a structural testing technique.
It examines the control flow of program. It contains both
BLACK BOX TESTING DISADVANTAGES simpler and complicated paths. This testing is applied on all
software to test control flow. It is a fundamental technique. It
1. Redundant tests can be formed if software is applicable on small programs and subparts of large
designer/developer has already run the test cases. programs.
2. It is very difficult to design test cases if requirements are 2. Path Testing: In Path Testing it tests all the possible
not clear and concise. paths of program. It is a comprehensive technique. It insures
that all paths are traversed at least once. Path coverage
3. This testing is not efficient to test complex segments of
technique is better than Branch coverage. It is good for
code.
testing complex programs.
4. The results of this testing are often overestimated.
© 2017, IJCSE All Rights Reserved 302
International Journal of Computer Sciences and Engineering Vol. 5(12), Dec 2017, E-ISSN: 2347-2693
3. Data Flow Testing: Dataflow Testing focuses on the IV. CONCLUSION
points where variables receive values and where values are
used. It has some issues like: Testing plays a vital role in finding errors in software
systems. Testing is most important phase in a Software
1. A declared variable but never used within the program. Development Life Cycle as it helps the software engineers to
2. A variable which is never declared but used in program. test and enhanced the quality of software product. It starts at
3. A multiple declaration of variable before it is used. the earlier phases of Software Development Life Cycle so
that we can correct the errors and bugs at the time parallel. It
WHITE BOX TESTING ADVANTAGES will help in terms of software cost, quality and also
minimizes the effort. The knowledge of the testing technique
1. Testing is more thorough, with the possibility of
that gives its contribution to quality of software as it is
covering most paths.
important to the advancement of software testing research.
2. Testing can be started at an earlier stage. It is not
depends on GUI of application. This paper describes and compares the two most important
software testing techniques, to carry out the testing in a
3. White Box Testing allows you to help in the code proper and efficient manner. For the improvement of
optimization software quality, testing is the most important and
challenging activity. The main focus of testing techniques is
WHITE BOX TESTING DISADVANTAGES quality assurance, reliability of software, validation and
1. Tools are not available for every kind of verification.
implementation/platform.
Software Quality is main concern of software engineering.
2. If there is frequent change in implementation. It is hard Testing is widely used approach to ensuring software quality.
to maintain test scripts. Black Box Testing is concern about the functionality of the
software where White Box is concern about the internal
3. It is not possible for testing each and every structure of software. Both have own importance in testing of
path/condition of software program, which might miss software
the defects in code.
REFERENCES
White Box testing technique is applicable to the
following levels of software testing: [1]. Mohd. Ehmer Khan, “Different Forms of Software Testing
Techniques for Finding Errors,” IJCSI, Vol. 7, Issue 3, No 1, pp
1. Unit Testing 11-16, May2010
2. System Testing [2]. Mohd. Ehmer Khan, “Different Approaches to Black Box Testing
3. Integration Testing Technique for Finding Errors,” IJSEA, Vol. 2, No. 4, pp 31-40,
October 2011
[3]. Shivkumar Hasmukhrai Trivedi, “Software Testing Techniques”,
International Journal of Advanced Research in Computer Science
Black Box Testing White Box Testing and Software Engineering, Volume 2, Issue 10, October 2012,
ISSN: 2277 128X
It is also called It is also called Structural [4]. Anitha.A, “A Brief Overview of Software Testing Techniques and
Specification Based Testing Technique. Metrics”, International Journal of Advanced Research in Computer
Technique. and Communication Engineering,Vol. 2, Issue 12, December
2013, ISSN (Online) : 2278-102
Internal structure and Internal structure and [5]. Vineta Arnicane,” Complexity of Equivalence Class and Boundary
Value Testing Methods”, Scientific Papers, University of Latvia,
coding knowledge is not coding knowledge is 2009. Vol. 751 Computer Science and Information Technologies
required. required. 80–101
[6]. Ayman Madi, O. K. Z. a. S. K., 2013. “On the Improvement of
Main concentrate on Main concentrate on code Cyclomatic Complexity Metric.” International Journal of Software
functionality of system. structure ,branches , Engineering and Its Applications, 7(2).
loops, conditions etc. [7]. Harsh Bhasin, E. K., 2014.” Black Box Testing based on
Requirement Analysis and Design Specifications.” International
Implementation Implementation Journal of Computer Applications, 87(18), pp. 0975-8887.
knowledge is not knowledge is required. [8]. Khan, M. E., 2011. “Different Approaches to White Box Testing
Technique for Finding Errors”. International Journal of Software
required. Engineering and Its Applications, 5(3), p. 14.
Fig 3: Comparison of Black Box and White Box Testing [9]. Mohd. Ehmer Khan, F. K., 2012. “A Comparative Study of White
Box, Black Box and Grey Box Testing Techniques”. International
Journal of Advanced Computer Science and Applications, 3(6).
© 2017, IJCSE All Rights Reserved 303
International Journal of Computer Sciences and Engineering Vol. 5(12), Dec 2017, E-ISSN: 2347-2693
[10]. Trivedi, S. H., 2012. “Software Testing Techniques”. International
Journal of Advanced Research in Computer Science and
applications.
[11]. Ayman Madi, O. K. Z. a. S. K., 2013. “On the Improvement of
Cyclomatic Complexity Metric”. International Journal of Software
Engineering and Its Applications, 7(2).
[12]. Dondeti, S. N. a. J., 2012.” Black box and white box testing.
International Journal of Embedded Systems and Applications”, 2(2).
[13]. Harsh Bhasin, E. K., 2014. “Black Box Testing based on Requirement
Analysis and Design Specifications”. International Journal of
Computer Applications, 87(18), pp. 0975-8887.
[14]. Khan, M. E., 2011. “Different Approaches to White Box Testing
Technique for Finding Errors”. International Journal of Software
Engineering and Its Applications, 5(3), p. 14.
[15]. Mohd. Ehmer Khan, F. K., 2012. “A Comparative Study of White
Box, Black Box and Grey Box Testing Techniques”. International
Journal of Advanced Computer Science and Applications, 3(6).
[16]. Trivedi, S. H., 2012. “Software Testing Techniques. International
Journal of Advanced Research in Computer” Science and Software
Engineering, 2(10).
[17]. Yeresime Suresh, S. K. R., 2013. “A Genetic Algorithm based
Approach for Test Data Generationin Basis Path Testing.” The
International Journal of Soft Computing and Software Engineering,
3(3).
[18]. Abhijit A. Sawant, P. H. B. a. P. M. C., 2012. “Software Testing
Techniques and Strategies”. International Journal of Engineering
Research and Applications, 2(3), pp. 980-986.
[19]. S.Maheswari, Dr.K.Chitra “Classification Of Software Testing
And Their Techniques” International Conference on Current
Research in Engineering Science and Technology(ICCREST-
2016) E-ISSN :2348 – 8387
Authors Profile
Ms. Akanksha Verma pursued Bachelor of Technology in Computer
Science from Babu Banarsi Das National Institute of Technology
and Management, Lucknow. She is currently pursuing M.Tech in
Computer Science from Amity University Gurugram Haryana.
Ms. Amita Khatana pursued Bachelor of Technology in Computer
Science from Banasthali University, Newai Rajasthan. She is
currently pursuing M.Tech in Computer Science from Amity
University Gurugram Haryana.
Ms. Sarika Chaudhary pursued Bachelor of Technology in
Computer Science and Master of Technology in Computer Science.
She is currently pursuing Ph.D in Software Testing and working as
Assistant Professor in Department of Computer Science in Amity
University.
© 2017, IJCSE All Rights Reserved 304