Datasource
Connect external data sources to your tests. Create data-driven tests using API, Excel/CSV and Database data.
Overview
Datasource allows you to pull data from external sources for use in your tests. Define a datasource and use it in your testcase with the ${variable} syntax.
Excel / CSV
Read data from spreadsheet files
StaticDatabase
Pull from database with SQL queries
JDBCHow It Works
1. Create Datasource
API, Excel or DB
2. Link to Testcase
Select datasource
3. Use Variables
${column_name}
4. Iteration
Run for each row
Excel / CSV Datasource
Load test data from Excel (.xlsx, .xls) or CSV files. Ideal for data-driven testing.
Page Layout
Navigate to Datasource page and click the Excel/CSV tab. The page has two sections:
Left Panel - Excel Files List
Displays all previously uploaded Excel/CSV files. Click on any file name to view or edit its details.
Excel Files x
Right Panel - Upload & Edit
The main content area where you upload and configure Excel/CSV files.
Excel DataSource
Upload Excel Description
Click to select a file
Supported: XLSX, XLS, CSV
How to Upload a File
- 1 Go to Datasource page and click the Excel/CSV tab
- 2 In the upload area, click "Select File" or drag and drop your file (XLSX, XLS or CSV)
- 3 Enter a File Name to identify the datasource
- 4 Check the "Header" checkbox if the first row of your file contains column headers
- 5 Click "Save" to upload and store the file
Header Option
When the Header checkbox is enabled, the first row of the file is used as column names. These column names become the variable names you can use in your tests with ${column_name} syntax.
Header enabled (first row = column names)
| username | password | expected |
|---|---|---|
| admin@test.com | Admin123! | success |
| user@test.com | User456! | success |
Use as: ${username}, ${password}
Header disabled (auto-generated column names)
| col_0 | col_1 | col_2 |
|---|---|---|
| username | password | expected |
| admin@test.com | Admin123! | success |
Use as: ${col_0}, ${col_1}
Managing Files
View / Edit
Click a file name in the left panel to view or update its details
Delete
Select a file and click the Delete button to remove it
Supported Formats
.xlsx
Excel 2007+
.xls
Excel 97-2003
.csv
Comma Separated
Database Datasource (JDBC)
Define your database connection via JDBC. This section only configures connection settings; to run SQL queries, use the Database (JDBC) step inside your testcase.
Page Layout
Top Tabs
Left Panel
DB Configurations list and add new connection button ()
Right Panel
Database Connection form — enter connection details
Connection Form (Database Connection)
Fill in the following fields:
Name
A name to identify this connection
Database Url
JDBC connection URL
JDBC Driver Class
Driver class for your database type
Username
Database username
Password
Database password
Action Buttons
Test the connection
Save the connection
Delete the connection
Example JDBC URLs
Note: This page is only for defining database connections. To run SQL queries, use the Database (JDBC) step inside your testcase.
Usage in Tests
After linking the datasource to the testcase, use column names in the ${column_name} format.
1. Linking Datasource to Testcase
On the testcase detail page, find the Datasource dropdown in the right panel and select the datasource you created.
2. Using Variables
Type Action - Email field
${username}
→ Different email typed on each iteration
Type Action - Password field
${password}
→ Different password typed on each iteration
3. Iteration Example
When test is run with a 3-row Excel datasource:
Variable Syntax Reference
Basic Usage
${column_name}
Uses the datasource column value
Combined with Global Param
${base_url}/users/${user_id}
Combines global and datasource variables
Usage in Assertions
Expected: ${expected_result}
Expected value comes from datasource
Usage in API Steps
{"email": "${email}", "name": "${name}"}
Variables inside JSON body
Best Practices
Meaningful Column Names
Use descriptive names like username, password, expected instead of a, b, c.
Separate Test Data
Use separate datasources or an expected_result column for positive and negative cases.
Environment for Sensitive Data
Store sensitive data like passwords as environment variables, not in datasources.
Too Many Rows
Use 10-50 rows covering meaningful test scenarios instead of 1000+ rows.
Direct Connection to Production DB
Do not connect to production databases; use staging or test DB instead.
Hardcoded Credentials
Do not write API tokens or DB passwords directly; use Global Parameters.