I am asking myself whether it is a good idea to use example tables all the
time or only on demand.

Lets take this scenario to illustrate the options:

*Scenario:* Login
*When* I login with username *Hans* and password *Swordfish*
*Then* I am logged in and username *Hans* is displayed

It could be possible to use an example table for it:

*Scenario:* Login
*When* I login with username *<username>* and password *<password>*
*Then* I am logged in and username *<username>* is displayed
*Examples:*
|------------------|
|username|password |
|------------------|
|Hans    |Swordfish|
|------------------|

The username is a bit redundant in the first example since it occurs two
times and might have to be changed in two places.

In the second example the redundancy is removed by using an examples table.

The first scenario example is more readable I think, escpecially for
non-programmers, since they don't have encounter variables there, wheras
the second example is more maintainable.

What would you do in such and similiar cases? Accept the redundancy or
remove it wherever possible with an examples table?

Reply via email to