Mock API
A mock API simulates a real API by returning predefined responses. Developers and testers can work without depending on live external services.
Create a mock API
Section titled “Create a mock API”-
In the left navigation, open API Tests, then select Mock API’s.
-
In the Create New Mock API section, enter the endpoint URL to mock in the Endpoint field, for example
/resource. -
Use the HTTP Method dropdown to choose
GET,POST,PUTorDELETE. -
In the Response field, enter the response the real API would return. For example:
{ "status": "success" } -
Select Save.
Test the mock
Section titled “Test the mock”Send requests to the mock endpoint with Postman, curl or CloudQA’s API tests, and check that it behaves as you expect.