Skip to main content

Implicit Values

The following values are implicitly available to all feature and meta files at runtime by reference and interpolation.

Feature Level

gwen.feature.file.name

The current feature file name including file extension.

gwen.feature.file.simpleName

The current feature file name excluding file extension.

gwen.feature.file.path

The current feature file path (as provided to Gwen on command line).

gwen.feature.file.absolutePath

The current absolute feature file path.

gwen.feature.language

The current language used in the feature.

gwen.feature.name

The current feature name (as specified in Feature clause).

gwen.eval.status.keyword

Or since v3.70.0:

gwen.feature.eval.status.keyword

The current evaluation status (Pending, Passed or Failed).

gwen.eval.status.keyword.upperCased

Or since v3.70.0:

gwen.feature.eval.status.keyword.upperCased

The current evaluation status in upper case (PENDING, PASSED or FAILED).

gwen.eval.status.keyword.lowerCased

Or since v3.70.0:

gwen.feature.eval.status.keyword.lowerCased

The current evaluation status in lower case (pending, passed or failed).

gwen.eval.status.isPassed

Or since v3.70.0:

gwen.feature.eval.status.isPassed

true if the current evaluation status is not Failed, false otherwise.

gwen.eval.status.isFailed

Or since v3.70.0:

gwen.feature.eval.status.isFailed

true if the current evaluation status is Failed, false otherwise.

gwen.eval.status.message

Or since v3.70.0:

gwen.feature.eval.status.message

The current evaluation status message if the evaluation status is Failed, blank otherwise.

gwen.eval.status.message.escaped

Or since v3.70.0:

gwen.feature.eval.status.message.escaped

The current evaluation status message with all new line and special characters escaped (using Java escaping rules). Non blank if the evaluation status is Failed, blank otherwise.

gwen.eval.duration

Or since v3.70.0:

gwen.feature.eval.duration

Provides access the elapsed duration since the beginning of a feature execution in human readable format. Example: 12s 345ms

gwen.eval.duration.msecs

Or since v3.70.0:

gwen.feature.eval.duration.msecs

Provides access the elapsed duration since the beginning of a feature execution in milliseconds.

gwen.eval.duration.secs

Or since v3.70.0:

gwen.feature.eval.duration.secs

Provides access the elapsed duration since the beginning of a feature execution in seconds.

Rule Level

gwen.rule.name

The current rule name (as specified in Rule clause).

gwen.rule.eval.status.keyword

The current rule level evaluation status (Pending, Passed or Failed).

gwen.rule.eval.status.keyword.upperCased

The current rule level evaluation status in upper case (PENDING, PASSED or FAILED).

gwen.rule.eval.status.keyword.lowerCased

The current rule level evaluation status in lower case (pending, passed or failed).

gwen.rule.eval.status.isPassed

true if the rule scenario level evaluation status is not Failed, false otherwise.

gwen.rule.eval.status.isFailed

true if rule level the current evaluation status is Failed, false otherwise.

gwen.rule.eval.status.message

The current rule level evaluation status message if the evaluation status is Failed, blank otherwise.

gwen.rule.eval.status.message.escaped

The current rule level evaluation status message with all new line and special characters escaped (using Java escaping rules). Non blank if the evaluation status is Failed, blank otherwise.

gwen.rule.eval.duration

Provides access the elapsed duration since the beginning of a rule execution in human readable format. Example: 12s 345ms

gwen.rule.eval.duration.msecs

Provides access the elapsed duration since the beginning of a rule execution in milliseconds.

gwen.rule.eval.duration.secs

Provides access the elapsed duration since the beginning of a rule execution in seconds.

Scenario Level

gwen.scenario.name

The current scenario name (as specified in Scenario clause).

gwen.scenario.eval.status.keyword

The current scenario level evaluation status (Pending, Passed or Failed).

gwen.scenario.eval.status.keyword.upperCased

The current scenario level evaluation status in upper case (PENDING, PASSED or FAILED).

gwen.scenario.eval.status.keyword.lowerCased

The current scenario level evaluation status in lower case (pending, passed or failed).

gwen.scenario.eval.status.isPassed

true if the current scenario level evaluation status is not Failed, false otherwise.

gwen.scenario.eval.status.isFailed

true if scenario level the current evaluation status is Failed, false otherwise.

gwen.scenario.eval.status.message

The current scenario level evaluation status message if the evaluation status is Failed, blank otherwise.

gwen.scenario.eval.status.message.escaped

The current scenario level evaluation status message with all new line and special characters escaped (using Java escaping rules). Non blank if the evaluation status is Failed, blank otherwise.

gwen.scenario.eval.duration

Provides access the elapsed duration since the beginning of a scenario execution in human readable format. Example: 12s 345ms

gwen.scenario.eval.duration.msecs

Provides access the elapsed duration since the beginning of a scenario execution in milliseconds.

gwen.scenario.eval.duration.secs

Provides access the elapsed duration since the beginning of a scenario execution in seconds.

StepDef Level

gwen.stepDef.name

The currently executing StepDef name (as resolved at runtime).

gwen.stepDef.eval.status.keyword

The current StepDef level evaluation status (Pending, Passed or Failed).

gwen.stepDef.eval.status.keyword.upperCased

The current StepDef level evaluation status in upper case (PENDING, PASSED or FAILED).

gwen.stepDef.eval.status.keyword.lowerCased

The current StepDef level evaluation status in lower case (pending, passed or failed).

gwen.stepDef.eval.status.isPassed

true if the current StepDef level evaluation status is not Failed, false otherwise.

gwen.stepDef.eval.status.isFailed

true if StepDef level the current evaluation status is Failed, false otherwise.

gwen.stepDef.eval.status.message

The current StepDef level evaluation status message if the evaluation status is Failed, blank otherwise.

gwen.stepDef.eval.status.message.escaped

The current StepDef level evaluation status message with all new line and special characters escaped (using Java escaping rules). Non blank if the evaluation status is Failed, blank otherwise.

gwen.stepDef.eval.duration

Provides access the elapsed duration since the beginning of a StepDef execution in human readable format. Example: 12s 345ms

gwen.stepDef.eval.duration.msecs

Provides access the elapsed duration since the beginning of a StepDef execution in milliseconds.

gwen.stepDef.eval.duration.secs

Provides access the elapsed duration since the beginning of a StepDef execution in seconds.

Web Session

gwen.web.sessionId

The current web session ID.

For-Each Iteration

iteration.index

The current iteration index (starting at 0) inside a ForEach or Until/While loop.

iteration.number

The current iteration number (starting at 1) inside a ForEach or Until/While loop.

Input Data Record

data.record.index

The index (starting at 0) of the current record being processed when using a data feed.

data.record.number

The number (starting at 1) of the current record being processed when using a data feed.

record.number

The current record number (starting at 1) being processed in a data table

record.index

The current record number (starting at 1) being processed in a data table

Accumulated Errors

gwen.accumulated.errors

Provides access to accumulated error messages in the form of string (numbered list).

gwen.accumulated.errors:JSONArray

Provides access to accumulated errror messages in the form of a JSON array.