Challenge - 5 Problems
Master of Black-box and White-box Testing
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding Black-box Testing Focus
Which statement best describes the main focus of black-box testing?
Attempts:
2 left
💡 Hint
Think about testing without looking inside the program.
✗ Incorrect
Black-box testing focuses on checking software behavior by providing inputs and verifying outputs without any knowledge of internal code.
🧠 Conceptual
intermediate2:00remaining
White-box Testing Characteristics
Which of the following is a key characteristic of white-box testing?
Attempts:
2 left
💡 Hint
White-box testing means looking inside the program.
✗ Incorrect
White-box testing involves understanding and testing the internal workings of the software, such as code paths and logic.
❓ Predict Output
advanced2:00remaining
Output of Black-box Test Case Result
Given a function that returns the sum of two numbers, what will be the output of this black-box test case if inputs are 3 and 5?
Testing Fundamentals
def add(a, b): return a + b # Black-box test case input1 = 3 input2 = 5 result = add(input1, input2) print(result)
Attempts:
2 left
💡 Hint
Think about what adding 3 and 5 returns.
✗ Incorrect
The function adds two numbers and returns their sum. 3 + 5 equals 8.
❓ assertion
advanced2:00remaining
Correct Assertion for White-box Testing Coverage
Which assertion best verifies that a specific function branch was executed during white-box testing?
Testing Fundamentals
def is_even(num): if num % 2 == 0: return True else: return False result = is_even(4)
Attempts:
2 left
💡 Hint
White-box testing checks internal logic by verifying outputs for specific inputs.
✗ Incorrect
The assertion checks that the function returns True for input 4, confirming the 'if' branch was executed.
🔧 Debug
expert2:00remaining
Identify the Testing Approach Causing a Bug Miss
A tester uses only black-box testing on a function that has a hidden division by zero error in an internal branch never triggered by normal inputs. What is the most likely outcome?
Attempts:
2 left
💡 Hint
Think about what black-box testing can and cannot see.
✗ Incorrect
Black-box testing only tests visible inputs and outputs, so hidden internal errors in untested branches can be missed.