Documentation Index

Fetch the complete documentation index at: https://docs.unqork.io/llms.txt

Use this file to discover all available pages before exploring further.

Creating API Tests

Prev Next

API tests verify that API module configurations behave as expected. Use the Testing Tool to create, run, edit, and delete API tests. After configuration, tests run automatically whenever the module is saved.

What Is an API Test?

The following test types are available:

Test Type Description
Execution Sequence Monitors the execution sequence of the module. A successful test confirms that all components trigger in the correct order. After executing, an Event Log displays the components and their events at each step.
Match Response Compares the expected API response against the actual API response. The test passes when both match.
Validate Fields Validates a specific data field against defined criteria. Validation types: Exists (confirms the field exists in the response), Size (confirms the size of the field), Value (confirms the expected value is correct).

Create API Tests for Multiple Modules

If an application involves multiple API modules, set up API tests to ensure all those API calls work correctly. The Testing tool supports bulk creation of Execution Sequence and Match Response API tests across all API modules. These tests verify that responses are accurate and firing sequences are correct.

To create API tests for multiple modules:

  1. Open the Testing tool.

  2. Click Create Bulk API Tests.

The Bulk API Test Creator dashboard displays test options, filters, and a table of all environment API modules. By default, the table only displays API modules without tests, making it easier to find API modules that need tests.

Bulk API Test Creator

By default, the test name is Created by Bulk Test Creator. Click the Test Name field to rename it. The Execution Sequence test is selected by default in API Test Types to Create and is recommended for all API modules. Deselect it to use Match Response instead, or select both.

Interface for creating bulk API tests with selected modules and execution options.

By default, every API module in the Selected Modules for Test Creation table uses the selected tests. To run tests on specific modules, use the filters.

Interface for creating bulk API tests with selected modules and execution options.
Filter Description
Workspaces Filters API modules from one or more workspaces. Auto-populates with the workspace if accessed from the Workspace Dashboard.
Apps Filters API modules from one or more applications. Auto-populates with the application if accessed from the App Dashboard.
Modules Filters specific modules.
Reset Filters Resets all filters.
Include Modules with Tests When checked, shows all environment API modules, including those with existing tests. By default, shows only modules without tests.

After filtering, matching modules populate the Selected Modules for Test Creation table. Tests only run on modules in this table. The table displays 10 modules by default; use the pagination at the bottom to see more.

Interface for creating bulk API tests with selected modules and execution options.
Attribute Description
Workspace The workspace where the selected module exists.
App The application where the 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 API modules have service logs, the tests run on the most recent one.

To create a test:

  1. In the Test Name field, enter a test name, or keep the default value.

  2. From the API Test Types to Create options, select one or both of the tests.

  3. Use the dashboard's filters to display only the relevant API modules.

  4. At the top right of the page, click Create Tests.

    Interface for creating bulk API tests with selected modules and execution options.
  5. Click OK to confirm running the tests on the selected modules.

  6. Click OK in the dialog 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. Return to the module and execute it to generate service logs, then create the test.

Create API Tests for a Single Module

To create one or more API tests for a single module:

  1. Open the Testing tool.

  2. Click Create Single API Test.

  3. 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 the 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.

Creating a new API test with service log details and response data displayed.

Manually Entering API Request Data

If no service logs exist, the API request must be entered manually.

After selecting a module to test:

  1. Set Enter JSON Manually as the Request / Response Data.

    This is the default setting if no service logs exist for this module.

  2. In the Request field, enter the API request JSON.

  3. Below the Request field, click GET Response. API response data displays in the Response field.

Creating an API Test

  1. At the bottom of the page, click Add Test.

  2. In the Test Name field, enter a unique test name.

  3. Select a Test Type.

Test Type Fields
Execution Sequence Request: The tested API request. Event Log: The full sequence of the API call, including components and events.
Match Response Request: The tested API request. Expected Response: The expected API response for the API module.
Validate Fields Request: The tested API request. Test Details: The data field and validation criteria to test.
API test interface showing event log and response details for execution sequence.

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 to test.
Validation Type The type of validation to apply. Options include Exists, Size, and Value.
Exists Confirms the data field exists somewhere in the API response.
Size Confirms the size of the data field. For example, if the data field is expected to be an array of 100 rows, enter 100 in the Size field.
Value Confirms the expected value for the data field is correct.
Condition This drop-down only displays when the Size or Value Validation Type is selected.
Equals Checks if the entered Size or Value equals the Data Field.
Contains Checks if the entered Size or Value 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 entered Size or Value does not equal the Data Field.
Value The size or value to test when Size or Value Validation Type is selected.
+ Add Button Click this button to set up the API test.

To set up a Validate Fields test:

  1. In the Test Name field, enter a unique test name.

  2. Select a Test Type.

  3. In the Data Field, enter a specific data field.

    Examples of data fields include key and array.0.key.

  4. Select a Validation Type.

    When Size is selected:

    1. From the Condition drop-down, select a condition.

    2. In the Size field, enter the size of the array.

    When Value is selected:

    1. From the Condition drop-down, select a condition.

    2. In the Value field, enter the response value for the data field.

    API test configuration screen showing validation details for specific data fields.
  5. Click + Add.

    Repeat these steps to add more validations.

  6. Click Save.

The test page displays. New tests appear at the bottom. Click Create Test to run them, or they run automatically when the module is saved.

Creating a new API test with details and recent service logs displayed.

Changelog

Date Change
2026-07-21 Sweep — updated title, removed tutorial framing, removed v1 links, fixed * markers and embedded > in table cells, fixed You can language, modal → dialog, removed redundant intro sentences.
2026-07-16 Editorial pass: fixed banned words, em dashes, See Also descriptions, and link paths.
2026-04-28 Editorial quality pass: fixed metadata, added H1, removed duplicate paragraph, fixed contractions, removed case markers, updated internal links.