The Power of Mocking APIs - Shivani Gaba
-
Locked
Shivani Gaba
Senior QA
![The Power of Mocking APIs - Shivani Gaba image](https://embed-ssl.wistia.com/deliveries/4ed43402ba48331ebfd3454fe9340a92.jpg?image_crop_resized=1280x720)
Talk Description
Blocked because the API you depend on doesn’t exist yet or isn't completely ready? Facing trouble to test certain scenarios due to a lack of control over third-party APIs?
Struggling to test failure cases like invalid responses or 5XX errors? Frustrated by flaky tests due to slow API responses?Â
Â
These are some common problems we regularly encounter. We cannot rely on slow APIs that provide a very narrow range of responses. So how can we test effectively in such situations? Is there any feasible solution available? Fortunately, there is: API mocking.Â
Â
If you are less familiar with mocks and want to gain more insight, join this talk.
In this session, I will explain how to mock APIs using Wiremock. Using a real-life example application, we’ll explore how to handle complex scenarios and form an effective testing strategy. Join this session to gain insights on how, when, and—most importantly—why we should mock APIs. Together we will discover how development and testing can benefit from mocks. Remember, “If API testing is the king, mocking APIs is the queen!”
Â
Please note: at the end of this talk, you will have full access to the example application used during the talk for trying out mocking for themselves :)Â
What you’ll learn
By the end of this talk, you'll be able to:
- The benefits of mocking APIs for development and testing
- How to mock APIs
- Which scenarios can be covered better with mocks
- When to mock and when not to mock
- Which different types of testing benefit from mocks
Shivani Gaba
Senior QA
Suggested Content
![TestBash Brighton 2024](https://www.ministryoftesting.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbk15IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--815abcdd8f535ab728e65b8c665daf7c18ddfd5b/TestBash%20Brighton%202024_16%209.jpg)
![Introduction To HTTP](https://www.ministryoftesting.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBc2NDIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--57bf9b6abc3572f6c4d393575cda2237044566bc/Dojo_Courses_-_HTTP_Dojo.png)
Topics
Tags
-
api-automation