Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98792

How to structure BDD scenarios for situations with a lot of variables

$
0
0

Our team is new to BDD development/specification, and from a testautomation perspective we would like to get some advice on setting up BDD scenarios (and the Steps) in a situation where there are a lot of variables, like with forms.

Here is the situation: A form to create employees, which consists of multiple subjects like personal information, job details, salary, etc.

A possible scenario outline the team has come up with:

Given I want to add a new employee
And the job title is "jobtitle"
When I submit the form
Then a notification is sent to "manager"

Examples:
|jobtitle|manager|
|Developer|John Doe|

The steps above describe only the deciding factors for the outcome of the scenario. So what name a person might have or what salary he/she will earn won't affect the scenario. However, in another scenario a different field might be the deciding factor, like someones department. In this case, how would be bundle the scenarios or the underlying steps, so we can re-use as much as possible? Because even though in this exaple the jobtitle is the deciding factor, we still need to fill in all other mandatory fields to be able to submit the form. Any advice is welcome!


Viewing all articles
Browse latest Browse all 98792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>