This article covers the different ways to test API module configurations at Unqork.
You can run a test to:
Confirm the execution sequence of your API call is correct.
Verify that the expected API response is correct.
Verify that specific data field responses match your criteria.
To set up these tests, use Unqork's Testing tool. After configuration, the tests run automatically whenever the module is saved. You can also manually execute them, or use the tool to edit, delete, and monitor all your API module tests.
To learn more about API specifications, see API Specification Snippet.
What Is an API Test?
API tests test your API modules. The following table describes the different types of tests:
API Test | Description |
|---|---|
Execution Sequence | This test monitors the execution sequence of your module. A successful test confirms that all your components trigger in the correct order. After executing the test, an Event Log displays. It lists the components and their events at each step of the execution sequence. This resembles what you see on the Server Side Execution Testing page.
|
Match Response | This test compares the JSON of the expected API response against the actual API response. Both match when the test passes. |
Validate Fields | This test lets you enter a specific data field to test. Set up criteria for that field and verify the response meets them. Validation types include:
|
You can only select modules that follow Unqork's API specifications. Once you find an API module, you can set up an API test.
You can only select modules that follow Unqork's API specifications. Once you find an API module, you can set up an API test.
To learn more about API specification, refer to API Specification Snippet article.
Create API Tests for Multiple Modules
If your application involves multiple API modules, set up API tests to ensure all those API calls work correctly. The Testing tool lets you create bulk Execution Sequence and Match Response API tests on all your API modules. These tests verify that responses are accurate and firing sequences are correct.
To create API tests for multiple modules:
Open the Testing tool.
Click Create Bulk API Tests.
The Bulk API Test Creator dashboard displays test options, filters, and a table of all your environment's API modules. By default, the table only displays API modules without tests. This makes it easier to find API modules that need tests.
Navigating the Bulk API Test Creator Dashboard
By default, the test name is Created by Bulk Test Creator. Click the Test Name field to rename the test. The Execution Sequence test is the default in API Test Types to Create and is recommended for all API modules. You can deselect it and select Match Response instead, or select both.

By default, every API module in the Selected Modules for Test Creation table uses your selected test(s). To run tests on specific modules, use the dashboard's filters.

These are the available filter options:
Filter | Description |
|---|---|
Workspaces | Use this drop-down to filter API modules from one or more workspaces.
|
Apps | Use this drop-down to filter API modules from one or more applications.
|
Modules | Use this drop-down to filter specific modules. |
Reset Filters | Click to reset the filters. |
Include Modules with Tests | Select this checkbox to see all environment API modules with tests. You'll also see the modules that don't have tests.
|
When you filter API modules, the matching modules populate the Selected Modules for Test Creation table. Tests only run on modules in this table. The table displays up to 10 modules by default. Click the pagination at the bottom to see more modules.

Here's the information in the table:
Attribute | Description |
|---|---|
Workspace | The workspace where your selected module exists. |
App | The application where your selected module exists. |
Module Name | The selected module's name. |
Module ID | The selected module's unique identifier. |
Test Status | Displays whether the selected module has a test. Tested modules have a checkmark in this column. |
Module Dashboard Button | Click this button to view the selected module in the Testing Module Dashboard. |
Creating an API Test
If your API modules have service logs, the test(s) runs on the most recent one.
To create a test:
In the Test Name field, enter a test name, or keep the default value.
From the API Test Types to Create options, select one or both of the tests.
Use the dashboard's filters to find and display only the API modules you want to test.
At the top right of the page, click Create Tests.

Click OK to confirm you want to run your test(s) on those selected modules.
Click OK in the modal to return to the Bulk API Test Creator.
If an API module has service logs, a checkmark displays in the Test Status column. If no service logs exist, the Test Status displays
No Log Found. To generate service logs, return to the module and execute it. Once service logs are available, you can create tests for the module.
Create API Tests for a Single Module
To create one or more API tests for a single module:
Open the Testing tool.
Click Create Single API Test.
From the Module drop-down, select an API module.
To view the module in the Module Builder, click the View Module in Designer link.
Selecting Recent Service Log API Request Data
If your module has recent service logs, these details populate automatically:
The most recent service log timestamp (Recent Service Logs).
The service log ID (Service Log ID).
The log's API request (Request).
The log's API response (Response).
To view a different service log, select it from the Recent Service Logs drop-down. Then click View Service Logs Dashboard for more details.

Manually Entering API Request Data
If no service logs exist, you must enter your API request manually.
After selecting a module to test:
Set Enter JSON Manually as the Request / Response Data.
This is the default setting if no service logs exist for this module.
In the Request field, enter your API request JSON.
Below the Request field, click GET Response. API response data displays in the Response field.
Creating an API Test
With an API module selected, you're ready to create an API test.
At the bottom of the page, click Add Test.
In the Test Name field, enter a unique test name.
Select a Test Type.
Depending on the Test Type, different information displays on the page. Here are the fields you see for each test.
Test | Test Description |
|---|---|
Execution Sequence | Request: The tested API request displays in the Request field. Event Log: This log displays the full sequence of your API call, including the components and events that occurred. |
Match Response | Request: The tested API request displays in the Request field. Expected Response: This field displays the expected API response for your API module. |
Validate Fields | Request: The tested API request displays in the Request field. Test Details: The field where you enter the data and the criteria to test. |
Below is an example of the Execution Sequence Test Type.

Using the Validate Fields Test Type
Under Test Types, Validate Fields requires additional information. After selecting Validate Fields, the following options display:
Attribute | Description |
|---|---|
Data Field | The data field you want to test. |
Validation Type | The type of validation you want to test. The options include Exists, Size, and Value. |
Exists | Confirms the data field you entered exists somewhere in your API response. |
Size | Confirms the size of the data field you entered. For example, if you expect your data field to be an array of 100 rows, enter 100 in the Size field. |
Value | Confirms the expected value for your data field is correct. |
Condition | This drop-down only displays if you select the Size or Value Validation Types. |
Equals | Checks if the Size or Value you entered equals the Data Field. |
Contains | Checks if the Size or Value you entered is part of the Data Field. |
Is Greater Than | Checks whether the Data Field is greater than the Size or Value entered. |
Is Less Than | Checks whether the Data Field is less than the Size or Value entered. |
Not Equal To | Checks if the Size or Value you entered doesn't equal the Data Field. |
Value | The size or value you want to test when you select the Size or Value Validation Type. |
+ Add Button | Click this button to set up the API test. |
Here's how to use the Validate Fields type:
In the Test Name field, enter a unique test name.
Select a Test Type.
In the Data Field, enter a specific data field.
Examples of data fields include
keyandarray.0.key.Select a Validation Type.
If you select Size:
From the Condition drop-down, select a condition.
In the Size field, enter the size of the array.
If you select Value:
From the Condition drop-down, select a condition.
In the Value field, enter the response value for your data field.

Click + Add.
Repeat these steps to add more validations. You can add as many validations as needed.
Click Save.
The previous test page displays. Your new tests display at the bottom of the page. Click Create Test to run your tests. These tests also run every time you save your module.
Below is an example of what you might see:
