Skip to main content

Implicit Values

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

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.name

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

gwen.scenario.name

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

gwen.rule.name

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

gwen.stepDef.name

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

gwen.eval.status.keyword

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

gwen.eval.status.keyword.upperCased

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

gwen.eval.status.keyword.lowerCased

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

gwen.eval.status.isPassed

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

gwen.eval.status.isFailed

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

gwen.eval.status.message

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

gwen.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.web.sessionId

The current web session ID.

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.

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

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.