My test is trying to log in using the column headers "Username" and "Password"!

Hi everyone, I’m trying to set up Data-Driven Testing in Katalon Studio. I created a simple Excel sheet where the first row has my column names (Username, Password) and the rows below have my actual test account info.

I imported the file into the Data Files section, but when I run my Test Suite, the very first iteration fails. I looked at the logs, and Katalon is literally typing the word “Username” into the login box and “Password” into the password box! It’s treating my titles like they are real user data.

I tried deleting the top row in Excel, but then the “Data Binding” screen in Katalon just shows Column1 and Column2, which makes it really hard to map my variables. How do I tell Katalon that the first row is just for labels and shouldn’t be used in the actual test steps?

Did you check the below checkbox in the data binding option?

Here is the solution:
Open your Data File: Go to the “Data Files” folder in your Object Repository/Tests Explorer and double-click your Excel data object.
Screenshot attached:

Also you need to check for hidden rows.
you can also log the entire data in console to see the details.
Also dont use index instead use column name for refering to data.

My some rows were hidden based on Filter applied in User Type and yes unchecking solve it. How can i solve user type let say i want to login custom in one case and in second case i want to login admin to approve the customer request do i need to have seprate login files

In a mature automation framework, we avoid splitting files because it creates a maintenance burden. Instead, we use Data Filtering Logic.

Katalon Studio’s default Data-Driven execution is “Linear” (it reads every row). To bypass this, we can use two professional approaches: Internal Script Filtering (skipping rows dynamically) or Test Suite Row Selection.

The Solution 1: The “Row Range” (No Code)

If your Excel is sorted (e.g., rows 1-10 are Customers, 11-20 are Admins), you don’t need code.

  1. Open your Test Suite.

  2. Click Show Data Binding.

  3. In the Data Iteration column, click the “…” or “All” link.

  4. Select Sub-section and enter the specific row range (e.g., 1-10).

The Solution 2: The “Conditional Skip” (Pro Scripting)

If your users are mixed throughout the sheet, use a conditional check at the beginning of your Test Case. If the row doesn’t match the required type, we tell Katalon to skip it.

Custom Keyword: The Row Filter

This keyword allows you to define a “Required Type” at the start of your test.

Groovy

package com.data.filter

import com.kms.katalon.core.annotation.Keyword
import com.kms.katalon.core.util.KeywordUtil
import com.kms.katalon.core.model.FailureHandling

public class DataFilter {

    /**
     * Skips the test iteration if the data doesn't match the required user type
     * @param actualType The value from your Excel 'UserType' column
     * @param requiredType The type you want to run (e.g., "Customer")
     */
    @Keyword
    def runOnlyForType(String actualType, String requiredType) {
        if (!actualType.equalsIgnoreCase(requiredType)) {
            // This marks the test as 'Passed' but stops execution for this row
            // effectively "skipping" the logic without failing the suite.
            KeywordUtil.logInfo("Skipping row: User is ${actualType}, but we need ${requiredType}")
            
            // We use a custom flag or just wrap your test logic in an IF statement
            return false 
        }
        return true
    }
}

How to use it in your script:

At the very top of your Test Case, wrap your code in an if statement using the keyword:

Groovy

// 'UserType' is the variable mapped to your Excel column
if (CustomKeywords.'com.data.filter.DataFilter.runOnlyForType'(UserType, "Customer")) {
    
    // Put all your login and test logic here...
    WebUI.callTestCase(findTestCase('Login'), [('username') : Username, ('password') : Password])
    
}

Let me test it.

Are you still facing the issue

hi @rkozey

open your Data File in the Data Files explorer and look for the “Use first row as header” checkbox in the editor. Make sure it is checked. When this is enabled, Katalon uses the first row for column naming in the Data Binding screen and starts reading actual data from row 2. If it is unchecked, Katalon treats every row including the header as test data, which is exactly the behavior you are seeing.

if you do not see that option, try re-creating the Data File and selecting the Excel file again. In Katalon Studio 8.x and later, this option appears in the data file configuration panel when you first import the file.