JUnit Questions and Answers – Mock Objects

«
»

This set of JUnit Interview Questions and Answers focuses on “Mock Objects”.

1. ____________ is a software analysis method used to identify structural units in code under test.
a) Linear code sequence and jump
b) State coverage
c) Lossless packs
d) Linear jumps
View Answer

Answer: a
Explanation: Linear code sequence and jump helps to answer the question “how much testing is enough”?
advertisement

2. LCSAJ stands for _______________
a) Loading Code standard as Jumps
b) Linear code sequence and jump
c) Loading code sequence and jump
d) Linear coverage sequence and jump
View Answer

Answer: b
Explanation: LCSAJ is primarily used with dynamic software analysis.

3. The JJ in JJ-path stands for ___________
a) Just Jump
b) Jump-in-JUnit
c) Java-JUnit
d) Jump-to-Jump
View Answer

Answer: d
Explanation: JJ-path or Jump-to-Jump-path is a well-defined linear region of a program’s code.

4. In a narrower sense, LCSAJ is also called ____________
a) JJ-Path
b) Code Coverage
c) System Code Analysis
d) Code Breakdown
View Answer

Answer: a
Explanation: LCSAJ is now always referred to as a JJ-path.
advertisement

5. ______________________ is the most common and least efficient debugging technique.
a) Brute force debugging
b) Backtracking
c) Cause elimination
d) Program slicing
View Answer

Answer: a
Explanation: In brute force debugging, all possible combinations are used and studied.

6. An effective method for locating errors in small programs is to ___________ the incorrect results through the logic of the program until the point where the logic went astray is found.
a) Search
b) Backtrack
c) Slice
d) Eliminate
View Answer

Answer: b
Explanation: This type of debugging is known as backtracking.

7. __________ involves the use of induction or deduction and introduces the concept of binary partitioning.
a) Brute force debugging
b) Backtracking
c) Cause elimination
d) Program slicing
View Answer

Answer: c
Explanation: Cause elimination bases debugging on the basis of induction.
advertisement

8. ________________ is the computation of the set of programs statements.
a) Brute force debugging
b) Backtracking
c) Cause elimination
d) Program slicing
View Answer

Answer: d
Explanation: The whole code is sliced into segments and their computation is known as Program Slicing.

9. The point at which the program slice affects the values at some point of interest is __________
a) Slicing criterion
b) Program criterion
c) Sliced Parts criterion
d) Information flow control
View Answer

Answer: a
Explanation: The slicing criterion is the point at which values start being affected.

10. Program slicing can be used in ______________ to locate source of errors more easily.
a) Testing
b) Coding
c) Debugging
d) Checking
View Answer

Answer: c
Explanation: Program slicing is a debugging technique.
advertisement

Sanfoundry Global Education & Learning Series – JUnit.
To practice all areas of JUnit for Interviews, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn