4 ms·
Another much under-utilized way to speed up test suites: delete tests
by gfodor 5y ago
Another much under-utilized way to speed up test suites: delete tests
- wruza 5y agoCan one configure tests to run in “full”, “actual” and “scope:<modname>” modes?
- zerocount 5y agoThis is being down-voted, but there is merit to this. Tests should be audited for continued need.
- xcambar 5y agoI understand the underlying message but I prefer the equivalent following phrasing: "check test suite coherence". It moves the deletion as a means towards the coherence rather than as an end in and of itself, and also includes refactoring as an option. I hope it helps the less experienced developers grab the intention more explicitly.
- gfodor 5y agoI think the core point isn't about coherence, but tradeoffs. Some tests are not worth holding onto: ones that are slow, flaky, and test code that is of marginal importance. In those cases, the ideal tradeoff can be to delete the test. Perhaps to rewrite a better one, or perhaps to just 'eat' the risk incurred by removing it in favor of improved iteration times and the other long term benefits of not having to maintain it.
- xcambar 5y agoAs always, mentioning that Your Mileage May Vary (YMMV) puts the emphasis/decision on the people facing this or that situation rather than blindly applying advice found on the Internet. And rightfully so :)
- nijave 5y agoAlso just deleting dead code and tests that go along with it Tend to get a boost in application boot/startup time, too