3 ms·
One project had tests fail every Saturday and Sunday, near the organization’s fiscal week boundary. Ever since then, I have strived to hard-code all dates in te
by mdavidn 5y ago
One project had tests fail every Saturday and Sunday, near the organization’s fiscal week boundary. Ever since then, I have strived to hard-code all dates in test suites, choosing dates several decades in the future.
- alisonkisk 5y agoDoesn't that just hide the bugs? Your tests should pass on any and all date.
- mdavidn 5y agoNo. I write explicit tests on the boundaries, such that they would fail on any day of the week.
- rbanffy 5y agoThe outcome of tests shouldn’t depend on the time of day. Are these integration tests and you are having to deal with external bugs you can’t fix?