Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In a suite, click + Add to add a new test and select Gherkin Scenario

    image-20240201-160711.png
  2. Specify a Name, Keywords and Comments for your scenario.

    image-20240201-160732.png
  3. Click Steps to move to step view. The scenario will automatically show 3 steps as shown below:

    image-20240201-160746.pngImage Removedimage-20240402-142427.pngImage Added
  4. To begin your Gherkin scenario, click on one of the steps to display the right panel. For example Given <NOT_SELECTED> [empty]

    image-20240201-160841.pngImage Removedimage-20240402-142441.pngImage Added
  5. If you click on the dropdown list in the right panel, you can always change the step from Given to any of the other options displayed.

    image-20240201-160902.pngImage Removedimage-20240402-142453.pngImage Added
  6. Click the Select or Type… field and begin entering your Given scenario. If you would like to create a command template which will include parametrized data, you can use <> to indicate the start and end of the parameter name. Let’s enter The user navigates to site <website>.

    image-20240201-160923.pngImage Removedimage-20240402-142531.pngImage Added
  7. By pressing Tab on your keyboard, the Gherkin Step will be displayed. If you click the View Gherkin step (Eye icon), a new Gherkin Step window will appear with 2 blank steps so you can add as many steps as you like.

    image-20240201-161006.png
  8. As you can see, a parameter has also been automatically created for you to use with TEXT. If you click the Parameters link, you can click on the dropdown list to change the type from TEXT or BOOLEAN or CHOICE depending on your scenario. Refer to Command Templates (BETA) to learn more about command templates parameters.

    image-20240201-161241.png
  9. Click Steps tab to move into steps view. Let’s add a step to navigate to a website which we can parameterize. First thing is to click on the blank step to show the right panel, then select Goto URL command

    image-20240201-161351.pngImage Removedimage-20240402-142645.pngImage Added
  10. After selecting Goto_URL command, we can navigate to any website. By entering @website, we are calling the variable from the parameter previously created. Let’s save the scenario by clicking Not Saved.

    image-20240201-161508.pngImage Removedimage-20240402-142702.pngImage Added

  11. When closing the New Gherkin Step window and returning to the New Gherkin Scenario window, we will see that the new step has been added with the newly created step. Next to the website parameter, we can start to add a website to navigate to. You can add static values, but we recommend using datasets to prevent hard-coding, this will also allow you to add multiple values in different datasets that you can select in your test. Click on the input box next to website and click Inject Template icon.

    image-20240201-161550.pngImage Removedimage-20240402-142809.pngImage Added
  12. Create a new Data Template and Dataset, or select an existing one. Refer to Create a Data Template and Create a New Dataset for further help on Data Templates or Datasets.

    image-20240201-161642.pngImage Removedimage-20240402-142824.pngImage Added
  13. Once the Data Template and Field are selected, click Inject and you will see a parameterized value. For example ${subject7_reference_environment.url}

    image-20240201-161701.pngImage Removedimage-20240402-142908.pngImage Added
  14. Click on the next step to display the right panel and begin adding your next steps. For example, let’s create a step with The user will log in with <username> and <password

    image-20240201-161945.pngImage Removedimage-20240402-142940.pngImage Added
  15. Click the View Gherkin Step (Eye icon) icon again to begin adding your logging in steps. When you add the steps which will fill in the data, call the variable from the parameter created in step 15.

    image-20240201-162216.pngImage Removedimage-20240402-143110.pngImage Added
  16. Save your Gherkin step and return to the Gherkin Scenario. Now you can select your username and password either by filling them or injecting them as you did in steps 11-12.

    image-20240201-162320.pngImage Removedimage-20240402-143229.pngImage Added
  17. Expand your next step to add a new Gherkin Step which will execute after logging in. For example: Verify that the user with name <full_name> has logged in

    image-20240201-162449.pngImage Removedimage-20240402-143318.pngImage Added
  18. Click the View Gherkin Step (Eye icon) icon again to begin adding your verification steps (if any) and save the Gherkin step. The below example shows verification using the parameter created in step 18.

    image-20240201-162524.pngImage Removedimage-20240402-143402.pngImage Added
  19. If you have any additional steps, you can simple click the blank step with “Select Command” placeholder to display the right panel. For example, let’s add And to log out of the application.

    image-20240201-162605.pngImage Removedimage-20240402-143429.pngImage Added
  20. Let’s create steps to log out of the application. By clicking View Gherkin step (Eye icon) we can add that step.

    image-20240201-162703.pngImage Removedimage-20240402-143449.pngImage Added
  21. Click Save on your Gherkin step

    image-20240201-162809.pngImage Removedimage-20240402-143535.pngImage Added
  22. Return to your Gherkin Scenario and save it.

  23. Now as you can see, the Gherkin Scenario is complete. We can save it and execute it locally or in cloud

    image-20240201-162908.pngImage Removedimage-20240402-143619.pngImage Added
  24. In order to switch between datasets, you can click the Select Dataset icon highlighted below:

    image-20240201-162925.pngImage Removedimage-20240402-143637.pngImage Added