News for hackers. Stuff that matters.
Re:Spark joy by running fewer tests by davewritescode on Friday June 12, 2020 @08:48AM (#23498666)
Testing budgets are important by disqualifying a test because it's "slow" is really silly.

1. Tests that hit APIs and databases are important because when you mock out the database and the API you're writing a test that asserts your code integrates correctly with what you think the database or API should be doing.

2. Some systems are highly asynchronous and thus very difficult to test individual cases in under 100 ms.

If I have a suite of 100 tests that completes in 10 seconds because everything runs concurrently, that's a lot more important than limiting and individual test to some arbitrary timespan.

Again, make a budget for tests and meet it instead of making hard rules about how fast or slow a given test should be.

There are no comments on this comment yet.