Skip to main content

[Cucumber] Run Feature Folder

Description​

Execute multiple feature files stored in the same features folder.

Keyword name: runFeatureFolder

Keyword syntax: runFeatureFolder(folderRelativePath, cucumberRunOptions, flowControl)

Parameter​

ParameterParameter TypeRequiredDescription
folderRelativePathStringYesThe folder relative path starts from the current project location. To rerun failed scenarios, provide the path to your rerun file prefixed with @ (e.g., @rerun.txt).
cucumberRunOptionsMapNoA map of options to configure the Cucumber execution. Use failedTestFilePath to specify a file path where failed scenarios will be saved.
flowControlFailureHandlingOptionalControls the execution flow if the step fails. Specify failure handling schema to determine whether the execution should be allowed to continue or stop.

Returns​

An instance of CucumberRunnerResult that includes the status of keyword and report folder location.

Example​

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling

// Run all features in a folder
CucumberKW.runFeatureFolder('Include/features', [failedTestFilePath: 'failed-all-features.txt'], FailureHandling.STOP_ON_FAILURE)
Was this page helpful?