Creating and Managing Mock Collections

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • In this video, we will learn how to create a mock collection and use it efficiently.
    Step-by-Step Guide:
    1. Click on the mock server feature located in the left sidebar.
    2. Click on the New Collection button.
    3. Give the collection a meaningful name and add a collection path. This path will be prefixed to all the mock endpoints inside this collection. Click on Save.
    4. Add a mock into the collection by clicking on the options on the right and selecting Move.
    5. Select the appropriate collection and choose its version (e.g., V1 APIs) and click Move.
    6. Create another mock with the same data but for version 2 response.
    7. Create a new collection for version 2 APIs and move the version 2 mocks into it.
    8. Copy the mock endpoint and open a new tab for testing.
    9. Replace API/V1 with API/V2 to see the difference in responses.
    10. This way, you can create multiple mocks with the same endpoint and manage them efficiently.
    11. To update the collection path, click on the options located on the right side and select edit.
    12. Update the path and click save. This will also update the endpoints for all the mocks within the collection.
    Refer docs to learn more: developers.req...

Комментарии •