-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Tests
-
Tags:
-
Upgrade notes:
-
Sprint:nxplatform 11.1.12, nxplatform 11.1.13
-
Story Points:3
We want to improve our LogFeature in order to be able to annotate test methods. We want to replace such pattern:
public void test() { logFeature.hideErrorFromConsoleLog(); try (InputStream in = blob.getStream()) { bytes = IOUtils.toByteArray(in); } finally { logFeature.restoreConsoleLog(); } }
by
@HideError public void test() { try (InputStream in = blob.getStream()) { bytes = IOUtils.toByteArray(in); } }
This will allow us to hide warning or error from console for the whole tests.
Ticket is also about adding this annotation for tests generating logs to Console. Goal is to have a clean maven output.