Oracle Cloud Platform Data Integration 2020 Specialist — Question 6

You have two microservices, A and B running in production. Service A relies on APIs from service B. You want to test changes to service A without deploying all of its dependencies, which includes service B.
Which approach should you take to test service A? (Choose the best answer.)

Answer options

Correct answer: B

Explanation

The best approach is to use API mocks to simulate the responses from service B, allowing you to test service A in isolation without depending on the actual service B. Testing against production APIs can lead to unexpected issues and is not a safe practice. Stating there is no need to test APIs is incorrect, and while testing in private environments is useful, it does not specifically address the isolation needed for testing service A without deploying service B.