Issue with @After hook for cucumber feature file


I think there is an issue with latest version of Katalon.
I am using v5.10.1 and I use Cucumber feature.

I have created as Step definition, a class named Hook where I use a @After tag to reset my app:

import as Mobile
import com.kms.katalon.core.model.FailureHandling
import internal.GlobalVariable

class Hooks {


  • Hooks for feature files.
  • Reset application after the end of each scenario

def resetApp() {
My code

In my feature file I have two scenari.
When the first scenario is finished, After tag is trying to be executed. and Scenario failed with java.lang.UnsupportedOperationException
If I remove this after tag, scenario is finished with Success.

This is the stacktrace:

runFeatureFile(“Include/features/Sliders.feature”) FAILED.


com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.UnsupportedOperationException)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:32)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:56)
at com.kms.katalon.core.keyword.internal.KeywordMain$ Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:46)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile$0.callStatic(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:101)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$ Source)
at Slider Runner:3)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(
at com.kms.katalon.core.main.TestCaseExecutor.runScript(
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(
at com.kms.katalon.core.main.TestCaseExecutor.execute(
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(
at com.kms.katalon.core.main.TestSuiteExecutor.execute(
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$ Source)

It was correctly working with version 5.8.6. I have upgraded from 5.8.6 to 5.10.1 and does not work anymore.
I cannot find anything talking about some changes on this behavior on release notes.

1 Like

I am having the exact same issue using @Before

@Alice please take a look.


Any news on this issue? could we expect a fix soon or should I use an old Katalon IDE version?

Up … I have same issue, Any update guys ?

I am having same isue

Hi @quentin, @brian.mcleod, @ibnu.hazar

Please let us know if the Katalon Studio v6.0.5 has resolved this issue.


Yes thank you, issue is solved in 6.0.5!

1 Like

i don’t konw how to use after step in feature , can you share the detail , thanks.