Parrot - An Essential Tool for Testing API Responses
Parrot is a tool that allows you to easily create and maintain mock data for use in testing. It allows you to easily simulate API responses, and even allows you to send to the server a real request. It is an essential tool for testing API responses. It allows you to test that your API is working and also allows you to test for race conditions.
What it does:
Parrot is a tool that allows you to easily create and maintain mock data for use in testing. It allows you to easily simulate API responses. It allows you to send to the server a real request.
How to use it:
1. Click the button “Add”. This will open a dialog.
2. You will be able to define the URL fragment of the request you want to be mocked. The URL fragment is defined with a regular expression, allowing you to make any matching requirement as loose or strict as you want it to be.
3. You will be able to define the status code of your response, the exact response type, and the payload to be returned.
4. You will be able to select the method and the URL you want to mock.
5. You will be able to set the expected response time in milliseconds.
6. Once the extension detects the method/URL you expressed, the regular call will still be done. However, once the actual response has been received, no matter its actual result, it will be replaced by the mocked response you defined.