There are 2 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-31d26510-5443-422e-bd69-dad3e81c327b XWIKI-25751 Closed

Allow sharing the @UITest configuration between functional test classes through a common base class

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-6100ee9a-b0b8-44c9-abb1-222bb5410143 Changes by Marius Dumitru Florea on 16/Nov/26 10:44
 
Resolution: Fixed
Status: Open Closed
 
 

1 comment

 
cid:jira-generated-image-avatar-6100ee9a-b0b8-44c9-abb1-222bb5410143 Marius Dumitru Florea on 16/Nov/26 10:42
 

Fixed in https://github.com/xwiki/xwiki-platform/pull/7448:

  • @UITest is now @Inherited: a functional test class that doesn't declare its own @UITest gets the configuration declared on its closest superclass, so several test classes can share the same configuration through a common (abstract) base class and still be run individually (-Dit.test=SomeIT). Using the same configuration for all the test classes of a module allows reusing the XWiki instance started for one test class to run another one (-Dit.test=OtherIT -Dxwiki.test.ui.servletEngine=external).
  • A test class that declares its own @UITest doesn't inherit anything from its base class's annotation: the whole configuration is replaced, not merged. This differs from the nested test classes of an AllIT, whose configurations are merged with the one of the top-level test class. Both are documented in the UITest javadoc.
  • The configuration of the nested test classes of an AllIT is now resolved through the inherited annotation too, instead of walking the superclasses by hand.
  • The BlockNote functional tests are the first to use it: their configuration, previously duplicated on 9 test classes, is now declared once on AbstractBlockNoteIT.