Hacker News new | ask | show | jobs
by xiaq 1722 days ago
This test will inflate the test coverage, but it is a valid smoke test (assuming that any unhandled exception will cause the test to fail).
1 comments

You shouldn't write tests like this; there's a high likelihood that the test will be flaky or not representative enough of production, and if the test fails, you often get completely non-actionable error messages.

If you just want to know that your app is broken, it's far better to monitor your live app (or staging environment or deployment pipeline or whatever) since that monitoring infrastructure can then be leveraged to collect other runtime health data in a more granular fashion.