Question
Question 1. a) One of the primary purposes of unit testing is to verify the behaviour of the program according to its specification. True or
Question 1.
a) One of the primary purposes of unit testing is to verify the behaviour of the program according to its specification.
True or False
b) One of the primary purposes of unit testing is to verify the behaviour of the program according to its specification.
True or False
c) We should make sure that private methods are explicitly tested using delicate test cases.
True or False
d) Please select all the true statements about Reflection in Java
-Reflection is a powerful facility that should be used during unit testing often.
-Using reflection will lose the benefits of compile-time type checking.
-A Class instance is a mutable object, through which you can obtain Constructor, Method, and Field instances representing the constructors, methods, and fields of the class represented by the Class instance.
-The code required to perform reflective access is tedious to write and hard to read.
e) The naming convention for test cases is the same with production code -- they should be as concise as possible.
True or False
f) The test coverage metrics, such as branch coverage, are computed based on the control flow graph of the program.
True or False
g) Stubs are used when the private methods cannot be accessed in the testing classes.
True or False
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started