Download the PHP package edno/codeception-gherkin-param without Composer
On this page you can find all versions of the php package edno/codeception-gherkin-param. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download edno/codeception-gherkin-param
More information about edno/codeception-gherkin-param
Files in edno/codeception-gherkin-param
Package codeception-gherkin-param
Short Description Codeception module for supporting parameter notation in Gherkin features
License Apache-2.0
Homepage https://edno.github.io/codeception-gherkin-param
Informations about the package codeception-gherkin-param
Gherkin Param
The Codeception module for supporting parameter notation in Gherkin scenario.
Minimum Requirements
- Codeception 3.x, 4.x, 5.x
- PHP 7.4 - 8.2 (use release 2.0.6 for older PHP versions)
Installation
The module can be installed using Composer
Be sure to enable the module in codeception.yml
as shown in
configuration below.
Setup
Enabling Gherkin Param is done in codeception.yml
.
Configuration
By default GherkinParam behavior is to keep the parameter string unchanged when the replacement value for a parameter cannot be found, i.e., the parameter does not exist or is not accessible.
onErrorThrowException
If true
, then GherkinParam will throw an exception GherkinParam
at runtime when a replacement value cannot be found for a parameter:
If
onErrorThrowException
is set then it will overrideonErrorNullable
.
onErrorNullable
If true
, then GherkinParam will set to null
parameters for which a replacement value cannot be found:
Usage
Once installed, you will be able to access variables stored using Fixtures.
Simple parameters
In scenario steps, the variables can be accessed using the syntax {{param}}
.
While executing your features, the variables will be automatically replaced by their value.
Array parameters
You can refer to an element in an array using the syntax {{param[key]}}
.
Test Suite Config parameters
You can refer to a test suite configuration parameter using the syntax {{config:param}}
.
Note that the keyword config: is mandatory.
Example
The steps definition in AcceptanceTester.php
do not require any change
You can find more examples in the test folder.
Contributions
Contributions, issues, and feature requests are very welcome. If you use this package and have fixed a bug for yourself, please consider submitting a PR!
Made with contributors-img.
All versions of codeception-gherkin-param with dependencies
codeception/codeception Version 3 - 5
composer-runtime-api Version ^2.0