WireMock integration
Note:
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.
WireMock plays a crucial role in service virtualization by allowing users to easily mimic a production API's behavior. This capability is essential for various testing scenarios, including:
- Building test assets even when the production APIs are not ready or released.
- Reducing test flakiness by stabilizing interactions with third-party APIs.
- Simulating edge cases and faults to facilitate unhappy path testing.
Requirements
A WireMock Cloud account (free or paid plan).
Set up a mock API
You can create a mock API by configuring WireMock Cloud to proxy traffic to an existing API accessible over the internet and record requests as stubs.
Create your mock API
Record and create a stub
Note: In addition to creating a mock of an existing API, WireMock Cloud offers several methods to set up a mock API. For more information, see WireMock Cloud documentation.
Verify the mock API responses
Next, we will use Katalon Studio to send a GET request to retrieve data from the mock API and verify that the response matches the specified criteria.
Create a mock endpoint
You can create a new stub within Katalon Studio without needing to use the WireMock Cloud user interface. Simply send a POST request with the desired data to set up the stub in WireMock Cloud.