3 ms·
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).
by xiaq 5y 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).
- lhorie 5y agoYou 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.