Software Testing Tutorial #18 - What is Black Box Testing

Software Testing Mentor
16 Nov 202006:53

Summary

TLDRThis tutorial explains the concept of black box testing in software testing. It highlights that in black box testing, the tester verifies the output based on the provided input without knowing the internal workings of the system. Using a practical example of testing the Gmail account creation feature, the video emphasizes how testers focus on the input and expected output while disregarding the internal code or implementation. The tutorial provides a step-by-step explanation of how this testing method works, making it easier for viewers to understand black box testing.

Takeaways

  • πŸ” Black box testing involves verifying software functionality without knowing the internal workings.
  • πŸ’‘ In black box testing, testers provide inputs and verify the outputs without worrying about the underlying code.
  • πŸ“¦ The term 'black box' comes from engineering, where the internal process is unknown, and only input and output are observed.
  • πŸ“‘ Functional testing is a type of black box testing where the tester focuses on functionality rather than implementation details.
  • 🌐 Example: Testing Gmail's 'create account' feature involves providing inputs like URL, entering details, and verifying the result without knowing the internal code.
  • πŸšͺ When testing, steps like opening Gmail in a browser and clicking 'create account' are seen as black box processes since the tester does not need to know how the backend works.
  • πŸ‘€ As an end user, the tester is only concerned with the interface and ensuring the expected output is achieved after performing specific actions.
  • πŸ”— Each action performed, such as entering data or clicking buttons, serves as an input in black box testing, and the corresponding expected result is the output.
  • πŸ§‘β€πŸ’» Black box testing contrasts with white box testing, where internal implementation details are crucial.
  • πŸ“š The tester in black box testing focuses solely on functionality, not the underlying code, structure, or method calls.

Q & A

  • What is black box testing?

    -Black box testing is a software testing method where the tester evaluates the output based on the input, without any knowledge of the internal workings or code of the software. The focus is solely on verifying the functionality from an external perspective.

  • What does the term 'black box' mean in computing or engineering?

    -In computing or engineering, 'black box' refers to a system where the internal processes are not visible or known. The focus is on the inputs and outputs, without understanding or interacting with how the system functions internally.

  • How does black box testing relate to functional testing?

    -Black box testing is a part of functional testing, where testers verify that the software behaves as expected based on the provided inputs. The internal code and logic are irrelevant to the tester in this method.

  • What is an example of black box testing in the context of the Gmail account creation process?

    -An example is testing the Gmail account creation process. The tester inputs 'gmail.com' in the browser, clicks 'Create Account,' and then verifies that the appropriate page loads (asking for first name, last name, email, password, etc.). The tester is not concerned with the internal code or how Gmail processes these actions.

  • Why is the internal working of the software not a concern in black box testing?

    -In black box testing, the goal is to verify the system's behavior based on input and output, rather than understanding or evaluating the internal code. The focus is solely on whether the software meets the expected functional requirements.

  • What does the tester do if the output is as expected in black box testing?

    -If the output is as expected, the tester concludes that the test has passed. This means the software is functioning as required for the given set of inputs.

  • What are the key steps a tester follows in black box testing?

    -The tester follows a series of steps like launching the application, providing inputs, and verifying the output against the expected results, without any regard for the internal logic or implementation of the system.

  • What would a black box tester verify when clicking on the 'Create Account' button in Gmail?

    -A black box tester would verify that clicking the 'Create Account' button successfully navigates the user to a page that asks for details like first name, last name, email, and password. The tester is not concerned with how this process happens internally.

  • What is the relationship between test cases and black box testing?

    -In black box testing, each test case consists of specific inputs and expected outputs. The tester executes the test case by providing inputs and checking if the output matches the expected results, without worrying about the internal structure or coding of the software.

  • How does black box testing differ from white box testing?

    -Black box testing focuses on the external functionality of the software without considering the internal code, while white box testing involves testing the internal logic and structure of the code. In black box testing, the tester doesn't need to know how the software is implemented.

Outlines

00:00

πŸ“¦ Introduction to Black Box Testing

In this paragraph, the concept of black box testing is introduced, explaining its origins in engineering and computing. The term refers to testing a system where the internal workings are unknown to the tester, and only the inputs and outputs are evaluated. The key takeaway is that the tester verifies the output without needing to understand the implementation details of the system.

05:03

πŸ› οΈ Black Box Testing in Software Development

This section correlates black box testing with software testing, explaining how testers provide input, verify the output, and determine if the test passes without knowing the internal mechanisms. The example used is a functional test case for Gmail's 'Create Account' feature. The tester inputs a URL and verifies if the Gmail page loads correctly without understanding the underlying processes.

πŸ” Functional Testing Example: Gmail Create Account

Here, the author walks through an example of black box testing for the 'Create Account' feature in Gmail. The tester provides inputs such as first name, last name, and email, and checks if the correct output (a successfully created account) is displayed. The key point is that the tester does not need to know the internal coding, just that the expected result is achieved after the inputs are provided.

βš™οΈ Black Box Testing Steps Explained

This paragraph further illustrates black box testing by describing how testers provide user details, click buttons like 'Sign Up', and verify if the user is redirected to the correct page. Each test step is considered an input, while the observed outcome is the output. The lack of concern about the internal workings of the software is emphasized, as black box testers focus only on the user-facing results.

🎯 Conclusion and Next Steps

The conclusion reiterates the essence of black box testing, highlighting that testers do not need to understand the code, methods, or structure of the software. The focus is solely on inputs and outputs. The author also hints at covering white box testing in the next tutorial, which will delve into understanding the internal workings of the software.

Mindmap

Keywords

πŸ’‘Black Box Testing

Black Box Testing refers to a method of software testing where the tester does not have any knowledge of the internal workings or implementation of the system being tested. The tester provides inputs and verifies the outputs without needing to understand the underlying code or logic. In the video, the speaker explains that this approach is analogous to using a 'black box' in engineering, where only the inputs and outputs are considered.

πŸ’‘Input

Input in the context of black box testing refers to the data or actions a tester provides to the system in order to evaluate its performance. This could be URLs, form data, or commands. In the video, the speaker gives examples such as entering 'gmail.com' in a browser or providing user details in a registration form, both of which are inputs used to test software functionality.

πŸ’‘Output

Output is the result produced by the software after processing the given inputs in black box testing. The tester evaluates whether this result matches the expected outcome. In the video, the output is described as the successful launch of 'gmail.com' or the display of a 'Create Account' page after clicking a link, with the expected result confirming whether the test has passed.

πŸ’‘Functional Testing

Functional Testing is a type of black box testing that focuses on verifying that the software performs its intended functions correctly based on given inputs. It tests the software’s functionality against the requirements without regard to the internal code structure. The speaker relates functional testing to testing features like Gmail’s 'Create Account' functionality by ensuring all steps in the process work as expected.

πŸ’‘Test Case

A Test Case is a set of conditions or actions used by testers to determine whether a software system behaves as expected. It includes inputs, execution steps, and expected outputs. In the video, the speaker outlines a test case for Gmail’s 'Create Account' feature, where launching the Gmail page and clicking on the 'Create Account' link are part of the test steps.

πŸ’‘Create Account Feature

The 'Create Account' feature is used as an example in the video to demonstrate how black box testing is applied in a real-world scenario. It refers to the functionality in Gmail where users can create new accounts by filling out their details. This example is used to explain how testers input user information and expect the system to respond with the next step, such as directing the user to a registration page, without knowing the internal code.

πŸ’‘Internal Code

Internal Code refers to the underlying programming and logic that drives the software's functionality. In black box testing, the tester is not concerned with or knowledgeable about this code. As explained in the video, when testing features like 'Create Account' in Gmail, the tester does not need to know how the internal methods, classes, or functions work, but only verifies the outputs from inputs.

πŸ’‘Browser

A Browser is a software application used to access the web, such as Chrome or Firefox. In the video, the browser is a tool through which the test is conducted. For instance, the speaker mentions launching 'gmail.com' in a browser as an input step to test the 'Create Account' functionality, illustrating how external tools are used in black box testing.

πŸ’‘Expected Result

Expected Result refers to the outcome that a tester anticipates after providing an input in a test case. If the actual result matches the expected result, the test is considered successful. The speaker uses the example of clicking on the 'Create Account' link and expecting the Gmail registration page to appear as the expected result in this test scenario.

πŸ’‘Verification

Verification is the process of checking whether the software output matches the expected result based on the input given. It is a key part of black box testing, as testers are responsible for confirming that the software behaves as intended. In the video, verification happens after each step in the Gmail 'Create Account' test, such as confirming the Gmail page has loaded correctly after entering the URL.

Highlights

Introduction to black box testing and its significance in computing and engineering.

Black box testing involves verifying outputs based on input without knowledge of the internal workings.

The process of black box testing in software testing mimics the general concept used in engineering.

Testers provide input and verify output without concern for the implementation details of the software.

Functional testing is a type of black box testing used to verify software features.

Example of Gmail's create account feature is used to demonstrate black box testing.

Test case step one: Launch Gmail in a browser and verify if the page loads correctly.

Testers are unaware of how the Gmail page loads after providing the URL; this is the 'black box.'

Black box testing involves verifying the output of 'create account' without knowing the underlying code.

Second step: Clicking on the 'create account' link and verifying the appearance of the account creation page.

Internal workings of the code when clicking 'create account' are unknown to the tester in black box testing.

Output verification includes ensuring fields like first name, last name, email, and password appear on the page.

In the third step, input includes user details like name and email, while the output is account creation.

Manual testers focus on results and outputs, not the methods or internal processes behind them.

Summary: Black box testing focuses on functionality and expected outputs without internal code knowledge.

Transcripts

play00:00

hello everyone welcome again in the

play00:02

software testing tutorial

play00:03

we are going to learn what is black box

play00:06

testing

play00:07

now as the name suggests the black box

play00:10

so usually in computing or engineering

play00:12

the black box term

play00:14

came from you know when you don't have

play00:17

any

play00:18

knowledge of internal workings of

play00:20

anything

play00:22

and you are just verifying the output

play00:25

based on the input

play00:26

that's what a black box usually in

play00:28

engineering or computing means

play00:30

now when we correlate that with the

play00:32

testing it's basically the same thing

play00:35

in terms of software testing so usually

play00:38

what happens if i

play00:39

if i draw the diagram so usually in the

play00:41

black box what happens is you provide

play00:44

the input you don't know what exactly

play00:46

this is a black box for you

play00:49

okay so as an end user if i'm a tester

play00:52

or person testing that's that particular

play00:54

you know software

play00:56

i'll just provide the input

play00:59

and then i'll verify the output

play01:03

okay and if output is what is expected

play01:07

then i'll say the test has passed right

play01:09

so usually

play01:10

this is what the you know

play01:13

key thing to remember about the black

play01:15

box is that you don't know what

play01:17

exactly is the implementation within

play01:20

this particular box

play01:22

as a tester you're just verifying

play01:25

the output based on different set of

play01:28

inputs that you will provide

play01:29

all right and this type of testing is

play01:32

known as black box testing and

play01:33

functional testing is

play01:34

one of it right so in functional testing

play01:37

you you have

play01:38

you know usually it is the black box for

play01:41

the software tester so let me take

play01:44

same example that we took in the

play01:46

previous tutorial so functional test

play01:49

of this gmail create account feature

play01:52

right so in the create account feature

play01:54

what we did

play01:55

uh if you are testing the create account

play01:57

usually you will follow certain steps

play01:59

which will be a test case

play02:00

so here there are a couple of tests that

play02:02

i have written so i'll launch

play02:04

the application if i'm testing that

play02:05

particular application i'll launch that

play02:07

application

play02:09

you know in some browser right so in

play02:11

browser

play02:14

and browser could be you know like

play02:15

chrome firefox so that will be specific

play02:17

in the test cases when you'll detail

play02:19

this out in your test case right this is

play02:21

just to explain you

play02:22

the steps so that is why i have not

play02:24

written written all the details in this

play02:26

particular

play02:27

scenario so first step will be to launch

play02:30

gmail.com in the browser if the launch

play02:33

is being successful then

play02:37

i will say output is passed right so

play02:40

in here input the step one input is

play02:43

basically

play02:44

launching gmail in the browser this is

play02:45

my input right so these are the

play02:48

actions that i'll do now when i

play02:51

open the browser okay and i type in

play02:55

gmail.com

play02:59

and after typing gmail.com i hit enter

play03:02

right or hit go then it opens the

play03:06

gmail.com

play03:07

as a software tester or person launching

play03:10

this application

play03:11

i don't know what all happens behind the

play03:14

scene

play03:15

before i see gmail.com page on my

play03:19

browser

play03:20

right so that is a black box for me all

play03:23

the functionality that has happened

play03:25

after i provided gmail.com in the

play03:28

url or and then hit enter

play03:33

then after that i don't know what has

play03:35

happened what application

play03:37

implementation is there what software

play03:38

has been written to basically

play03:41

you know fetch the data and show the

play03:44

gmail.com page to me right so that is

play03:46

black box for me and that is why

play03:48

this is the black box testing or how the

play03:51

black box testing

play03:52

will work second input for me

play03:56

in the same test case is the black box

play03:57

testing so create click on create

play03:59

account so once i click on

play04:01

create account link say for example

play04:04

then i'm not sure what implementation

play04:07

has been done

play04:08

once a user clicks on create account

play04:10

right so i don't know what

play04:11

coding is there within this particular

play04:14

box as an end user i don't have any idea

play04:17

about it

play04:17

yet and i'm not concerned about the

play04:20

internal coding how the methods are

play04:22

written

play04:23

how the classes are written how the

play04:25

internal code is being called when i

play04:27

click on create account

play04:29

what all happens inside i'm just worried

play04:31

about or i'm just concerned about

play04:33

when i click on create account you know

play04:36

link

play04:36

i should be displayed or basically i'll

play04:40

click

play04:40

on i'll draw here so output should be

play04:44

uh you know create

play04:48

account page right which will have uh

play04:51

provide your first name last name

play04:53

so i'll say first name last name

play04:56

i'll provide which email so i have to

play04:58

search the email

play04:59

and then provide the password and

play05:03

then click on register alright so

play05:06

i need to verify these details but

play05:09

internally when i click on

play05:11

create account how everything work or

play05:13

how the code has run

play05:15

internally as a manual tester as a

play05:19

you know black box tester or black box

play05:21

testing i'm not concerned about any of

play05:23

those internal working details right so

play05:25

this is how

play05:26

the black box testing will happen and

play05:29

what

play05:30

or what black box testing is so each

play05:33

step in your test case

play05:35

j is is basically the input and whatever

play05:38

expected result of your test case is

play05:42

is the output in terms of black box

play05:44

testing

play05:45

in the third case i'll provide the you

play05:47

input user details

play05:48

right and then click on sign up button

play05:50

so

play05:51

once user details have been provided

play05:53

here that becomes the input

play05:55

and a user clicks on you know sign up or

play05:58

register button

play05:59

and then he should be redirected to the

play06:02

this is the black box in this case

play06:04

and he should be directed to the actual

play06:06

gmail account right

play06:08

so any step that we perform without the

play06:12

knowledge of the internal working of the

play06:13

software

play06:14

uh is known as black box testing

play06:18

right so this is what

play06:21

black box testing is and i have covered

play06:23

how

play06:24

a particular test case can be easily

play06:26

correlated or what exactly you do

play06:28

in the black box testing you do not

play06:30

worry about the internal code internal

play06:32

structure what classes are there how the

play06:34

calls

play06:35

how the method and calls are being made

play06:37

that is not

play06:39

your concern in black box testing

play06:42

right so that's all for this tutorial

play06:44

about black box testing

play06:45

i'll cover the details about the white

play06:48

box testing

play06:49

in upcoming tutorial thank you very much

play06:51

for watching

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Black BoxSoftware TestingFunctional TestingTesting TutorialGmail TestInput-OutputManual TestingTest CaseQA BasicsWhite Box