Tram Ho

# 1. What is the Black-box testing?

• Black-box testing is the performance of testing the functionality of an application without regard to its internal structure, design or coding.
• The main purpose is to confirm whether the software works in response to the customer’s specification or expectations.
• Usually performed by testers.
• Applicable for stages:
• Unit test
• Integration test
• System test
• Acceptance test
• Regression testing.

# 2. Black Box test design

## 2.1 Equivalence partitioning (EP) – Equivalent Partitioning (EP)

• The technique of partitioning inputs and outputs into regions of similar behavior to be treated in the same way
• One value in the active equivalence region -> means that the remaining values ​​in the region will work as well
• When design tests will include all valid and invalid partitions

Example: At a vegetable shopping site. This page only allows you to submit orders when you purchase a minimum of 0.5 kg and a maximum of 25 kg.

From there we can divide into 3 equivalent partitions as follows:

Zone 1: x <0.5 kg

Zone 2: 0.5 kg <= x <= 25 kg

Area 3: x> 25 kg

Since the system only accepts the value “0.5 gram <= x <= 25 kg”, this is called a valid partition. The remaining 2 partitions are invalid.

## 2.2 Boundary value analysis (BVA) – Marginal value analysis (BVA)

• Boundary: The value at the edge of each equivalent partition
• This value is often not as accurate as the values ​​inside the equivalence range, so it is the place where errors are most common
• Two-point boundary: the maximum and minimum value of the equivalent partition
• Three boundary values: values ​​before, at and immediately above the boundary value
• Design tests should include all valid and invalid boundary values

As in the above example, we have 2 marginal values ​​0.5 and 25

When referring to an equivalent partition, it will be given priority to pick the middle values ​​to test (eg 0.2, 15, 35) while with “Two-point boundary” it will be the boundary values: 04, 0, 5, 25, 25.1

Similarly three boundary values: 0.4, 0.5, 0.6, 24.9, 25, 25.1

## 2.3 Decision tables – decision table

• Discover combinations of inputs, outputs, actions: Determines input values, possible actions, and possible output. From there create a table to keep track of possible cases.
• The values ​​for conditions and actions are usually displayed as Boolean (True or False) values.

A simple example for the login form

Conditioncase01case02case03case04
EmailTrueTrueFalseFalse
ResultSuccessErrorErrorError

Combining the true / false conditions of the input will give different results. Corresponding to the possible circumstances.

From there, you can pick the appropriate test case to ensure coverage.

## 2.4 State transition testing – Test transitions

• Using the state transition graph to see possible software states, passing different Input values ​​produces different state results. From there, have an overview and understand the handling of the system

For example: ATM station allows access to the account when the user enters the wrong pin number not more than 3 times, if more than 3 times, the card will be swallowed.

From the request above we have a state diagram table as shown below

To cover 100% state transition coverage, make sure all state is passed => like this example we have 2 tcs as below: