DEV Community

Discussion on: Always write at least 1 end-to-end test. You'll love it, I promise.

Collapse
 
ovid profile image
Ovid

I'm a huge fan of tests like this. If the test loads some fixtures, logs into a site, navigates to a reports page, and selects some reports and you test the results returned are correct, you've also exercised the authentication, authorization, navigation, and tons of other bits of code, even if you haven't tested them.

When you have a few deep integration tests like that, you quickly learn to appreciate the errors they'll pick up that other tests cannot because they're testing things in isolation—a state your full code tends not to run in.

Collapse
 
m3h0w profile image
Michał Gacka

Exactly <3 I've only realized this lately. Thanks for chipping in and helping to spread the word so others have an easier life :)