CucumberStudio enables you to upload feature files written using Gherkin syntax (Cucumber, SpecFlow, …)
Enable the BDD mode
The import is available only if BDD mode is active in your project. By default, this mode is on. You can check this in your project settings, and if the mode is off, you can enable it there.
Select Project settings from the menu on the left, and in Project > Setting, turn on the Automation Ready (BDD mode) switcher:
Now, the step editor will interpret the Gherkin syntax and will create action words (reusable steps).
Import a feature file
In the CucumberStudio UI, features look like folders. The folder menu has a special command — Update from feature file — that you use to import scenarios from a file. So, to update the folder contents, find the folder in the project (click it in the folder tree) and then select that menu item:
Alternatively, you can drag a file from your file manager and drop it to the scenario list. CucumberStudio will update the folder contents with the scenarios defined in that file.
|Note:||Only .feature extension is accepted. Otherwise, an error will be displayed.|
The existing folder will be updated with the feature file you are importing. For this purpose, a window will show you which updates are about to be done:
Click on Apply changes once you review them to update your folder and scenarios.
The Gherkin steps will be converted into action word calls. If the action word does not exist, it will be created.
If there is an existing folder with the same name in the same hierarchy level, the new folder name will be suffixed with a number. For example, an existing folder is named Support internationalisation, the new one will be named Support internationalisation (1).
If one or more scenarios in your folder are not present in the .feature file, they will remain in your folder unless you check the option to delete them.
In that case, they will be permanently deleted from your folder.
Datatables update from scenario outline examples
When updating a folder from a feature file that contains scenario outlines with examples, datatables of impacted scenarios will be updated accordingly.
If the first column of your Gherkin examples is named Dataset name, it will be used to name your datasets. If you already have datasets with those names they will be updated.
If you do not have a Dataset name column in your examples, datasets are retrieved based on their values. If a value has changed, the corresponding dataset will not be found so a new one will be created and the old one will be deleted.