Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
10.11-rc-1
-
None
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
The Docker test framework documents that "System properties have priority over Java annotation attributes", and every @UITest option behaves that way except two list options, which read their system property only when the annotation leaves them empty:
- profiles (xwiki.test.ui.profiles)
- servletEngineNetworkAliases (xwiki.test.ui.servletEngineNetworkAliases)
So as soon as a test sets one of them in its annotation, the matching system property is silently ignored.
Example
Modules activate the clover Maven profile for their functional tests by setting <xwiki.test.ui.profiles>clover</xwiki.test.ui.profiles> in their pom (e.g. xwiki-platform-distribution-flavor-test-docker). ExtensionSecurityScanIT in that module has @UITest(standardFlavor = true, profiles = "legacy"). Run standalone (-Dit.test=ExtensionSecurityScanIT), its profiles are only legacy: clover is dropped without any warning. Inside AllIT it happens to work, only because the profiles of the nested test classes are merged and the other nested classes fall back to the system property.
Expected
For these two options, combine the values: the annotation's values first, then the system property's, without duplicates. Replacing the annotation's values with the property's would drop legacy, which the test needs; combining is also what already happens when the configurations of nested test classes are merged.
Attachments
Issue Links
- relates to
-
XWIKI-15931 Add ability to specify profiles for Docker-based tests
-
- Closed
-