For groups of examples that share a structure, this is a very good way of extracting common elements. Scenario outlines: shared structureĪn outline allows us to group similar examples by writing the scenario only once and then listing the differences between examples in a table. In this article, I’ll compare the three techniques and give you some guidelines on when to use which one. There are three good ways of moving common preconditions out of individual scenarios: scenario outlines, feature backgrounds and hooks. Updating common preconditions is also a challenge when the same steps are copied and pasted lots of times. Readers might start subconsciously skipping the opening lines of scenarios, expecting them to always be the same, and miss important differences. It makes individual scenarios unnecessarily complex. Repeating common set-up steps is rarely a good idea. In the previous challenge, the shopping cart examples required a registered user. Related scenarios often have a similar starting point. Instead of the answer to the last week’s challenge, this week we’ll go a bit deeper into a recurring topic: setting up common preconditions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |