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
Tracking down real issues in logs is challenging when they are filled with noise
Errors and warnings logged during development are strong smells, and may expose real issues that need more tests
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
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