You are on page 1of 9

Comprehensive

Black Box
Testing
Black Box Testing Techniques
including the scenario-based question

WWW.SQACircle.com
BLACK BOX TESTING

Black box testing Techniques


𝙏𝙚𝙨𝙩 𝙏𝙚𝙘𝙝𝙣𝙞𝙦𝙪𝙚𝙨 𝙊𝙫𝙚𝙧𝙫𝙞𝙚𝙬

𝗧𝗲𝘀𝘁 𝘁𝗲𝗰𝗵𝗻𝗶𝗾𝘂𝗲𝘀 support the tester in test analysis (what to test) and in test design (how
to test).
As per the ISTQB Certified Tester - Foundation Level Syllabus v4.0, 𝗧𝗲𝘀𝘁 𝘁𝗲𝗰𝗵𝗻𝗶𝗾𝘂𝗲𝘀
are classified as:

●𝘽𝙡𝙖𝙘𝙠-𝙗𝙤𝙭, (also known as specification-based techniques) are based on an analysis of


the specified behavior of the test object without reference to its internal structure.

●𝙒𝙝𝙞𝙩𝙚-𝙗𝙤𝙭, (also known as structure-based techniques) are based on analyzing the test
object’s internal structure and processing.

●𝙀𝙭𝙥𝙚𝙧𝙞𝙚𝙣𝙘𝙚-𝙗𝙖𝙨𝙚𝙙, effectively use the tester's knowledge and experience to design


and implement test cases. The effectiveness of these techniques depends heavily on the
tester’s skills.

Detail Overview:
What is Software Testing Technique?
Software testing technique helps you to design better test cases.

“Exhaustive testing is not possible Principle Lies Here”.

Manual testing techniques helps reduce the number of test cases to be executed while
increasing test coverage. They help identify test conditions that are otherwise difficult to
recognize.

There are different types of Black Box Testing Techniques:


• Equivalence Class Partitioning
• Boundary Value Analysis
• State Transition
• Decision Table making

W W W . S Q A C I R L C E . C O M
BLACK BOX TESTING

Equivalence Class Partitioning: Equivalence class partitioning is a technique used in


software testing to divide the possible inputs into a set of equivalence classes, or
partitions, with the goal of finding and testing a representative set of inputs from each
class.

● Example of Equivalence Class Partitioning and Boundary Value Analysis:

Here is the test condition:


Let’s consider the behavior of Order Pizza Text Box Below:

• Any Number greater than 10 entered in the Order Pizza field(let say 11) is
considered invalid.
• Any Number less than 1 that is 0 or below, then it is considered invalid.
• Numbers 1 to 10 are considered valid
• Any 3 Digit Number say -100 is invalid.

The divided sets are called Equivalence Partitions or Equivalence Classes. Then we pick
only one value from each partition for testing. The hypothesis behind this technique is
that

if one condition/value in a partition passes all others will also pass.

Likewise,

if one condition in a partition fails, all other conditions in that partition will fail.

W W W . S Q A C I R L C E . C O M
BLACK BOX TESTING

Boundary Value Analysis: Boundary value analysis is the process of testing between
extreme ends or boundaries between partitions of the input values.

The basic idea in normal boundary value testing is to select input variable values at their:

• Minimum
• Just above the minimum
• A nominal value
• Just below the maximum
• Maximum

In Boundary Value Analysis, you test boundaries between equivalence partitions.

In our earlier equivalence partitioning example, instead of checking one value for each
partition, you will check the values at the partitions like 0, 1, 10, 11 and so on. As you
may observe, you test values at both valid and invalid boundaries. Boundary Value
Analysis is also called range checking.

For more Details of Boundary value analysis and Equivalence Partitioning:

https://theqalead.com/topics/black-box-testing-techniques/

State Transition Testing Technique: In State Transition technique changes in input


conditions change the state of the Application Under Test (AUT). This testing technique
allows the tester to test the behavior of an AUT. The tester can perform this action by
entering various input conditions in a sequence. In State transition technique, the testing

W W W . S Q A C I R L C E . C O M
BLACK BOX TESTING

team provides positive as well as negative input test values for evaluating the system
behavior.

State Transition Testing Technique is helpful where you need to test different system
transitions.

Four Parts Of State Transition:


1) States that the software might get.
2) Transition from one state to another.
3) Events that origin a transition like closing a file or withdrawing money.
4) Actions that result from a transition (an error message or being given the cash).

For better Understanding watch video :


https://www.youtube.com/watch?v=ZWGiBbZdO1Q&t=42s

For More Explanation Read: https://www.toolsqa.com/software-testing/istqb/state-


transition-testing-diagram-example-and-technique

Decision Table Testing: A Decision Table is a very effective tool used for both complex
software testing and requirements management. A decision table helps to check all
possible combinations of conditions for testing and testers can also identify missed
conditions easily. The conditions are indicated as True(T) and False(F) values.

Why Decision Table Testing? We know that Black box testing involves validating the
system without knowing its internal design. Boundary Value Analysis and Equivalence
Partitioning can only handle one input condition at a time.

So what do we do if we need to test complex business logic where multiple input


conditions and actions are involved? Consequently, we will discuss another black box
testing technique known as Decision Table Testing. Because this testing can handle such
cases.

Cause-Effect table: Decision table testing is a software testing technique used to test
system behavior for different input combinations. This is a systematic approach where the
different input combinations and their corresponding system behavior (Output) are
captured in a tabular form. That is why it is also called as a Cause-Effect table where
Cause and effects are captured for better test coverage.

Example Of Decision Table Testing:

W W W . S Q A C I R L C E . C O M
BLACK BOX TESTING

For example:

A submit button should be enabled if the user has entered all required fields.
For every function, you need to create a table and list down all types of combinations of
inputs and its respective outputs. This helps to identify a condition that is overlooked by
the tester.

A submit button in a contact form is enabled only when all the inputs are entered by the
end user.

Scenario Based Interview Questions for Black box testing Techniques

Equivalence Class Partitioning:

1. Scenario: An application allows users to enter their age between 18 and 60 to create an
account. How would you test this using equivalence class partitioning?

Question: What are the valid and invalid equivalence classes in this scenario? How many
test cases would you design to cover these classes?

Answer: Valid equivalence classes for the age range 18 to 60 could be (18-35), (36-60),
and invalid class (<18, >60). I would design 3 test cases: one for each valid class and one
for an invalid age.

W W W . S Q A C I R L C E . C O M
BLACK BOX TESTING

2. Scenario: A form requires users to select their education level: High School,
Bachelor's, Master's, or Doctorate. How would you test this using equivalence class
partitioning?

Question: How can you ensure that you cover all possible options without testing every
individual value within each class?

Answer: To cover all options, I'd consider testing one valid value from each education
level as well as an invalid value not in any category. This would require 5 test cases.

Boundary Value Analysis:

1. Scenario: An e-commerce website limits the quantity of a product a user can buy to a
range of 1 to 10 units. How would you test this using boundary value analysis?

Question: What values would you choose to test as boundary values? Explain how
testing these values helps identify potential issues.

Answer: I'd choose the boundary values 1, 10, and values just below and above the
boundaries (0, 11) to test. These values help identify issues related to the boundaries.

2. Scenario: A login system accepts passwords between 8 and 20 characters. How would
you perform boundary value analysis to ensure security and functionality?

Question: How many test cases would you create for this scenario, considering both
valid and invalid boundaries? How might you identify any off-by-one errors?

Answer: I'd create 6 test cases: 8, 9, 10, 19, 20, and 21 characters long. Testing these
values around the boundaries helps catch potential off-by-one errors.
State Transition Testing:
1. Scenario: A microwave oven has the following states: Idle, Cooking, and Paused.
Transitions occur when users start, pause, or stop cooking. How would you perform state
transition testing?

Question: What sequences of user actions would you test to cover different state
transitions? How could this testing reveal unexpected system behavior?

Answer: I'd test sequences like Idle to Cooking, Cooking to Paused, and Paused to Idle.
Also, I'd examine direct transitions like Cooking to Idle. This helps identify issues during
state changes.

W W W . S Q A C I R L C E . C O M
BLACK BOX TESTING

2. Scenario: An online order tracking system allows customers to track their packages.
The system has states like Shipped, In Transit, Out for Delivery, and Delivered. How
would you apply state transition testing?

Question: Can you explain how state transition diagrams could assist in designing test
cases for this scenario? What potential issues might this approach uncover?

Answer: By testing transitions like Shipped to In Transit, In Transit to Out for Delivery,
and Out for Delivery to Delivered, we can reveal how well the system handles different
states and their transitions.

Decision Table Testing:


1. Scenario: A registration form's "Country" field influences the visibility of additional
address fields based on the selected country. How would you use decision table testing to
ensure proper form functionality?

Question: How would you structure the decision table for this scenario? What
combinations of input conditions would you test to cover all possible scenarios?

Answer: A decision table could have conditions like "Country" and outcomes like
"Visible Address Fields." Test cases would cover combinations of countries and
corresponding expected outcomes, ensuring full coverage.

2. Scenario: A software application calculates shipping costs based on the destination


country and package weight. The costs follow different rules for different countries and
weight ranges. How could decision table testing be applied here?

Question: What advantage does decision table testing offer in handling complex business
rules? How would you ensure complete coverage of rules and scenarios?

Answer: Decision table testing is useful here due to varied rules. I'd create test cases
covering different countries and weight ranges, ensuring that each rule combination is
tested for accurate cost calculations.

W W W . S Q A C I R L C E . C O M
BLACK BOX TESTING

THANK YOU

Contact: +923164363302
Email: sqacircle@gmail.com
Website: sqacircle.com

W W W . S Q A C I R L C E . C O M

You might also like