3 ms·
I'm curious what kind of practices people have put in place to minimize the need for UI tests? I personally believe a UI test should only be written as a last r
by tunesmith 6y ago
I'm curious what kind of practices people have put in place to minimize the need for UI tests? I personally believe a UI test should only be written as a last result if it's impossible to test through other more backend-ish means. When you combine concurrent test runs with shared mutable state, you get flaky unreliable tests, and it's almost impossible to avoid with UI tests. So it seems the better solution is to restructure your code as much as possible to get as close as you can to the UI layer as possible with unit tests. But how far can you actually push this? I'm currently sad because my team is in the middle of a push to integrate Cypress into their react frontend, and I'm dreading the future where we have a billion qa-written UI tests that are redundant compared to our unit test coverage, and flaky besides.
- bickeringyokel 6y agoA billion tests most certainly won't be useful. Good tests target very specific things that are critical to your product. In my experience UI tests are only slightly more flaky than other testing methods as long as they are written well.