runFeatureFile() fails with StepFailedException on .feature file execution in Katalon Studio 10.3.2

Hello, I’m encountering a persistent issue when executing a BDD test using runFeatureFile() in Katalon Studio version 10.3.2.

The test case fails with the following exception:

com.kms.katalon.core.exception.StepFailedException: Feature file ‘Include/features/Test.feature’ was failed
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:51)

at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:74)

Steps I’ve already verified:

  • The .feature file is correctly located at Include/features/Test.feature

  • The glue code is in Include/scripts/groovy/stepDefinitions/TestStepDefinition.groovy with the package stepDefinitions

  • Step definitions use cucumber.api.java.en.Given/When/Then and match the .feature file exactly

  • Auto-build is enabled (Project > Build Automatically)

  • I’ve cleaned the project by deleting bin/, Libs/, .classpath, and .project

  • The plugin “Cucumber for Groovy” is not visible in the Katalon Store, so I assume it’s integrated in version 10.3.2

Despite all this, the test consistently fails with StepFailedException.

Can you confirm whether BDD/Cucumber support is fully functional in Katalon Studio 10.3.2?

  1. Is there a way to verify whether glue code is being registered correctly?
  2. Could you provide a working sample project to test the environment?
2 Likes

To force a verification, you can deliberately introduce a typo into a step in your .feature file. If the error message changes from the generic failure to a specific “step is undefined” error, you know the connection is working for the other steps.

1 Like
  1. Make sure your feature file resides under:

text

Include/features/Test.feature
  1. Make sure your step definition file resides at:

text

Include/scripts/groovy/stepDefinitions/TestStepDefinition.groovy
  1. Check the package and imports:

groovy

package stepDefinitions
import cucumber.api.java.en.Given
import cucumber.api.java.en.When
import cucumber.api.java.en.Then
  1. Create a Katalon Test Case (e.g., RunCucumberTest) containing:

groovy

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFile('Include/features/Test.feature')
  1. Enable Project > Build Automatically
    This ensures that glue code compiles every time before execution.
  2. If still failing — run this cleaning sequence:
  • Close Katalon Studio.
  • Delete Libs/, .project, .classpath, and bin/ folder.
  • Reopen Katalon Studio and rebuild automatically.

:magnifying_glass_tilted_right: Verify Cucumber Setup

To confirm your environment supports BDD correctly:


  • Katalon 10.3.2 includes native BDD integration with Cucumber Hooks and Cucumber Runner support—no need to manually add libraries.​
  • Referencing incorrect package names or leaving trailing build artifacts are the two most frequent reasons for StepFailedException.

:white_check_mark: Working Pattern Summary

Component Location / Example
Feature file Include/features/Login.feature
Definition file Include/scripts/groovy/stepDefinitions/LoginSteps.groovy
Package declaration package stepDefinitions
Test case call CucumberKW.runFeatureFile('Include/features/Login.feature')

If your setup matches these paths and it still fails, download the official BDD sample project from GitHub, run it in 10.3.2, and compare the folder and package structure directly against your project layout.​


error indicates Katalon cannot locate or match glue code, often due to package mismatch or build cache issues.

1 Like

Hi @teamqautomation,

Welcome to our community. Have you got your problem solved? If yes, feel free to share the workaround. If no, please help provide any follow-up information so that we can better support. Thank you

1 Like

You trimmed the stack trace short. You cut off the part of “Reason: …” that should tell why the failure was caused.

Please post the full (untrimmed) stack trace here.

Please use the “Code Formatting” style to make the quoted code readable.

1 Like