0% found this document useful (0 votes)
61 views15 pages

Wlin35 ITMD536 ResearchPaper-V2

This document contrasts three common software testing techniques: white box, black box, and grey box testing. White box testing examines the internal logic and structure of source code. Black box testing focuses only on external functionality without considering internal workings. Grey box testing uses a partial understanding of internal structures along with external perspectives. The document defines each technique and compares their advantages and disadvantages for detecting software errors.

Uploaded by

wencheng lin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views15 pages

Wlin35 ITMD536 ResearchPaper-V2

This document contrasts three common software testing techniques: white box, black box, and grey box testing. White box testing examines the internal logic and structure of source code. Black box testing focuses only on external functionality without considering internal workings. Grey box testing uses a partial understanding of internal structures along with external perspectives. The document defines each technique and compares their advantages and disadvantages for detecting software errors.

Uploaded by

wencheng lin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

1

Contrasts Among WB, BB and GB Testing

Contrasts Among White Box, Black Box,


and Grey Box Testing

Lin Wencheng

ITMD 536: Software Testing and


Maintenance

2023.10.21

Prof. Hashimi G Nazneen


Contrasts Among WB, BB and GB Testing 2

Abstract

Software testing is a procedure used to identify mistakes in a program's requirements,

design, and coding. The objective is to confirm the software products' completeness,

accuracy, security, and overall quality according to the specification. This process allows

for the assessment of the quality of software in development, pinpointing and emphasizing

any faults, errors, and problems that exist within the software.

Software testing involves numerous methodologies, yet examining intricate products

effectively requires more than just devising and implementing a standard procedure. The

inherent issue with testing is the inability to identify every single error in a program. This

key challenge in testing prompts an ongoing question about the most suitable strategy for

conducting tests.The primary focus of our publication is to outline and compare the three

most commonly employed methods for detecting errors in software testing, specifically:

white box testing, black box testing, and grey box testing.

Keywords: Black Box, White Box, Grey Box.


Contrasts Among WB, BB and GB Testing 3

The distinctions among white box, black box, and grey box testing

The purpose of software testing is to detect any faults, issues or mistakes in the

application code that require correction. We can also define software testing as a process of

accessing the functionality and correctness of a software through analysis.The main purpose of

testing may encompass aspects such as quality assurance, assessing dependability, along with

validation and verification. As articulated by Mohd (2010), "Evaluating specification, design,

and coding in a thorough manner is a critical part of software testing, which is an essential

component of software quality assurance." (p11).Software testing primarily aims to confirm the

quality of a software system through meticulous, controlled tests, according to Azhar (2010).

Additionally, it seeks to verify the software's completeness and accuracy. It also serves to expose

any previously undetected errors.

The three most important techniques that are used for finding errors are (Mohd, 2010):

(1) The White Box Testing Technique involves a thorough analysis of the code's inner logic and

structure. For a tester to effectively conduct white box testing, an in-depth understanding of the

source code is essential.

(2) Black Box Testing Technique: It is a technique of testing without having any knowledge of

the internal working of the application. The examination focuses solely on the system's basic

aspects and bears minimal or no relation to its internal logical structure.

(3) The Grey Box Testing Methodology merges components from both the White Box and Black

Box strategies. This approach involves examining an application with some insights about its

internal workings, while also including a basic understanding of the overall system.
Contrasts Among WB, BB and GB Testing 4

White-Box Testing Technique

The test case design method that utilizes the procedural design's control structure to

derive test cases is known as white box testing. By examining the internal operations and

structure of software, white box testing can reveal implementation mistakes, like ineffective key

management (Mohd, 2011, Abstract).Within the software testing process, white box testing can

be applied at the integration, unit, and system levels. This testing method necessitates that the

tester carefully examines the source code to detect the precise code unit that is exhibiting

improper behavior.

Figure 1. Represent white box testing

·Risk analysis
·Develop Strategy
·Proper Test Plan
·Execute test Cases

Analyze
Input Internal Output
working only

Some of the advantages and disadvantages of white box testing technique are listed

below (Mohd, 2011, Introduction):

Advantages:

 By eliminating unnecessary code lines, it uncovers mistakes in concealed code.

 Side effects are beneficial.


Contrasts Among WB, BB and GB Testing 5

 During the process of writing test scenarios, maximum coverage is achieved

("Software Testing - Methods", n.d., para.6).

Disadvantages:

 The cost is significantly high because it necessitates the involvement of a skilled

tester to execute it ("Software Testing - Methods", n.d., para.6).

 Numerous paths will go unchecked due to the extreme difficulty of searching

every nook and cranny to uncover concealed mistakes.

 Some of the code omitted in the code could be missed out.

Enumerates various other nomenclatures for white box testing. These include glass box

testing, clear box testing, open box testing, transparent box testing, structural testing, logic

driven testing, and design-based testing (Mohd, 2011, p2).

Below are brief descriptions of some significant white box testing techniques:

Figure 2 illustrates the various methods of White Box Testing Technique.

Control Flow Testing

Branch Testing

White Box Testing Basis Path Testing

Data Flow Testing

Loop Testing

(1) Control Flow Testing is a method of structural testing that prefers numerous, simpler routes,

utilising the program control flow as a model. This strategy avoids fewer, more complex paths.

(2) Branch Testing: Branch testing has the objective to test every option (true or false) on every

control statement which also includes compound decision.


Contrasts Among WB, BB and GB Testing 6

(3) Basis Path Testing allows the person responsible for developing the test case to generate a

logical complexity measurement for procedural design. This measurement is then used as a

strategy for defining a core set of execution pathways.

(4) Data Flow Testing involves annotating the control flow graph with details about how the

variables of the program are defined and utilized.

(5) Loop Testing: Its primary concern is to validate the accuracy of the loop construct.

Black-Box Testing Technique

Executing black box testing means engaging with the software as if it were a "Black

Box," with no insight into its internal mechanisms. Rather, it strictly looks into the system's

basic elements (Mohd, 2011, Introduction). During such a test, a tester should be familiar with

the system's architecture but won't have any access to the source code.

Figure 3. Represent Black Box Testing

Process Unit

Analyze
Input Fundamental Output
Aspects only

Below are some of the pros and cons associated with the black box testing method:

Advantages:

 Efficient for large code segment.

 Tester perception is very simple.

 The viewpoints of users are distinctly differentiated from those of developers,

underscored by the independence between programmers and testers

("Software Testing - Methods", n.d., para.2).


Contrasts Among WB, BB and GB Testing 7

 Quicker test case development (Mohd, 2011, Pros).

Disadvantages

 The coverage remains limited due to the fact that only a select number of test

scenarios are actually executed ("Software Testing - Methods", n.d., para.2).

 Without clear specification test cases are difficult to design (Mohd, 2011).

 Inefficient testing.

Some of the synonyms of black box testing technique are opaque testing, functional

testing, close box testing, and behavioral testing (Mohd, 2011).

The following briefly describes some crucial black box testing methods:

Figure 4 illustrates the various methods of Black Box Testing Technique.

Equivalence Partitioning

Boundary Value Analysis

Fuzzing

Black Box Testing Cause-Effect Graph


(Mohd, 2011)
Orthogonal Array Testing

All Pair Testing

State Transition Testing

(1) Equivalence Partitioning: By segmenting the input data of a software unit into sections, from

which test cases can be generated, it can decrease the quantity of test cases.
Contrasts Among WB, BB and GB Testing 8

(2) Boundary Value Analysis primarily concentrates on testing at the limits, or at points where

the farthest limits are selected. This encompasses minimum and maximum values, values that

are just within or outside the limits, error values, and common numbers.

(3) Fuzzing: This method of fuzz testing is utilized to identify errors in implementation by

injecting distorted or partially distorted data in an automated or semi-automated session.

(4) The Cause-Effect Graph is a testing methodology where a graph is initially made to establish

the correlation between the outcome and its triggers. Four fundamental symbols, Identity,

Negation, Logic OR, and Logic AND, are used to articulate the dependency between the cause

and the effect.

(5) Orthogonal Array Testing, or OAT, can be utilized for issues where the domain of the input is

quite compact but still too extensive to allow for comprehensive testing.

(6) Complete Pair Testing: The complete pair testing method involves crafting test cases to run

through every unique combination of each pair of input parameters. This is primarily aimed at

ensuring comprehensive coverage set of test cases that covers all the pairs.

(7) State Transition Testing is a testing method beneficial for examining state machines as well

as navigating graphical user interfaces.


Contrasts Among WB, BB and GB Testing 9

Grey-Box Testing Technique

The grey box testing method, a blend of both white box and black box testing

strategies, allows us to enhance our testing range and focus on all tiers of any complex system.

Figure 5. Represent Grey Box Testing

The black box testing technique can also be referred to by various terms such as opaque
Process Unit

Partially analyze
Input internal working Output

Fundamental aspects
testing, functional testing, close box testing, and behavioral testing.

In grey box testing the tester must have knowledge of internal data structures and

algorithm, for the purpose of designing test cases. Examples of grey box testing technique are

(“Gray-box testing”, 2023):

 Architectural Model

 Unified Modeling language (UML)

 State Model (Finite State Machine)

Grey box testing involves scrutinizing the codes of two modules using the white box

testing method to design test cases, while actual tests are conducted on the exposed interfaces

through the black box testing method.

The grey box testing technique offers several advantages, as outlined below ("Software

Testing - Methods", n.d., para.8):

 The testing technique known as grey box testing offers the combined advantages of both

white box and black box testing methods.


Contrasts Among WB, BB and GB Testing 10

 In grey box testing, the tester relies on interface definition and functional specification

rather than source code.

 During grey box testing, the tester has the capability to create outstanding test scenarios.

 The examination is conducted considering the perspective of the user rather than that of the

designer.

 Create an intelligent test authoring.

 Unbiased testing. (“Gray-box testing”, 2023, Effects)

The following outlines a few drawbacks associated with the grey box testing method:

 The limited test coverage is due to the unavailability of access to the source code.

 It is difficult to associate defect identification in distributed applications.

 Many program paths remain untested.

 If the software designer has already run a test case, the tests can be redundant.

Figure 6 depicts various methods of the Grey Box Testing Technique.

Orthogonal Array Testing

Matrix Testing
Grey Box Testing
Regression Testing

Pattern Testing

The other name of grey box testing is translucent testing. Different forms of grey box

testing techniques are briefly described below(“Gray-box testing”, 2023, Techniques):

(1) Orthogonal Array Testing utilizes a subset of all potential combinations for its testing

method.

(2) In matrix testing, the project's status report is articulated.


Contrasts Among WB, BB and GB Testing 11

(3) In regression testing, if modifications are made to software, it suggests that test cases need to

be executed.

(4) The procedure of Pattern Testing verifies the efficiency of the application by assessing its

architecture and design.


Contrasts Among WB, BB and GB Testing 12

The Future of Software Testing

With the changing trends in the software industry, software testing too changes. The

existing new technologies like Service Oriented Architecture (SOA), wireless technologies,

mobile services etc. has opened new path to testing. Some of the changes which we will see in

the industry over the next few years are listed below:

 Testers will provide light weight models that developers can run against their codes. (Harry,

2003, para 7)

 Early review and modeling will expose many ambiguous bugs.

 As in the future developer’s code is full of testability hooks, errors will be more detectable.

(Harry, 2003, para 9)

 Static analyzer (detection tools) will come in main stream.

 Useful matrices such as spec coverage, model coverage and code coverage drive the

projects. (Harry, 2003, para 9)

 Combinatorial tools will enable testers to prioritize their testing tasks.

 The testers will provide visible and value-added services throughout the software

development process.

 Tester can develop test harnesses stubs and drivers written in and interacting with a variety

of programmatic languages.

 Tomorrows’ tester will be professionally more educated, examine and accredited

professional.
Contrasts Among WB, BB and GB Testing 13

Table 1. Comparative Analysis of Three Testing Methodologies

No. Black Box Testing Grey Box Testing White Box Testing

Analyses fundamental aspects only i.e. Partial knowledge Full knowledge of


1
no proved edge of internal working of internal working internal working

Granularity is
2 Granularity is low Granularity is high
medium
Performed by end
Performed by end users and also by users and also by
It is performed by
3 tester and developers (user acceptance tester and
developers and testers
testing) developers (user
acceptance testing)
Testing is based on
Testing is based on external exceptions external exceptions
Internal are fully
4 – internal behavior of the program is – internal behavior
known
ignored of the program is
ignored
Potentially most
It is least exhaustive and time It is somewhere in
5 exhaustive and time
consuming between
consuming
Data domains and
Test better: data
It can test only by trial and error internal boundaries
6 domains and internal
method can be tested and
boundaries
over flow, if known
It is suited for
Not suited for
7 Not suited for algorithm testing algorithm testing
algorithm testing
(suited for all)
In the near future we will see a shift towards new techniques and testing transformed

business operations, the way people interact with the systems and information it provides, and

therefore mitigating the risk and increasing the benefits of business change.

Conclusion
Contrasts Among WB, BB and GB Testing 14

Our paper provides an in-depth comparison and analysis of the three main methods of

software testing, a procedure designed to evaluate a software program's specific attributes or

functions for alignment with requisite specifications. Through this procedure, businesses gain an

objective insight into the software, enabling them to understand and assess the risks associated

with its implementation, thereby improving the overall efficiency of the testing process.
Contrasts Among WB, BB and GB Testing 15

References

Ehmer Khan, Mohd. (2010). Different Forms of Software Testing Techniques for Finding Errors.

IJCSI, 7(3), 11.

Azhar. (n.d.). SOFTWARE TESTING METHODOLOGIES. http://azhar-

paperpresentation.blogspot.com/2010/04/software-testing-methodologies.html

Ehmer Khan, Mohd. (2011). Different Approaches to White Box Testing Technique for Finding

Errors. International Journal of Software Engineering and Its Applications, 3(5), 12–13.

Software testing - methods. (n.d.).

https://www.tutorialspoint.com/software_testing/software_testing_methods.htm

Ehmer Khan, Mohd. (2011b). Different Approaches to Black Box Testing Technique for Finding

Errors. International Journal of Software Engineering & Applications, 2(4).

Wikipedia contributors. (2023, March 17). Gray-box testing. Wikipedia.

https://en.wikipedia.org/wiki/Gray-box_testing

You might also like