Class LogTestWatchman.java is mostly useful (besides taking screenshots in case of failures) to issue logs on the server, so that we can match potential server logs with corresponding tests.
Currently this class is unefficient and shows, in the tests output:
[INFO] Running org.nuxeo.ftest.server.ITStartupPageTest 2020-04-22 03:57:31,004 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITStartupPageTest#testStartupPage' [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.412 s - in org.nuxeo.ftest.server.ITStartupPageTest [INFO] Running org.nuxeo.ftest.server.ITOAuth2Test 2020-04-22 03:57:36,906 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testAuthorizationDenied' 2020-04-22 03:57:39,813 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testAuthorizationErrors' 2020-04-22 03:57:41,563 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testAuthorizationOnCMIS' 2020-04-22 03:57:44,730 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testAuthorizationOnRestAPI' 2020-04-22 03:57:46,682 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testOAuth2GrantPage' 2020-04-22 03:57:47,737 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testAuthorizationWithAutoGrant' 2020-04-22 03:57:49,305 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testAuthorizationSubmitErrors' 2020-04-22 03:57:52,596 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testTokenGetRequest' 2020-04-22 03:57:53,120 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testAuthorizationGranted' 2020-04-22 03:57:54,713 [main] WARN [LogTestWatchman] Cannot log on server message: Starting test 'org.nuxeo.ftest.server.ITOAuth2Test#testAuthorizationWithExistingToken' [INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 20.293 s - in org.nuxeo.ftest.server.ITOAuth2Test [INFO] Running org.nuxeo.ftest.server.ITRestAPITest [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.095 s - in org.nuxeo.ftest.server.ITRestAPITest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0
Server logs show warnings that are difficult to match to tests:
====================================================================== = Component Loading Status: Pending: 0 / Missing: 0 / Unstarted: 0 / Total: 539 ====================================================================== 2020-04-22T03:57:40,192 WARN [http-nio-0.0.0.0-8080-exec-13] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Missing required field "client_id".) 2020-04-22T03:57:40,528 WARN [http-nio-0.0.0.0-8080-exec-1] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Missing required field "response_type".) 2020-04-22T03:57:40,606 WARN [http-nio-0.0.0.0-8080-exec-10] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=unsupported_response_type, description=Unknown response_type: got "unknown", expecting "code".) 2020-04-22T03:57:40,704 WARN [http-nio-0.0.0.0-8080-exec-4] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid client_id: unknown.) 2020-04-22T03:57:40,793 WARN [http-nio-0.0.0.0-8080-exec-6] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid redirect_uri parameter: unknown. It must exactly match one of the redirect URIs configured for the app.) 2020-04-22T03:57:40,884 WARN [http-nio-0.0.0.0-8080-exec-11] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid PKCE parameters: either both code_challenge and code_challenge_method parameters must be sent or none of them.) 2020-04-22T03:57:40,960 WARN [http-nio-0.0.0.0-8080-exec-3] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid PKCE parameters: either both code_challenge and code_challenge_method parameters must be sent or none of them.) 2020-04-22T03:57:41,056 WARN [http-nio-0.0.0.0-8080-exec-2] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid code_challenge_method parameter: transform algorithm unknown not supported. The server only supports [plain, S256].) 2020-04-22T03:57:49,767 WARN [http-nio-0.0.0.0-8080-exec-5] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=The /oauth2/authorize_submit endpoint only accepts POST requests.) 2020-04-22T03:57:50,118 WARN [http-nio-0.0.0.0-8080-exec-13] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Missing required field "client_id".) 2020-04-22T03:57:50,458 WARN [http-nio-0.0.0.0-8080-exec-10] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Missing required field "response_type".) 2020-04-22T03:57:50,780 WARN [http-nio-0.0.0.0-8080-exec-6] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=unsupported_response_type, description=Unknown response_type: got "unknown", expecting "code".) 2020-04-22T03:57:50,997 WARN [http-nio-0.0.0.0-8080-exec-3] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid client_id: unknown.) 2020-04-22T03:57:51,196 WARN [http-nio-0.0.0.0-8080-exec-7] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid redirect_uri parameter: unknown. It must exactly match one of the redirect URIs configured for the app.) 2020-04-22T03:57:51,509 WARN [http-nio-0.0.0.0-8080-exec-5] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid PKCE parameters: either both code_challenge and code_challenge_method parameters must be sent or none of them.) 2020-04-22T03:57:51,824 WARN [http-nio-0.0.0.0-8080-exec-13] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid PKCE parameters: either both code_challenge and code_challenge_method parameters must be sent or none of them.) 2020-04-22T03:57:52,109 WARN [http-nio-0.0.0.0-8080-exec-10] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=Invalid code_challenge_method parameter: transform algorithm unknown not supported. The server only supports [plain, S256].) 2020-04-22T03:57:52,611 WARN [http-nio-0.0.0.0-8080-exec-2] [org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Servlet] OAuth2 authorization request error: OAuth2Error(id=invalid_request, description=The /oauth2/token endpoint only accepts POST requests.)
(example taken from https://qa.nuxeo.org/jenkins/view/P1Fail/job/Deploy/job/IT-nuxeo-master-tests-cap-tomcat/338/consoleText, same visible at https://qa.nuxeo.org/jenkins/view/P1Fail/job/master/job/nuxeo-packages-master/453/consoleText)
The reason behind this warn log is that the client tries to hit the /restAPI/systemLog API that has been removed from the server (TODO: maybe link to corresponding jira)