Using setup for scenarios

In Hiptest folders, you will notice the presence of the same editor than the one you can see in scenarios or action words:

Screen Shot 2016-03-16 at 16.05.29

This editor is used to define a setup for the scenarios belonging to the folder. So basically, every scenarios inside this folder will consider the folder steps as a pre-requisite for its own content (as would do a Background scenario in Gherkin).

For example, here is a example of scenario inside the previous folder:

Screen Shot 2016-03-16 at 16.07.32

It does not contain a call to the “start the coffee machine” action word, but now if we look at the test associated to this scenario, we see that it include the steps from the folder:

Screen Shot 2016-03-16 at 16.10.23

So, with this folder definition, you can easily factorise some common setup (or pre-condition) steps shared by multiple scenarios.

One important thing to note is that this definition only applies to the scenarios that are directly inside the folder, not to ones that belong to a sub-folder (setups are not cumulatives).