Using free text parameters

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 excepted content of a web page or an email).

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

Screen Shot 2016-06-09 at 10.43.29

It would be really interesting to also check the content of the email. To do so, let’s add a free text parameter. This can be done by clicking the “speech” icon in the gray area in front of the action word. Once this is done, a field appears to enter the content of the parameter:

Screen Shot 2016-06-09 at 10.45.16

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

Screen Shot 2016-06-09 at 10.47.21

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

Screen Shot 2016-06-09 at 10.48.25

Note that it is important to keep the name “__free_text” for this parameter, otherwise it will be shown as a classical parameter in a single-line text field.