Course 1: Getting started with API AutoFlow
2 min read · 10 min video
Lesson 3 Using Data Simulation for Easier Development
One of the most repetitive tasks as a solution maker is testing the features as you build them.
Wouldn’t it be great if the solution automatically tests itself as you build the features?
That’s what the data simulation feature of API AutoFlow does.
Mock data is simulated or made-up data for the purpose of testing the solution during development.
Note: Simulated data ONLY exists within the product. This means, when testing outside API AutoFlow using your application or tools such as Postman will not have access to the simulated data.
Lesson Outline
- Flow Test Simulation (Flow Transaction Data)
- Action Responce Simulation
1. Flow Test Simulation
The flow test simulation is a means of mocking the flow’s input data. For example, for HTTP, the input data would be the HTTP request and the output would be the HTTP response.
HTTP server attached flows, a user can simulate HTTP request and see what the HTTP response would be after the flow is complete.
IMPORTANT: Dev Mode needs to be switched on to use the flow test simulation
Setup the action to echo
Use the data/set
action
- input value is the HTTP-request-body
- output is HTTP-response-body
Multiple simulation versions
When creating a solution, there are times when the user needs to test with multiple data sets.
By, pressing the +
button, you can create as many versions of the test as you need.
Use the drop-down to select the version of the flow test simulation.
Note: You can delete or pin a version with the buttons provided.
Flow Transaction Data
The process of creating a flow is to design a chain of actions that provides desired response to the request.
By simulating the request data within the product, developers can visualize the expected response as the flow is built and actions are applied.
The flow transaction data is on the bottom of the left navigation pane
Key point
- Data received by the selected action
- Stored in memory
2. Action Response Simulation
Calling external data sources frequently can be a problem
During solution making, it may not be ideal to execute those actions too many times for reasons such as rate limiting and slow responses delaying the development process.
Actions that interacts with an external source as a feature to simulate data. This allows the solution maker to use mocked
data during the development mode
Note:
- The mock data feature is checked by default. Be sure to uncheck if you want to test with a real dataset
- The mock data only exists within the API AutoFlow product. Mock data can not be used outside the product.
How to Easily Create Mock Dataset
1. Uncheck the mock data to get the real data
2. Copy the data from the flow transaction data
3. Check the mock data to simulate the data
4. Paste the data into the mock data
Download Using Data Simulation for Easier Development configuration
Learn how to use configurationNEXT » LESSON 4: Using Data Simulation for Easier Development