Connector Mocking
Learn how to configure mock responses in connectors on the Digibee Integration Platform.
Last updated
Learn how to configure mock responses in connectors on the Digibee Integration Platform.
Last updated
Connector Mocking is a way to create and simulate different responses to the connectors as you build the integration flow. This streamlines the testing process by allowing you to create and test all of the flow logic without having to worry about configuring the connectors to access external applications or make actual API calls, for example.
To create a response:
Open the connector you want to mock.
In the Create Mock Response option, click Set new.
Enter the response in the JSON Body field.
Enter a Name for the response.
Click Add new.
The response is saved in a list. You can add as many mock responses as you like by repeating the same process.
To return to the connector configuration, click Back to Settings.
To edit the response:
Open the connector with the mock response.
On Mock Response, click the pencil icon.
Find the response you want to change and click Edit.
Make the desired changes to the JSON Body or Name.
Click Save to apply them or Cancel to discard them.
To apply the mock response to the connector, you must activate the response. You can do this in two ways:
Activate the Mock Response switch button in the connector configuration form and select the mock from the dropdown menu.
Activate the mock you want to use in the edition area of the Mock Responses. Only one mock can be activated per connector.
The mock response is only applied to the connector when you save the configuration form of the connector.
Connector Mocking is a powerful tool to help you develop integration logic. Here are some examples of how you can use this feature:
When designing a flow, you may need to call a REST service, which can incur costs with each request. To avoid these costs during development, you can configure a REST connector with a mock response. This allows you to continue developing and testing the flow.
When testing pipeline logic, you may need to handle various responses from a DB connector. Mock responses allow you to simulate and select different responses for more comprehensive testing.
If you need to adjust the business logic of an integration, you can streamline this process by activating the mock responses of connectors that call external systems. This lets you test changes to the integration flow without triggering actual calls to external systems.