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
View Answer
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.
a) Coverage
b) Redundancy
c) Prowess
d) Accuracy
View Answer
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
b) Accurate
c) Time consuming
d) Coarse grained
View Answer
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 ________________
a) Regressions
b) Quality Check
c) Database Errors
d) Enforced Error
View Answer
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.
a) Horizontal
b) Small
c) Diagonal
d) Vertical
View Answer
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.
a) Changing
b) Adapting
c) Refactoring
d) Duplicating
View Answer
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 ________
a) Change
b) Refactoring
c) Inefficiency
d) Redundancy
View Answer
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.
a) KISS
b) MoSCoW Method
c) Overengineering
d) YAGNI
View Answer
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
View Answer
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 _______________
a) KISS
b) MoSCoW
c) WIB
d) DTSTTCPW
View Answer
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.
- Check JUnit Books
- Check Programming Books
- Practice Programming MCQs
- Apply for Computer Science Internship