This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on “Functional Software Testing”.
1. ______________ are the first type of tests any application should have.
a) Functional Tests
b) Unit Tests
c) Integration Tests
d) Stress Tests
Explanation: The main goal of unit testing is to verify that your application works as expected and to catch bugs early.
2. Unit tests allow greater test _____________ than functional tests.
Explanation: Unit tests can easily simulate error conditions, which is extremely difficult to do with functional tests.
3. Functional tests are more _____________ compared to unit tests.
a) Fine grained
c) Time consuming
d) Coarse grained
Explanation: Functional Tests need the full application (or a good part of it) to be ready before it can be tested.
4. Unit Tests can detect ________________
b) Quality Check
c) Database Errors
d) Enforced Error
Explanation: A unit test tells that a specific method is failing for a specific reason.
5. Agile methodologists favour writing code in _____________ slices to produce a working use case.
Explanation: As opposed to writing code in horizontal slices to provide services layer by layer.
6. To retain a design across features, agile methodologies encourage ______________ to adapt the code base as needed.
Explanation: Unit tests tells when and where code breaks and gives the confidence to refactor.
7. The agile methodologies try to lower project risks by providing the ability to cope with ________
Explanation: Agile methodologies allow and embrace change by standardizing on quick iterations.
8. ___________ is a principle of extreme programming (XP) that states that a functionality should not be added until deemed necessary.
b) MoSCoW Method
Explanation: The foundation on which YAGNI rests is a solid bed of unit tests.
9. YAGNI stands for _____________
a) Your agile going now inside
b) You aren’t gonna need it
c) You are gonna need it
d) You are given no information
Explanation: YAGNI being dependent on supporting practices is part of the original definition of XP.
10. YAGNI is a principle behind the XP practice of _______________
Explanation: DTSTTCPW is the acronym for “do the simplest thing that could possibly work”.
Sanfoundry Global Education & Learning Series – JUnit.
To practice all areas of Junit, here is complete set of 1000+ Multiple Choice Questions and Answers.