Question: Python questions Question 1 What is White Box testing? 1. White Box testing tests the external hardware. 2. White Box testing is made with some
Python questions
Question 1
What is White Box testing?
1. White Box testing tests the external hardware.
2. White Box testing is made with some knowledge of the internals of the software being tested.
3. White Box testing tests to seehow clean the code is.
4. White Box testing is made with no knowledge of the internals of the software being tested.
Question 2
What is Black Box testing?
1. Black Box testing is made with some knowledge of the internals of the software being tested.
2. Black Box testing tests the external hardware.
3. Black Box testing is made with no knowledge of the internals of the software being tested.
4. Black Box testing is for testing whether it all fits into the box.
10 points
Question 3
What are mock objects in testing?
1. Mock objects hide the real code by covering it up.
2. Mock objects pretend to be real objects to cause problems for tests.
3. Mock objects areobjects that mimic the behavior of real objects in a controlled way.
4. Mock objects are used by hackers to fake out real systems.
Question 4
Briefly describe the process of test-driven development.
Question 5
Suppose you have a functionfor which you are writing unit tests. In that function, if certain invalid input is given, the function will raise a ValueError.
If you want to test that an exception is raised, what is thebestway to test it?
1. Usewithself.assertRaises(ValueError)in the unit test
2. The unittestmodule handles those errors.
3. Use a try/except block to catch the error.
4. You don't need to test it because it is an error condition.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
