#
E2E Testing Guide
KushoAI's End-to-End (E2E) testing feature enables you to create complex workflows by chaining multiple APIs together. This functionality allows for seamless, sequential, and interconnected API testing.
You can add APIs either manually or select from existing test suites. Since APIs are managed separately, when you select an API from your existing test suites, new test cases are automatically generated for it.
#
Creating an E2E Workflow
Navigate to the "Create E2E Workflow" page
Provide a name and description for your E2E workflow, then click "Create"
After creating the workflow, the following page will be displayed:
#
Adding APIs to the Workflow
You can add APIs in two ways:
- Manually by clicking "Enter New API"
- From existing test suites by clicking "Select Existing API"
#
Adding APIs Manually
Fill in the required details and click the "Add API" button at the bottom right of the screen
Once added, test cases will automatically generate. Click the hamburger icon at the top of the API box to view generated test cases
Note: While you can add or remove APIs from the workflow, single API execution in isolation isn't supported. A workflow requires multiple APIs.
Now, let's add another API.
#
API Response Handling
#
Passing Responses Between APIs
To pass a response from one API to another:
- Click on the source API's response field
- Drag it to the target API
#
Using Specific Response Data
To use specific data from one API's response in another:
- Click the edit button on the target API
- Locate the Edit Drawer on the right side of the nodes
- Under "Connected API Requests," copy the test suite name and format
- Add the required field to your API using the following format:
{
"filter": "%%IBM Intraday Data Fetch.<key_object>.<key>%%"
}
Replace <key_object>
and <key>
with the previous API's result or response fields. For example, to use a date field from the response, set <key_object>
to "response" and <key>
to "date".
#
Reference Format
Basic format:
%%<test_suite_id>.<response_field>%%
For connected APIs:
%%<test_suite_name>.<key>.<field>%%
#
Accessible Response Components
- response: Main response body
- headers: Response headers
- statusCode: HTTP status code
- request: Original request details
#
JSON-e Integration
KushoAI now supports JSON-e for advanced template operations. Use $eval
for expressions.
#
Connected API Example
#
Sample Response Structure
{
"response": {
"userId": 1,
"id": 1,
"body": "Sample response body"
},
"headers": {
"access-control-allow-credentials": "true"
},
"statusCode": 200
}
#
Usage Examples
#
Basic Usage
{
"id": "%%Previous Connected API.response.id%%",
"allowCredentials": "%%Previous Connected API.headers['access-control-allow-credentials']%%"
}
#
Advanced JSON-e Integration
{
"id": "%%Previous Connected API.headers['access-control-allow-credentials']%%",
"body": {
"$eval": "split(%%Previous Connected API.response.body%%, ' ')[2]"
},
"title": "%%Previous Connected API.response.body%%",
"userId": ""
}
#
JSON-e Features
- Use
%%API_Name.key.field%%
to reference connected API values $eval
enables JavaScript-like expressions and operations- Supported operations include:
- Array operations
- String manipulations
- Arithmetic
- Logical comparisons
- Multiple API responses can be combined in a single request
- Complex objects can be created within
$eval
expressions - Variables can be accessed using
\{\{variable_name\}\}
Tip: While JSON-e offers powerful functionality, maintain readable and maintainable expressions.
#
Managing Test Cases
After adding test cases, you can choose to add or delete them. Only the selected test cases will run. KushoAI will create and execute various test case combinations. You can perform these actions by clicking the hamburger icon on each node.
Clicking this button opens the Test Case management modal:
Here, you can:
Select the test cases you want to run
Configure test cases for each API individually to create different combinations
Close the window using the "X" button
Click "Run" at the top to execute the selected test combinations
After selecting your test cases, click "Run" at the top. A new window will appear showing the execution of all possible combinations of the selected tests.