Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Scrum PSD Exam - Topic 1 Question 90 Discussion

What are two reasons to use mock objects in unit tests?
A) The behavior of a given object can be emulated to the system under test and E) Isolating a particular system component for controlled testing
B) They are machine-generated and eliminate the need to write code by hand
C) To increase tight coupling
D) TDD is impossible without them

Scrum PSD Exam - Topic 1 Question 90 Discussion

Actual exam question for Scrum's PSD exam
Question #: 90
Topic #: 1
[All PSD Questions]

What are two reasons to use mock objects in unit tests?

Show Suggested Answer Hide Answer
Suggested Answer: A, E

Mock objects are simulating the behavior of dependencies such as persistance layers or APIs. By mocking these you can be sure about what you are testing, and not accidentally testing the external dependency.


Contribute your Thoughts:

0/2000 characters
I think using mock objects helps isolate components, like option E mentions. It makes testing more controlled, right?
upvoted 0 times
...
Arleen
5 days ago
I definitely recall that mock objects help with isolation, so E seems solid, but I’m unsure about A.
upvoted 0 times
...
Yvette
10 days ago
I feel like B is misleading; mock objects are usually created manually, right?
upvoted 0 times
...
Paulina
15 days ago
I remember practicing a question like this, and I think isolating components is really important for effective testing.
upvoted 0 times
...
Tamesha
2 months ago
I think A and E are the right answers, but I'm not completely sure about the wording.
upvoted 0 times
...

Save Cancel