class CucumberBuiltinKeywords extends com.kms.katalon.core.keyword.BuiltinKeywords
| Fields inherited from class | Fields |
|---|---|
class com.kms.katalon.core.keyword.BuiltinKeywords |
__$stMC |
| Constructor and description |
|---|
CucumberBuiltinKeywords
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static CucumberRunnerResult |
runFeatureFile(String relativeFilePath, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given Feature file with featureId by invoking
cucumber.api.cli.Main#run(String[], ClassLoader).
|
|
static CucumberRunnerResult |
runFeatureFile(String relativeFilePath, Map cucumberRunOptions, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given Feature file with optional rerun file generation. |
|
static CucumberRunnerResult |
runFeatureFile(String relativeFilePath)Runs the given Feature file with featureId by invoking
cucumber.api.cli.Main#run(String[], ClassLoader).
|
|
static CucumberRunnerResult |
runFeatureFile(String relativeFilePath, Map cucumberRunOptions)Runs the given Feature file with optional rerun file generation. |
|
static CucumberRunnerResult |
runFeatureFileWithTags(String relativeFilePath, String[] tags, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given Feature file with featureId by invoking
cucumber.api.cli.Main#run(String[], ClassLoader).
|
|
static CucumberRunnerResult |
runFeatureFileWithTags(String relativeFilePath, String[] tags, Map cucumberRunOptions, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given Feature file with tags and optional rerun file generation. |
|
static CucumberRunnerResult |
runFeatureFileWithTags(String relativeFilePath, String[] tags)Runs the given Feature file with featureId by invoking
cucumber.api.cli.Main#run(String[], ClassLoader).
|
|
static CucumberRunnerResult |
runFeatureFileWithTags(String relativeFilePath, String[] tags, Map cucumberRunOptions)Runs the given Feature file with tags and optional rerun file generation. |
|
static CucumberRunnerResult |
runFeatureFolder(String folderRelativePath, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given Feature folder and its nested sub-folder with folderRelativePath
by invoking cucumber.api.cli.Main#run(String[], ClassLoader).
|
|
static CucumberRunnerResult |
runFeatureFolder(String folderRelativePath, Map cucumberRunOptions, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given Feature folder and its nested sub-folder with optional rerun file generation. |
|
static CucumberRunnerResult |
runFeatureFolder(String folderRelativePath)Runs the given Feature folder and its nested sub-folder with folderRelativePath
by invoking cucumber.api.cli.Main#run(String[], ClassLoader).
|
|
static CucumberRunnerResult |
runFeatureFolder(String folderRelativePath, Map cucumberRunOptions)Runs the given Feature folder with optional rerun file generation. |
|
static CucumberRunnerResult |
runFeatureFolderWithTags(String folderRelativePath, String[] tags, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given Feature folder and its nested sub-folder with folderRelativePath
by invoking cucumber.api.cli.Main#run(String[], ClassLoader).
|
|
static CucumberRunnerResult |
runFeatureFolderWithTags(String folderRelativePath, String[] tags, Map cucumberRunOptions, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given Feature folder and its nested sub-folder with tags and optional rerun file generation. |
|
static CucumberRunnerResult |
runFeatureFolderWithTags(String folderRelativePath, String[] tags)Runs the given Feature folder and its nested sub-folder with folderRelativePath
by invoking cucumber.api.cli.Main#run(String[], ClassLoader)
The generated reports will be extracted in the current report folder with the following path: <report_folder>/cucumber_report/<current_time_stamp> |
|
static CucumberRunnerResult |
runFeatureFolderWithTags(String folderRelativePath, String[] tags, Map cucumberRunOptions)Runs the given Feature folder with tags and optional rerun file generation. |
|
static CucumberRunnerResult |
runWithCucumberRunner(Class cucumberRunnerClass, com.kms.katalon.core.model.FailureHandling flowControl)Runs the given cucumberRunnerClass that is annotated with Cucumber runner by invoke JUnit
runner. |
|
static CucumberRunnerResult |
runWithCucumberRunner(Class cucumberRunnerClass)Runs the given cucumberRunnerClass that is annotated with Cucumber runner by invoke JUnit
runner. |
| Methods inherited from class | Name |
|---|---|
class com.kms.katalon.core.keyword.BuiltinKeywords |
com.kms.katalon.core.keyword.BuiltinKeywords#delay(java.lang.Number), com.kms.katalon.core.keyword.BuiltinKeywords#delay(java.lang.Number, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#comment(java.lang.String), com.kms.katalon.core.keyword.BuiltinKeywords#verifyMatch(java.lang.String, java.lang.String, boolean, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#verifyMatch(java.lang.String, java.lang.String, boolean), com.kms.katalon.core.keyword.BuiltinKeywords#verifyNotMatch(java.lang.String, java.lang.String, boolean, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#verifyNotMatch(java.lang.String, java.lang.String, boolean), com.kms.katalon.core.keyword.BuiltinKeywords#verifyEqual(java.lang.Object, java.lang.Object), com.kms.katalon.core.keyword.BuiltinKeywords#verifyEqual(java.lang.Object, java.lang.Object, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#verifyNotEqual(java.lang.Object, java.lang.Object, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#verifyNotEqual(java.lang.Object, java.lang.Object), com.kms.katalon.core.keyword.BuiltinKeywords#verifyGreaterThan(java.lang.Object, java.lang.Object, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#verifyGreaterThan(java.lang.Object, java.lang.Object), com.kms.katalon.core.keyword.BuiltinKeywords#verifyGreaterThanOrEqual(java.lang.Object, java.lang.Object, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#verifyGreaterThanOrEqual(java.lang.Object, java.lang.Object), com.kms.katalon.core.keyword.BuiltinKeywords#verifyLessThan(java.lang.Object, java.lang.Object, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#verifyLessThan(java.lang.Object, java.lang.Object), com.kms.katalon.core.keyword.BuiltinKeywords#verifyLessThanOrEqual(java.lang.Object, java.lang.Object, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#verifyLessThanOrEqual(java.lang.Object, java.lang.Object), com.kms.katalon.core.keyword.BuiltinKeywords#verifyCheckpoint(com.kms.katalon.core.checkpoint.Checkpoint, boolean), com.kms.katalon.core.keyword.BuiltinKeywords#verifyCheckpoint(com.kms.katalon.core.checkpoint.Checkpoint, boolean, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#getMetaClass(), com.kms.katalon.core.keyword.BuiltinKeywords#setMetaClass(groovy.lang.MetaClass), com.kms.katalon.core.keyword.BuiltinKeywords#callTestCase(com.kms.katalon.core.testcase.TestCase, java.util.Map), com.kms.katalon.core.keyword.BuiltinKeywords#callTestCase(com.kms.katalon.core.testcase.TestCase, java.util.Map, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#concatenate([Ljava.lang.String;, com.kms.katalon.core.model.FailureHandling), com.kms.katalon.core.keyword.BuiltinKeywords#concatenate([Ljava.lang.String;), com.kms.katalon.core.keyword.BuiltinKeywords#equals(java.lang.Object), com.kms.katalon.core.keyword.BuiltinKeywords#toString(), com.kms.katalon.core.keyword.BuiltinKeywords#hashCode(), com.kms.katalon.core.keyword.BuiltinKeywords#getClass(), com.kms.katalon.core.keyword.BuiltinKeywords#notify(), com.kms.katalon.core.keyword.BuiltinKeywords#notifyAll(), com.kms.katalon.core.keyword.BuiltinKeywords#wait(long), com.kms.katalon.core.keyword.BuiltinKeywords#wait(long, int), com.kms.katalon.core.keyword.BuiltinKeywords#wait(), com.kms.katalon.core.keyword.BuiltinKeywords#getProperty(java.lang.String), com.kms.katalon.core.keyword.BuiltinKeywords#setProperty(java.lang.String, java.lang.Object), com.kms.katalon.core.keyword.BuiltinKeywords#invokeMethod(java.lang.String, java.lang.Object) |
Runs the given Feature file with featureId by invoking
cucumber.api.cli.Main#run(String[], ClassLoader).
If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
<report_folder>/cucumber_report/<current_time_stamp>
Examples:
- Example #1: Run a single feature file
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFile('Include/features/New Feature File.feature', FailureHandling.STOP_ON_FAILURE)
- Example #2: Run a single feature file and the step definitions is in pre-defined packages
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFile('Include/features/New Feature File.feature', FailureHandling.STOP_ON_FAILURE)
- Parameters:
relativeFilePath - relativeFilePath of Feature fileflowControl - an instance com.kms.katalon.core.model.FailureHandling that controls the running flow
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 5.7
- See Also:
- CucumberRunnerResult
Runs the given Feature file with optional rerun file generation. If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
The generated reports will be extracted in the current report folder with the following path:<report_folder>/cucumber_report/<current_time_stamp>
Examples:
- Example #1: Run a single feature file with rerun file generation
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFile('Include/features/operations/New Feature File 1.feature',
[failedTestFilePath: 'failed-new-testcase.txt'],
FailureHandling.CONTINUE_ON_FAILURE)
- Example #2: Rerun failed scenarios from a previous execution
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
// Use @ prefix to run from rerun file
CucumberKW.runFeatureFile('@failed-new-testcase.txt',
[failedTestFilePath: 'failed-new-testcase-2.txt'])
- Example #3: Run with custom glue path
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFile('Include/features/New Feature File.feature',
[failedTestFilePath: 'Include/features/rerun.txt'],
FailureHandling.STOP_ON_FAILURE)
@path/to/rerun.txt to rerun failed scenarios - Parameters:
relativeFilePath - relativeFilePath of Feature file, orcucumberRunOptions - optional map containing execution options (e.g., [failedTestFilePath: 'path/to/rerun.txt'])flowControl - an instance com.kms.katalon.core.model.FailureHandling that controls the running flow
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 11.0.0
- See Also:
- CucumberRunnerResult
Runs the given Feature file with featureId by invoking
cucumber.api.cli.Main#run(String[], ClassLoader).
If your step definitions are in packages, you can set glue path to help system can detect your step definitions
path easier.
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFile('Include/features/New Feature File.feature')
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFile('Include/features/New Feature File.feature')
relativeFilePath - relativeFilePath of Feature fileRuns the given Feature file with optional rerun file generation. If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
Examples:
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFile('Include/features/operations/New Feature File 1.feature',
[failedTestFilePath: 'failed-new-testcase.txt'])
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
// Use @ prefix to run from rerun file
CucumberKW.runFeatureFile('@failed-new-testcase.txt',
[failedTestFilePath: 'failed-new-testcase-2.txt'])
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFile('Include/features/New Feature File.feature', null)
relativeFilePath - relativeFilePath of Feature file, orcucumberRunOptions - optional map containing execution options (e.g., [failedTestFilePath: 'path/to/rerun.txt']) Runs the given Feature file with featureId by invoking
cucumber.api.cli.Main#run(String[], ClassLoader).
If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
<report_folder>/cucumber_report/<current_time_stamp>
Examples:
- Example #1: Run a single feature file with selected tags
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFileWithTags('Include/features/New Feature File.feature', ['@foo', 'not @bar'] as [], FailureHandling.STOP_ON_FAILURE)
- Example #2: Run a single feature file with selected tags and the step definitions is in pre-defined packages
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFileWithTags('Include/features/New Feature File.feature', ['@foo', 'not @bar'] as [], FailureHandling.STOP_ON_FAILURE)
@bar']: Select all foo tags but not bar tags - Parameters:
relativeFilePath - relativeFilePath of the feature filetags - what tags in the features should be executed. Eg: ['@foo', 'notflowControl - an instance com.kms.katalon.core.model.FailureHandling that controls the running flow
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 7.0.0
- See Also:
- CucumberRunnerResult
Runs the given Feature file with tags and optional rerun file generation. If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
The generated reports will be extracted in the current report folder with the following path:<report_folder>/cucumber_report/<current_time_stamp>
Examples:
- Example #1: Run a single feature file with tags and rerun file generation
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFileWithTags('Include/features/operations/New Feature File 1.feature',
['@smoke', 'not @slow'] as String[],
[failedTestFilePath: 'failed-new-testcase.txt'],
FailureHandling.CONTINUE_ON_FAILURE)
- Example #2: Rerun failed scenarios with tags
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
// Use @ prefix to run from rerun file
CucumberKW.runFeatureFileWithTags('@failed-new-testcase.txt',
['@smoke'] as String[],
[failedTestFilePath: 'failed-new-testcase-2.txt'])
- Example #3: Run with tags without rerun file
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFileWithTags('Include/features/New Feature File.feature',
['@foo', 'not @bar'] as String[],
null,
FailureHandling.STOP_ON_FAILURE)
@path/to/rerun.txt to rerun failed scenarios @bar']: Select all foo tags but not bar tags - Parameters:
relativeFilePath - relativeFilePath of the feature file, ortags - what tags in the features should be executed. Eg: ['@foo', 'notcucumberRunOptions - optional map containing execution options (e.g., [failedTestFilePath: 'path/to/rerun.txt'])flowControl - an instance com.kms.katalon.core.model.FailureHandling that controls the running flow
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 11.0.0
- See Also:
- CucumberRunnerResult
Runs the given Feature file with featureId by invoking
cucumber.api.cli.Main#run(String[], ClassLoader).
If your step definitions are in packages, you can set glue path to help system can detect your step definitions
path easier.
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFileWithTags('Include/features/New Feature File.feature', ["@foo", "not @bar"] as [])
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFileWithTags('Include/features/New Feature File.feature', ["@foo", "not @bar"] as [])
relativeFilePath - relativeFilePath of Feature filetags - what tags in the features should be executed. Eg: ['@foo', 'notRuns the given Feature file with tags and optional rerun file generation. If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFileWithTags('Include/features/operations/New Feature File 1.feature',
['@smoke', 'not @slow'] as String[],
[failedTestFilePath: 'failed-new-testcase.txt'])
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFileWithTags('@failed-new-testcase.txt',
['@smoke'] as String[],
[failedTestFilePath: 'failed-new-testcase-2.txt'])
relativeFilePath - relativeFilePath of Feature file, ortags - what tags in the features should be executed. Eg: ['@foo', 'notcucumberRunOptions - optional map containing execution options (e.g., [failedTestFilePath: 'path/to/rerun.txt']) Runs the given Feature folder and its nested sub-folder with folderRelativePath
by invoking cucumber.api.cli.Main#run(String[], ClassLoader).
If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
<report_folder>/cucumber_report/<current_time_stamp>
Examples:
- Example #1: Run all features file in the specified folder
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFolder('Include/features', FailureHandling.STOP_ON_FAILURE)
- Example #2: Run all features file in the specified folder and the step definitions is in pre-defined packages
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFolder('Include/features', FailureHandling.STOP_ON_FAILURE)
- Parameters:
folderRelativePath - folder relative path that starts from the current project locationflowControl - an instance com.kms.katalon.core.model.FailureHandling that controls the running flow
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 5.7
Runs the given Feature folder and its nested sub-folder with optional rerun file generation. If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
The generated reports will be extracted in the current report folder with the following path:<report_folder>/cucumber_report/<current_time_stamp>
Examples:
- Example #1: Run all features file in the specified folder with rerun file generation
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFolder('Include/features',
[failedTestFilePath: 'failed-features.txt'],
FailureHandling.STOP_ON_FAILURE)
- Example #2: Rerun failed scenarios from previous folder execution
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFolder('@failed-features.txt',
[failedTestFilePath: 'failed-features-2.txt'])
- Example #3: Run all features file without rerun file
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFolder('Include/features', null, FailureHandling.STOP_ON_FAILURE)
@path/to/rerun.txt to rerun failed scenarios - Parameters:
folderRelativePath - folder relative path that starts from the current project location, orcucumberRunOptions - optional map containing execution options (e.g., [failedTestFilePath: 'path/to/rerun.txt'])flowControl - an instance com.kms.katalon.core.model.FailureHandling that controls the running flow
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 11.0.0
Runs the given Feature folder and its nested sub-folder with folderRelativePath
by invoking cucumber.api.cli.Main#run(String[], ClassLoader).
If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFolder('Include/features')
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFolder('Include/features')
folderRelativePath - folder relative path that starts from current project locationRuns the given Feature folder with optional rerun file generation. If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
Examples:
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFolder('Include/features',
[failedTestFilePath: 'failed-features.txt'])
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFolder('@failed-features.txt',
[failedTestFilePath: 'failed-features-2.txt'])
folderRelativePath - folder relative path that starts from current project location, orcucumberRunOptions - optional map containing execution options (e.g., [failedTestFilePath: 'path/to/rerun.txt']) Runs the given Feature folder and its nested sub-folder with folderRelativePath
by invoking cucumber.api.cli.Main#run(String[], ClassLoader).
<report_folder>/cucumber_report/<current_time_stamp>
- Example #1: Run a single feature file with selected tags
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFolderWithTags('Include/features', ["@foo", "not @bar"] as [], FailureHandling.STOP_ON_FAILURE)
- Example #2: Run a single feature file with selected tags and the step definitions is in pre-defined packages
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFolderWithTags('Include/features', ["@foo", "not @bar"] as [], FailureHandling.STOP_ON_FAILURE)
@bar']: Select all foo tags but not bar tags - Parameters:
folderRelativePath - folder relative path that starts from the current project locationtags - what tags in the features should be executed. Eg: ['@foo', 'notflowControl - an instance com.kms.katalon.core.model.FailureHandling that controls the running flow
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 7.0.0
Runs the given Feature folder and its nested sub-folder with tags and optional rerun file generation.
The generated reports will be extracted in the current report folder with the following path:<report_folder>/cucumber_report/<current_time_stamp>
- Example #1: Run feature folder with tags and rerun file generation
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFolderWithTags('Include/features',
['@smoke', 'not @slow'] as String[],
[failedTestFilePath: 'failed-features.txt'],
FailureHandling.STOP_ON_FAILURE)
- Example #2: Rerun failed scenarios from folder with tags
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFolderWithTags('@failed-features.txt',
['@smoke'] as String[],
[failedTestFilePath: 'failed-features-2.txt'])
- Example #3: Run feature folder with tags without rerun file
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.model.FailureHandling
CucumberKW.runFeatureFolderWithTags('Include/features',
['@foo', 'not @bar'] as String[],
null,
FailureHandling.STOP_ON_FAILURE)
@path/to/rerun.txt to rerun failed scenarios @bar']: Select all foo tags but not bar tags - Parameters:
folderRelativePath - folder relative path that starts from the current project location, ortags - what tags in the features should be executed. Eg: ['@foo', 'notcucumberRunOptions - optional map containing execution options (e.g., [failedTestFilePath: 'path/to/rerun.txt'])flowControl - an instance com.kms.katalon.core.model.FailureHandling that controls the running flow
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 11.0.0
Runs the given Feature folder and its nested sub-folder with folderRelativePath
by invoking cucumber.api.cli.Main#run(String[], ClassLoader)
<report_folder>/cucumber_report/<current_time_stamp>
- Example #1: Run a single feature file with selected tags
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFolderWithTags('Include/features', ["@foo", "not @bar"] as [])
- Example #2: Run a single feature file with selected tags and the step definitions is in pre-defined packages
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.GLUE = ['mypackage1', 'mypackage2']
CucumberKW.runFeatureFolderWithTags('Include/features', ["@foo", "not @bar"] as [])
@bar']: Select all foo tags but not bar tags - Parameters:
folderRelativePath - folder relative path that starts from current project locationtags - what tags in the features should be executed. Eg: ['@foo', 'not
- Returns:
- an instance of CucumberRunnerResult that includes status of keyword and report folder location.
- Since:
- 7.0.0
Runs the given Feature folder with tags and optional rerun file generation. If your step definitions are in packages, you can set glue path to help system can detect your step definitions path easier.
Examples:
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFolderWithTags('Include/features',
['@smoke', 'not @slow'] as String[],
[failedTestFilePath: 'failed-features.txt'])
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFolderWithTags('@failed-features.txt',
['@smoke'] as String[],
[failedTestFilePath: 'failed-features-2.txt'])
folderRelativePath - folder relative path that starts from current project location, ortags - what tags in the features should be executed. Eg: ['@foo', 'notcucumberRunOptions - optional map containing execution options (e.g., [failedTestFilePath: 'path/to/rerun.txt']) Runs the given cucumberRunnerClass that is annotated with Cucumber runner by invoke JUnit
runner.
cucumberRunnerClass
- a class that is annotated with Cucumber runner.
Example of cucumberRunnerClass:
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features = "Include/features", glue = "")
public class MyCucumberRunner {}
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features = "Your_Folder_Or_File_Path", glue = "")
public class MyCucumberRunner {}
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features="Your_Folder_Path", glue="", plugin = ["pretty",
"junit:Folder_Name/cucumber.xml"])
public class MyCucumberRunner {
}
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features="Your_Folder_Path", glue="", plugin = ["pretty",
"junit:Folder_Name/cucumber.xml",
"html:Folder_Name"])
public class MyCucumberRunner {
}
flowControl
- an instance com.kms.katalon.core.model.FailureHandling that controls the running flow Runs the given cucumberRunnerClass that is annotated with Cucumber runner by invoke JUnit
runner.
cucumberRunnerClass
- a class that is annotated with Cucumber runner.
Example of cucumberRunnerClass:
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features = "Include/features", glue = "")
public class MyCucumberRunner {}
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features = "Your_Folder_Or_File_Path", glue = "")
public class MyCucumberRunner {}
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features="Your_Folder_Path", glue="", plugin = ["pretty",
"junit:Folder_Name/cucumber.xml"])
public class MyCucumberRunner {
}
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features="Your_Folder_Path", glue="", plugin = ["pretty",
"junit:Folder_Name/cucumber.xml",
"html:Folder_Name"])
public class MyCucumberRunner {
}