# Katalon Data-Driven Test looping 100 times but stuck using only Row 1 Data

**URL:** <https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083>\
**Category:** Web Testing\
**Created:** [June 24, 2026, 9:25pm UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083 "2026-06-24T21:25:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckutch](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ckutch/32/33811_2.png) [@ckutch](https://forum.katalon.com/u/ckutch)\
**Post date:** [June 24, 2026, 9:25pm UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083/1 "2026-06-24T21:25:45Z")

</div>

Hey everyone, I’m really hitting a wall here and could use some help. I’m trying to set up a data-driven test in Katalon Studio. I have an Excel spreadsheet with 100 different test accounts (usernames, passwords, account numbers) that I need to cycle through to verify our signup flow.

I went into Katalon, created a new Data File under the Object Repository architecture, and successfully imported my Excel sheet. I can see all 100 rows perfectly in the data preview. Next, I went to my Test Suite, added my test case, and associated it with that Excel Data File. I even checked the “Run from row 1 to row 100” option.

When I run the Test Suite, it _looks_ like it’s working because the test case executes exactly 100 times. But here is the problem: every single iteration uses the **exact same data from the very first row**! It’s just logging in with `User_001` over and over again 100 times instead of moving down to row 2, row 3, etc. I tried manually changing the variable types in my script and restarting Katalon, but nothing works. Why isn’t Katalon automatically moving to the next row of data on each iteration? What am I missing?

---

<div class="post-metadata">

**Author:** ![Falak](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/falak/32/33440_2.png) [@Falak](https://forum.katalon.com/u/Falak)\
**Post date:** [June 24, 2026, 9:32pm UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083/2 "2026-06-24T21:32:39Z")

</div>

The reason your test is repeating 100 times using only the first row’s data is a missing link in your configuration: **Data Binding**.

When you add a Data File to a Test Suite, Katalon’s loop engine is triggered to run the test case $N$ times (where $N$ is your number of data rows). However, unless you explicitly tell the Test Suite _which_ Test Case Variables map to _which_ Excel columns, your Test Case script remains hardcoded to its default values or always fetches the static index `1`. Katalon will loop the execution, but it won’t dynamically inject the iterating row data into your script variables without this binding.

#### **The Solution**

To resolve this, you must map your Test Case variables to your Data File columns inside the Test Suite interface:

1. Open your **Test Suite**.

2. Click on the **Show Data Binding** button on the top right of the Test Suite panel.

3. In the **Test Data** section (middle table), add your imported Excel Data File.

4. In the **Variable Binding** section (bottom table), click **Map All** or manually set the **Type** to `Data Column`, select your Excel test data file under **Test Data** , and choose the corresponding Excel column name for each variable.

#### **Helper Function**

If you prefer a highly customizable, script-based approach where you handle data rows programmatically inside your Test Case (instead of letting the Test Suite manage the loop binding), you can use the built-in `TestData` class.

Here is a simple function you can use directly inside your Test Case script to dynamically fetch data for any given row index based on the current loop iteration:

```auto
import com.kms.katalon.core.testdata.TestDataFactory
import com.kms.katalon.core.testdata.TestData

/**
 * Helper method to fetch cell data dynamically from a Katalon Data File
 * @param dataFileName The exact name of the Data File as it appears in your Katalon File Explorer
 * @param columnName The header name of the Excel column
 * @param rowIndex The 1-based index of the row you want to fetch (e.g., inside a loop)
 * @return String value of the cell
 */
def getExcelData(String dataFileName, String columnName, int rowIndex) {
    // Find and load the Data File from Katalon's repository
    TestData data = TestDataFactory.findTestData(dataFileName)
    
    // Fetch and return the specific value
    return data.getValue(columnName, rowIndex)
}

// EXAMPLE USAGE INSIDE A MANUAL LOOP (If not using Test Suite binding):
// int totalRows = TestDataFactory.findTestData("Your_Excel_Data_File_Name").getRowNumbers()
// for (int i = 1; i <= totalRows; i++) {
// String username = getExcelData("Your_Excel_Data_File_Name", "Username_Column", i)
// WebUI.setText(findTestObject('Page_Login/input_Username'), username)
// }

```

---

<div class="post-metadata">

**Author:** ![qurzunta.kaab](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/qurzunta.kaab/32/31470_2.png) [@qurzunta.kaab](https://forum.katalon.com/u/qurzunta.kaab)\
**Post date:** [June 24, 2026, 9:33pm UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083/3 "2026-06-24T21:33:24Z")

</div>

Please have a look:

> [@Is there a way to loop one test case with different data?](https://forum.katalon.com/t/is-there-a-way-to-loop-one-test-case-with-different-data/190338):
>
> I’ve finally finished my test case for creating a new bank account, and it works great! But now my boss wants me to test it across 50 different account types (Savings, Checking, Business, Student, etc.) and different currencies. Right now, the only way I know how to do this is to right-click my test case and “Duplicate” it 50 times, then manually go into each one and change the text in the setText fields. This is taking forever, and I’m already getting confused about which one I’ve updated. Plu…

---

<div class="post-metadata">

**Author:** ![hamzakhan](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@hamzakhan](https://forum.katalon.com/u/hamzakhan)\
**Post date:** [June 25, 2026, 2:00am UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083/4 "2026-06-25T02:00:45Z")

</div>

we can use it for genric purpose ?

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [June 25, 2026, 7:56am UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083/5 "2026-06-25T07:56:53Z")

</div>

## **Fix**

- Open the **Test Suite**.

- Click **Show Data Binding**.

- Add the Excel file in the **Test Data** section.

- In **Variable Binding** , use **Map All** or manually map each variable to its matching Excel column.

- Run the suite again so each iteration receives the correct row values.

## **Alternative approach**

A script-based option using `TestDataFactory.findTestData(...)` and `getValue(columnName, rowIndex)` if you want to manually loop through rows in code instead of relying on suite binding. That approach is useful when you need custom row handling

---

<div class="post-metadata">

**Author:** ![cdare](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cdare](https://forum.katalon.com/u/cdare)\
**Post date:** [June 25, 2026, 11:08am UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083/6 "2026-06-25T11:08:42Z")

</div>

> [@Falak](#):
>
> 1. In the **Variable Binding** section (bottom table), click **Map All** or manually set the **Type** to `Data Column`, select your Excel test data file under **Test Data** , and choose the corresponding Excel column name for each variable.

it will solve if you dont want dynamic option

---

<div class="post-metadata">

**Author:** ![tdenesik](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@tdenesik](https://forum.katalon.com/u/tdenesik)\
**Post date:** [June 25, 2026, 11:39am UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083/7 "2026-06-25T11:39:32Z")

</div>

yes, you can customize it using keyword as well

---

<div class="post-metadata">

**Author:** ![kruecker](https://avatars.discourse-cdn.com/v4/letter/k/b9e5f3/32.png) [@kruecker](https://forum.katalon.com/u/kruecker)\
**Post date:** [June 26, 2026, 9:08am UTC](https://forum.katalon.com/t/katalon-data-driven-test-looping-100-times-but-stuck-using-only-row-1-data/192083/8 "2026-06-26T09:08:47Z")

</div>

Useful question …
