3 ms·
Now, I'm not saying you should test logging, but I don't think the author made much of a case here. You shouldn't test logging because it is a code smell! If yo
by rquantz 13y ago
Now, I'm not saying you should test logging, but I don't think the author made much of a case here. You shouldn't test logging because it is a code smell! If you are testing logging it's because it's not actually logging!
- ams6110 13y agoYou may be using a logging framework to satisfy some audit requirement, e.g. to capture user login timestamps, or important transaction details. That should be tested, since it's a feature of your software. But even if you are just logging for behavior tracking/debug purposes, you should at least verify that the logging framework is actually working, otherwise it might not be there when you need it. If you're going to go through the trouble to code something that's going to stay in the production release, you should pretty much always at least do some basic smoke tests on the feature.