4 ms·
> ...and often heard people saying that "you should never test logs" It's surprising that it gets labeled as "logs". Don't we test the expected behavior of the
by zoomablemind 6y ago
> ...and often heard people saying that "you should never test logs"
It's surprising that it gets labeled as "logs". Don't we test the expected behavior of the _code_ under test?
Be it a business or an
auxilliary code like logging, it's still code, some function/class/facility...well, any purpose added code.
Thus, I would test such logging facility for correctness; otherwise, the next time its output is needed, I want to be sure that it can be trusted.
Of course, using ready-made logging frameworks may help shift such burden of testing onto the framework's developer.