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:

Hiptest folder setup

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

Here is an example of a scenario inside the previous folder:

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:

Interpreted test with Hiptest folder setup

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

Download the ebook

This field is required

This field is required

Please enter a valid email address

Thank you, the ebook has been sent to your mailbox

Hiptest is FREE for open source projects

We actually utilize a number of open source components, which is why Hiptest service is free for any open source project. We are giving back to the community!

Your open source project must meet the following criteria to be approved:

  • Your project is licensed under a license approved by the Open Source Initiative
  • Your project source code is available for download
  • Your project has a publicly accessible website

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close