Describing a feature
Let's now dig into the essence of Dentest, how to describe features in order to specify, validate and document your application.
#
SavingGood to know before starting: feature's contents will be saved automatically.
#
StatusYou don't want developers to start implementing a feature that is not done specifying. That's why features are created
with a Draft
status. While they're in this state, developers won't be able to pull them in the project.
Once the feature is ready to be implemented, change the status, by clicking on the status chip, to Ready to dev
. This
status indicates to people reading the features as a documentation that this one has not been released yet, but is
currently under development.
Once the feature has been deployed, just change the status to Live
. This way, everybody knows that the feature is
a source of truth.
#
DescriptionEnter the description in the purple area. Usually, a description follows a "user-story style", explaining the who, the what and the why of the feature:
- As a role
- I want to action
- So that benefit
But of course, you can enter what you want in it, even let it empty.
#
TagsLike the steps, features can have a list of tags. This can be useful for your Gherkin interpreter to run only certain tests, or to identify some features in some way (like the "flaky" ones for instance).
#
ScenariosA feature is basically a list of scenarios. And a scenario is basically a list of steps.
#
Viewer vs writer modeA scenario is in viewer mode first. To be able to fill in the steps params, reorder steps, edit title or tags, or switch its type, you must enter in writer mode, by clicking on it.
To go back to the viewer mode, click on the cross, in the top-right corner.
#
Editing the titleJust click on a scenario's title to edit it.
info
A Background scenario doesn't have a title
#
TagsTags can also be put at the scenario level. This is exactly the same purpose than the features tags.
#
Adding stepsYou can drag'n'drop steps from the bank of steps. If the steps require params (inline, paragraph or table), inputs or text areas will be created accordingly.
You can change the adverb to And or But, in order to ease the reading.
#
Reordering steps.In writer mode, you can drag'n'drop the scenario's steps to reorder them.
#
Reordering scenariosThe scenarios can be reordered by clicking on the corresponding buttons
#
Copying a scenarioA whole scenario can be copied by clicking the dedicated button.
#
Removing steps or scenariosTo remove a scenario, or just one of its steps, click on the trash icon button.
#
Special scenarios#
BackgroundA Background is a special scenario that will be executed before every other scenario of the feature. It can be useful to setup a given environment for the whole feature.
To create a Background on Dentest, you can convert the first scenario, from Scenario to Background. To do so, just click on the chip that indicates "Scenario". It will be switched to "Background".
#
Scenario OutlineA scenario outline is another special scenario, to which you can specify a list of examples, and the scenario will be played as many times as the amount of examples.
To create a scenario outline, just surround any value in the steps params by chevrons (<status>
for instance).
A new "Examples" table will appear. It will contain as many columns as surrounded values there are, and its header row will contain all the surrounded values.
Just fill the "Examples" table with all your test values, and your scenario outline will be set.