WireMock integration
Please note that the use case presented here is a suggestion only and should be implemented with caution. It has not undergone quality assurance testing and is not officially supported by our platform.
Katalon Studio integrates with WireMock, a leading provider of mocking services that delivers both an open source version as well as a cloud version. With WireMock Cloud, Katalon users will be able to easily mimic a production API's behavior for end to end testing even if the production API is not yet developed or available. These virtualized services (otherwise known as service virtualization) can then be shared and used across teams without additional effort or maintenance.
Virtualizing a service enables Katalon users:
- to build test assets even when the APIs you need aren't ready or released.
- to guard against unstable 3rd party API's when developing tests to reduce test flakiness
- to simulate edge cases and faults easily, to help with unhappy path testing.
How to Integrate Katalon with WireMock Cloud
WireMock Cloud offers a free forever edition as well as paid plans for enterprises. You will need to create a WireMock Cloud account to leverage WireMock with Katalon.
Verify the response of the WireMock API: In your Katalon test script, you need to verify the response of the WireMocked API to ensure that it meets your expectations.
You can do this by using the API testing and Verification Validation mechanisms to check the status code, headers, and response body of the HTTP response.
Call the WireMocked API in your test: In your Katalon test script, you need to call the WireMocked API to verify the behavior of your system under test. You can do this by making HTTP requests using the WebUI.callRestApi method in Katalon.