feat: make JUnit XML id and classname attributes configurable#3235
feat: make JUnit XML id and classname attributes configurable#3235dezsibalint wants to merge 5 commits intomobile-dev-inc:mainfrom
Conversation
Add optional `id` and `classname` keys to the flow YAML config section. When present, they override the corresponding JUnit XML <testcase> attributes; when omitted, behavior is unchanged (all default to flow name). Closes mobile-dev-inc#3151
|
Worth looking at the existing |
|
Currently, id, name, and classname at the root level are all derived from the flow name, which results in three attributes carrying identical values. This is redundant and not very useful. It can also break or confuse automated reporting tools that rely on these fields having distinct meanings. This PR addresses that by allowing them to be configured independently. |
|
AFAIK, properties just adds extra child elements under the root element, it doesn’t affect the root attributes. |
|
The properties don't currently affect id or classname. I was considering Maestro's surface area, and considering that the properties you're adding might better belong in the |
|
@Fishbowler The already optionally configurable |
|
Is there a better name we can give them? |
|
Good point, I’ll think about it and get back to you on Monday. Since these are optional, we could also just clarify things in the docs and call it a day. If you feel strongly about renaming, maybe something like reportId and reportClassname can be used? |
JUnit-specific test case attributes (id, classname) are now configured
via the existing properties map instead of top-level config fields.
This avoids confusing users of HTML reports with JUnit-only concepts
and makes the purpose of these values explicit through naming.
Properties values are now script-evaluated, enabling ${...} expressions.
The JUnit reporter extracts junitId/junitClassname for XML attributes
and filters them from <property> elements to avoid redundancy.
|
@Fishbowler Hi! |
Summary
idandclassnamekeys to the flow YAML config section<testcase>attributesflow.nameYAML example:
Produces:
Closes #3151
Changes
MaestroConfig.ktidandclassnamefields + JS expression evaluationYamlConfig.ktTestExecutionSummary.ktidandclassnameto FlowResultTestSuiteInteractor.ktJUnitTestSuiteReporter.ktflow.id ?: flow.nameandflow.classname ?: flow.nameTest plan
idandclassnamefieldsid/classnamewhen presentflow.namewhen fields are omitted