Test Flow Generation


Generating a Test Flow

The Generate Test Flow option auto creates post-deployment test flows. These dataflows can be used to make live requests to the deployed API endpoints using the API Client and API Connection objects.

The API Connection object contains the base URL of the server where the APIs are deployed and is configured with an Access Token for Authentication.

The API Client object encapsulates the entire API flow’s logic, starting from the Request object to the Response Publish object, including request parameters, request and response content bodies, and pagination configurations.

Other objects that are mapped either to the Request object or from the Response object will not be encapsulated in the API deployment and shall remain as it is in the test flow generated.

However, any Workflow Tasks shall not be made part of the test flow.

Flow Level

Generate Test Flow Icon

At the flow level, use the Generate Test Flow icon in the API flow toolbar to create the test flow for a deployed API.

Check the Job Progress to see if the test case generation resulted in a failure or success. Here, it is successful. This is the generated test flow for the API.

You can run this test dataflow to check the behavior and assess the performance and functionality of the designed API.

Generate Test Flow for API checkbox

At the flow level, we can also check the Generate Test Flow for API checkbox on the deployment window.

This creates the test flow after the creation of the deployment. However, only when the API flow’s verification is successful, the test flow is created. Otherwise, the entire process results in an error.

Folder Level

Generate Test Flows for grouped APIs checkbox

For the Folder level test flow generation, check the Generate Test Flows for Grouped APIs check box while deploying the APIs.

Check the Job Progress to see if the verification of the API flows and the test case generation resulted in a failure or success along with the deployment creation job traces. Here, the test flow creation was successful.

Verification of the API Flows

The initial process before the creation of deployment is the verification of the API Flow(s). By default, the deployment is verified in pushdown mode. If the flows are not pushdown-able, they are verified in the non-pushdown mode. To learn about pushdown mode, click here.

If the API deployment contains any errors or warnings, the deployment process is terminated with a link provided in the Job Progress window.

Clicking on this View Verification Logs link opens the Verify window. Here, we can see the verification logs. Its shows the Severity i.e., Error or Warning, the Name of the object which contains the issue, and the Message which is the description of the error/warning.

Note: The verification process for both the Flow level and Group Level deployment is the same.

Generating Test Flow from the Server Browser

Astera Data Stack also lets the user generate a test flow from the Server browser.

For our use case, we have an API flow that reads data from a sample Northwind database and sends it in the API response.

  1. Deploy the API flow.

  1. Click OK and you will be able to see the deployment in the Server Browser.

For all Endpoints

To generate test flows for all endpoints present within a deployment, right-click on the deployment file and select Generate Test Flows for All Endpoints.

For each Endpoint

To generate a test flow for a specific endpoint, open the deployment to view endpoints, then right-click on the desired endpoint and select Generate Test Flow.

Selecting it will generate the respective test flow in the project opened. The flows will be added to the API Test Flows folder followed by the deployment folder in the project.

These test flows allow automated testing of the deployed API endpoints as they are fully configured with the relevant test values. Execute the test flows to see if the API calls are running successfully.

This concludes the working of the Test flow generation feature in Astera.

Last updated

© Copyright 2023, Astera Software