4 ms·
> end-to-end tests are slow as well as difficult to write+maintain Citation needed, sounds anecdotal. End-to-end tests should run as fast as any given use cas
by musingsole 6y ago
> end-to-end tests are slow as well as difficult to write+maintain
Citation needed, sounds anecdotal.
End-to-end tests should run as fast as any given use case (for most software, that means relatively quick), plus some set-up time as testing overhead. But that testing overhead is often self-inflicted and can be managed. I have anecdotes to prove it.
For the speed to write end-to-end tests, shouldn't they be the easiest to capture? I need the system inputs and I need to capture the system outputs. If you imagine usage-driven development, then the last step is to capture your initial state, use your new code, capture the final state and voila, here's your new end-to-end test.
> your important business logic
Consider the reality that no one cares about your backend. No one. Is it correct enough for the application is the only business question concerned with the backend (and most applications have a HIGH fault tolerance).
What does everyone care about? Your frontend. The colors, dropdown box or search field. That column should be over here. Focusing your testing on the parts of your application people could shrug about is not sound reasoning.
- Tainnor 6y agoI'm pretty sure more people care about the VAT being calculated correctly than about whether it's displayed on the left or on the right. You're taking a reasonable point of view - code matters only inasmuch as it has an effect on users - and take it to an absurd extreme.
- musingsole 6y agoThen you misunderstand. You are right that the VAT or similar financial matters require a very high degree of precision and accuracy. Physics simulations and similar computations even more so. These applications have a very LOW tolerance for error and -- rightfully so -- tend to have a lot of attention paid to their backends. I contend that most applications are not these. I'll put it forward as professional experience that even financial adjacent systems have a surprising degree of error tolerance. Our engineers/scientists are constantly striving to improve correctness because that's what engineers do but it's plainly not a priority for our bottom line. Countless errors have been caught in the last year that made individual results quite questionable. But on the whole, the system and its results are accurate enough that we have plenty of customers and business keeping us busy.