Hacker News new | ask | show | jobs
by rco8786 2124 days ago
What a dream that would be. But unfortunately not super realistic on a project of any real size.
2 comments

It's pretty easy to get those numbers if your business code isn't intertwined with your UI/database/MVC code, or if your core code can be tested in a pure manner (like the "core" of an image editing software, or parsers, or serializers/protocols, etc).

Of course, if all you have is a basic CRUD app, then there's not much testable "core" code that you can separate from your framework, so TDD and unit tests are probably not the best idea. IMO end-to-end and integration tests are the way to go anyway.

There are ways to structure your code so that this can be done. Of course, it would require a complete refactor to achieve full test coverage on an existing project, but if you build like this from the beginning, it's feasible.
Is there any literature on this? A test suite that runs in 1s is...kinda crazy sounding on any non-trivial codebase.
Gary Bernhardt has a pretty good talk: https://www.youtube.com/watch?v=RAxiiRPHS9k