Complete the code to identify the type of testing that focuses on inputs and outputs without knowing internal code.
def test_functionality(): # This is an example of [1] testing input_data = 5 expected_output = 25 actual_output = square(input_data) assert actual_output == expected_output
Black-box testing checks the software by looking at inputs and outputs without knowing the internal code.
Complete the code to identify the testing type that requires knowledge of the internal code structure.
def test_internal_logic(): # This is an example of [1] testing for i in range(10): assert process(i) == expected_result(i)
White-box testing involves looking inside the code to design test cases.
Fix the error in the code to correctly describe black-box testing.
def describe_testing(): # Black-box testing focuses on [1] knowledge of the code return "Test based on inputs and outputs"
Black-box testing does not require any knowledge of the internal code.
Fill both blanks to complete the sentence about white-box testing.
White-box testing requires [1] of the code and focuses on [2] coverage.
White-box testing requires knowledge of the code and focuses on code coverage.
Fill all three blanks to complete the dictionary comprehension describing testing types.
testing_types = {
'black-box': 'Tests based on [1] and [2] without code knowledge',
'white-box': 'Tests based on [3] knowledge and code structure'
}Black-box testing is external, based on inputs and outputs. White-box testing is internal, based on code knowledge.