Using free text parameters

Applies to CucumberStudio Cloud, and to Enterprise ver. 3.3 - 3.5.6.0. Last updated on November 17, 2023

One really useful feature of the Gherkin syntax is the ability to define docstrings, a special parameter that can contain multiple lines (for example the expected content of a web page or an email).

CucumberStudio also allows you to define that kind of parameters when writing a test. Let’s consider the test below:

Free text parameters: Test example

Click the image to enlarge it.

It would be really interesting to check also the content of the email. To do so, let’s add a free text parameter. This can be done by clicking on the menu and selecting “Add free text parameter”. Once this is done, a field appears to enter the content of the parameter:

Free text parameters: Add free text

Click the image to enlarge it.

Now it is possible to fill the content of the parameter, for example:

Free text parameters: Free text example

Click the image to enlarge it.

Now, if we have a look at the action word an email is sent to, we’ll see that a parameter called __free_text has been added:

Free text parameters: Free text parameter name

Click the image to enlarge it.

It is important to keep the name __free_text for this parameter, otherwise it will be shown as a classic parameter in a single-line text field.
Highlight search results