1Z0-1084-20 · Question #69
You have two microservices, A and B running in production. Service A relies on APIs from service
The correct answer is B. Test using API mocks. Testing using API mocks Developers are frequently tasked with writing code that integrates with other system components via APIs. Unfortunately, it might not always be desirable or even possible to actually access those systems during development. There could be security…
Question
You have two microservices, A and B running in production. Service A relies on APIs from service
Options
- ATest against production APIs.
- BTest using API mocks.
- CThere is no need to explicitly test APIs.
- DTest the APIs in private environments.
How the community answered
(53 responses)- A11% (6)
- B79% (42)
- C4% (2)
- D6% (3)
Explanation
Testing using API mocks Developers are frequently tasked with writing code that integrates with other system components via APIs. Unfortunately, it might not always be desirable or even possible to actually access those systems during development. There could be security, performance or maintenance issues that make them unavailable ?or they might simply not have been developed yet. This is where mocking comes in: instead of developing code with actual external dependencies in place, a mock of those dependencies is created and used instead. Depending on your development needs this mock is made "intelligent" enough to allow you to make the calls you need and get similar results back as you would from the actual component, thus enabling development to move forward without being hindered by eventual unavailability of external systems you depend on
Topics
Community Discussion
No community discussion yet for this question.