JUnit Questions and Answers – Limitations of Standard Unit Testing

This set of JUnit Questions and Answers for Entrance Exams focuses on “Limitations of Standard Unit Testing”.

1. ___________ is favoured over conditionals to better write testable code.
a) Polymorphism
b) Composition
c) Inheritance
d) Overloading
View Answer

Answer: a
Explanation: More conditionals lead to more complex code.

2. _____________ is a programming practice that expects new code to be written only if an automated test has failed and also to eliminate duplication.
a) Object Oriented Testing
b) Test Driven Development
c) Acceptance Testing
d) Lossless Development
View Answer

Answer: b
Explanation: The goal of TDD is “clean code that works.”

3. API stands for _______________
a) Application programming interface
b) Application programming instruction
c) Android programming interface
d) Application performance interface
View Answer

Answer: a
Explanation: APIs are a set of functions and procedures that allow the creation of applications.
advertisement
advertisement

4. When the _________ is used as the method’s first client, it becomes easier to focus purely on the API.
a) Object
b) Class
c) Test
d) Stub
View Answer

Answer: c
Explanation: This is an advantage of test driven development.

5. Eliminating duplication ensures that code is written that’s not only testable but also
_____________
a) Erasable
b) Maintainable
c) Upgradeable
d) Changeable
View Answer

Answer: b
Explanation: Code maintenance is enhanced by the elimination of duplication.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. ________ platform builds the application from its various components.
a) Development platform
b) Integration platform
c) Acceptance platform
d) Stress test platform
View Answer

Answer: b
Explanation: Integration platform ensures that all the components work together.

7. The ___________ platform is the last staging area before production.
a) Development platform
b) Integration platform
c) Acceptance platform
d) Pre-production platform
View Answer

Answer: d
Explanation: The pre-production platform is an optional platform before the production platform.
advertisement

8. On the development platform, _________ unit tests are executed.
a) Acceptance
b) Lossless
c) Logic
d) Functional
View Answer

Answer: c
Explanation: These are tests that can be executed in isolation from the environment.

9. The _____________ exercises the application under load and verifies that it scales correctly.
a) Development platform
b) Integration platform
c) Acceptance platform
d) Stress test platform
View Answer

Answer: d
Explanation: The scaling is done with respect to size and response time.
advertisement

10. User feedback is got from the ______________
a) Development platform
b) Integration platform
c) Acceptance platform
d) Stress test platform
View Answer

Answer: c
Explanation: The acceptance platform is where the project’s customers accept (sign off on) the system.

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.