4 ms·
> We run tests 400-500 times a day; a ten second improvement in every test run translates to an hour of saved developer time, every day. Is it just me, or does
by jgalt212 11y ago
> We run tests 400-500 times a day; a ten second improvement in every test run translates to an hour of saved developer time, every day.
Is it just me, or does that seem like running a lot of tests per day. I mean, how many lines of code do they write per day? 1000? Do they run the test suite ever time they write two lines of code?
- Fargren 11y agoIf your suite run in 100ms, why wouldn't you?
- Gigablah 11y agoThe thing is, after reading all that, I think they're referring to their test suite startup time.
- jgalt212 11y agobecause then I think you become to reliant upon tests, and not reliant enough upon correctly understanding the problem at hand. furthermore, your code is then only as good as your tests. And thus your code become vulnerable to failing on anything outside the test cases.
- gtramont 11y agoThat is probably on a CI server. During development, I'd probably be running way more than that, at every production or test line written, having a task that watches for file changes and re-runs all tests. Then, having a fast test suite is key. While speeding up the process is always good, tools like lucifer or spork are only masking the problem: loading the whole environment for unit-level tests. Sails, like Rails, promote tight coupling between all parts of the system, which harms test speed, thus harming another development tool: TDD. The more decoupled and isolated you write your business logic, the easier and faster it is to test drive it. Then you simply plug an HTTP interface (with routes and whatnot) that calls into your core.