binkley / sproingk

Spring Boot with Kotlin
Other
1 stars 1 forks source link

JUnit tests should fail when application logs error, or possibly warn #17

Open binkley opened 7 years ago

binkley commented 7 years ago

Narrative

AS Bob the QA I WANT JUnit tests to fail when tested code logs ERROR or WARN SO THAT the application does not run in production with known problems exposed through logging

Business context

Acceptance criteria

GIVEN JUnit is testing WHEN application logs ERROR THEN current test should fail

GIVEN JUnit is testing WHEN application logs WARN THEN current test should fail

binkley commented 7 years ago

Consider creating a JUnit 5 extension for this. References:

binkley commented 7 years ago

Consider a replacement SLF4J logger factory. See http://stackoverflow.com/a/2653919.