Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The AssertThat BDD plugin has a number of features to help writing BDD Features, Scenarios and Steps. In this section we will cover Autocomplete which will speeds up your teams ability to write scenarios by reusing steps over and over again.

Step Autocomplete hot keys

Step 1: Access the features menu.

Step 2: Select the Feature you would like to add the new Scenario to, by clicking on the Scenario title.

Step 3: Enter step type (Given, When, Then, But) then start to type in an existing step, when you have typed 3 Characters press CTRL-SPACE you will be presented with a list of potential steps that can be reused. Continue typing to narrow down steps that match existing steps.

Step reuse - Drag and Drop

Step 1: Access the features menu.

Step 2: Select the Feature you would like to add the new Scenario to, by clicking on the Scenario title.

image-20240227-190439.png

Step 3: Select Toggle Autocomplete. A new window appears which will move as you scroll up and down the page.

Step 4: Start typing an existing step in the Autocomplete box, and a list of steps that match your criteria will be displayed.

image-20240227-190343.png

Step 5: Simply select the position of where you want the new step and then drag and drop the step from the Autocomplete box.

image-20240227-190120.png

Scoped autocomplete per component

In order to logically separate steps that are being suggested in autocomplete you can use feature level tags of specific format (component:<component_name>)to group the features into components. Autocomplete in a feature with feature level component tag will be scoped to the component and won’t suggest steps from features in different components.

For example if Feature A and B has tag component:X and Feature C and D has tag component:Y, then when writing scenario in Feature C autocomplete won’t show steps from Features A and B but will only suggest steps from Features C and D.

Example of feature level components tags below:

  • No labels