There are 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-e266884c-8995-4ad6-82c1-925a2d1b167c XWIKI-22081 Open

Add automated test for "See The Logging Page"

 
View issue   ยท   Add comment
 

2 comments

 
cid:jira-generated-image-avatar-261901b0-2c36-43b0-9c89-6b424eae9b00 Vincent Massol on 02/Jun/26 15:06
 

Note that we already have a PageTest at https://github.com/xwiki/xwiki-platform/blob/848287c4ab19b06af87280c3fe0d18004fd773a2/xwiki-platform-core/xwiki-platform-logging/xwiki-platform-logging-ui/src/test/java/org/xwiki/logging/LoggingAdminPageTest.java#L74 that is covering set-level, unset-level, and the unknown-logger error path at the rendering level (mocked LoggerManager).

There's also https://github.com/xwiki/xwiki-platform/blob/53ce83181a6e2ec2a97587190c1b6948c1bc6b6c/xwiki-platform-core/xwiki-platform-logging/xwiki-platform-logging-script/src/test/java/org/xwiki/logging/script/LoggingScriptServiceTest.java that unit-tests the logging script service + PROGRAM-right check.

What we are strictly missing:

  • Steps 1 and 2 of the manual test (ie that the Logging section exists and can be clicked in the admin UI)
  • That the Action button works to set a logging level (the setting itself works and is tested in the page test)
 
cid:jira-generated-image-avatar-261901b0-2c36-43b0-9c89-6b424eae9b00 Vincent Massol on 02/Jun/26 15:06
 

Now if we implement the missing checks, then the page test becomes almost irrelevant (except for the unknown logger part)...