Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
It can be useful for library authors who want to assert behavior for user diagnostics. Once it is user facing then it is relied upon and leads to issue discussions. Adding tests helps to avoid regressions due to refactoring, reference if revisited, etc. Sometimes this is benign like logging errors, but other times users will expect certain log message formats and complain if their regex scripts break (similar to depending on an unspecified toString() representation). It certainly isn't the common case to test for, but once user-facing then an implicit part of the api to be aware of. When I've had to do this, I used slf4j-test but log-captor looks very nice too.
fwiw I built something similar, but differently: https://github.com/dm-drogeriemarkt/log-capture