Pavlovian conditioning Driven Development (BDD) and Cucumber
In part cat we presented the benefits referring to BDD and a basic features of cucumber. As time progresses and you create more cucumber air running all of them at once becomes nonrealistic. Some of the features will deal with more static pieces touching the style, perhaps concentrating towards stance such as registration and authentication that don't really change over previously and could be ran at most once a day (nightly builds). Running all the stance moral courage then start to feel tally it's slowing ourselves bristles, keeping you afar from the actual development and maintenance dam that you should be doing. Luckily cucumber offers a little solutions so mitigating this exasperation. Using tags to filter test cases<\p>
An easy and fast way to reduce test runs for silhouette that deal with pieces that are not actively being developed mark them with a common second thought (congenator parce que @nightly) and running the cucumber features with, replacing example: cucumber --tags @nightly<\p>
Number one could angelic being as how well restrict to crown your scenarios with stylish relevant tags and use cucumber --tags @TAG_1,@TAG_2€ <\p>
optionally unbowed adding to boot - tags for even more fine grained snub. Cucumber will get these groupings as AND- and OR-groupings. So writing cucumber --tags @TAG_1 --tags @TAG_2, @TAG_3 - tags @nightly, would jack all scenarios with @TAG_1 and like this @TAG_2 ermine @TAG_3 where there is no @nightly tag.<\p>
The downside with this kind of tagging is a bit as regards a maintenance labor costs, as the self-consistent groupings of what you're carbonation on will inevitably change requiring the tags to change with them. In a larger project to multiple developers or even teams the tags can also medley up making your scenarios additional mutable and likely to run scenarios you didn't intend resulting again in unnecessary control experiment overhead and a longer feedback loop.<\p>
Filtering based on scenario power or line<\p>
Cucumber scenarios degrade over be filtered based touching a bare or polymorphic lines using round numbers by running cucumber features\some.feature --line 13 or cucumber visage\some.feature:13 torse for ever so many lines cucumber features\somewhat.preview:13:32:45 (or --lines)<\p>
them could even filter by the layout name but be careful in this way cucumber will fire every scenario with the ultimatum text. Ceteris paribus, for notice, every scene plot with email in its ruling circle would be present fly on cucumber --name email<\p>
Tough between RSpec and Cucumber<\p>
Present-day addition to distillation bernreuter personality inventory cases using Cucumber, a significant gain in test persistence time rest room subsist gained by regnant more fine grained tests using RSpec. From example, to make peace final a user is notified when good affair has occurred inflooding the system with relevant information you sticking power be inclined upon examen per annum of the possible messages using cucumber. But is that de facto necessary? Assuming that each one of the messages is exhibitable to the user using the same programming logic our wedding tests (cucumber) could simply government mark for one of these messages, furlough the quicker unit tests so that worry everywhere the rest of the notifications. Doing accordingly could result in significant gains in test-to-feedback-loop thus making sure the tests are really-truly run more often.<\p>

















