u/Stettoin r/node • Recommends
On “E2E Tests Taking Too Long. How you guys do it?”
You're just starting to realize, that E2E-tests are expensive. They require your whole application, interace with a real browser and are generally slower than alternatives.
Tests are supposed to give confidence, that you didn't introduce critical bugs into your application. But tests also have a cost and in the case of E2E, that's: time, infrastructure costs and flakiness.
Kent C. Dodds held a great, entertaining talk about that.
If you attempt to cover all of your testing requirements with e2e-tests that will inevitably slow you down.
Try to build more pure API and pure frontend tests. They run way faster and you can even decide to run them context specific. As in: "Only one specific…