Created
April 12, 2017 09:08
-
-
Save suchov/75e7d040dd1e170383c0288bfeda8433 to your computer and use it in GitHub Desktop.
Move sad paths out of feature specs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature specs are slow. They have to boot up a fake browser and navigate around. | |
They’re particularly slow when using a JavaScript driver which incurs even more | |
overhead. While you do want a feature spec to cover every user facing feature of | |
your application, you also don’t want to duplicate coverage. | |
Many times, feature specs are written to cover both happy paths and sad paths. In | |
an attempt to mitigate duplicate code coverage with slower tests, we’ll often write | |
our happy path tests with feature specs, and sad paths with some other medium, | |
such as request specs or view specs. Finding a balance between too many and too | |
few feature specs comes with experience. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment