Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

Black Box Testing and White Box Testing : : Everything You Need To Know

Posted on 02/19/2025 By admin

Hello Folks,

In this post, we will see below topics:

  1. What is White box testing?
  2. What is Black box testing?
  3. What are differences between White box and Black box testing?

There are many testing techniques which are broadly categorised into two: Static Testing and Dynamic Testing.

Dynamic testing is again subdivided into two major categories:

  1. White box testing  or Structure based testing
  2. Black box testing or Specification based testing

Black Box Testing:

Let’s start with real time example. You go to an electronic shop to purchase a Mobile. Before purchase, you will perform some basic and important checks as below:

  1. You will insert a sim to check if network comes.
  2. You are able to make a call and receive a call.
  3. You are able to hear voice properly.
  4. Phone should be charged when plug in to a charger.

Did you open mobile components e.g. Circuits, receivers etc and check whether all internal components are working fine? No. You are just concerned whether a mobile is working as expected without concerning about how it does.

So the testing done above is nothing but a black box testing technique.

As per ISTQB, In ‘black-box’ or input/output driven testing techniques, a software tester view the software as a black-box with inputs and outputs, but they have no knowledge of how the system or component is structured inside the box. In essence, the tester is concentrating on what the software does, not how it does it.

Lets; see an example in Software industry.

Suppose you have got an application which allows a patient to register by providing all details. As part of black box testing, you launch the application, provide all details and register a patient. On successful registration you get a confirmation message. You are done. You don’t bother how internally it is done or what logic is being used. You are more concerned about final output which should be as per requirements. If not, you raise a bug.

Black box testing includes both functional and non-functional testing.

There are four techniques inside black box testing which helps you in designing test cases:

  1. equivalence partitioning
  2. Boundary value analysis
  3. Decision tables
  4. State transition testing

White Box Testing:

Consider the same real time example given in Black box testing. Suppose you are in a mobile manufacturing company. To develop a well functioning mobile device, you need to check all internal components. You are more concerned about how making or receiving a call will work internally rather than just pressing button.  You test all receivers, chips design, layout etc. If something is not working, you can fix then and there before end user catches it by performing black box testing.

So in the same way, a white box tester or developer understands the internal working of software to test the functionality. They check logics whether it is written correctly and performing which is expected.  It is also called as Glass box testing as you need to see internal components of software to perform testing. It is performed to test code coverage, branch coverage, quality of code etc. It is performed to check conditional statements and decision statements like loops, if , if-else etc.

Difference between Black box and white box testing:

[table id=1 /]

If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.

#ThanksForReading
#HappyTesting

Uncategorized

Post navigation

Previous Post: Importance of Using ThreadLocal Variables in Parallel Execution Of Automation Scripts
Next Post: Handling Frames/IFrames In Selenium WebDriver : Part 3

Related Posts

April 24, 2019 – Make Selenium Easy Uncategorized
image – Make Selenium Easy Uncategorized
TestNG Tutorials 7: How To Create Customized TestNG XML? Uncategorized
August 20, 2017 – Make Selenium Easy Uncategorized
Amod Mahajan, Author at Make Selenium Easy – Page 49 of 49 Uncategorized
access token Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark