Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suite might not have name at all #58

Merged
merged 1 commit into from Mar 14, 2023
Merged

Suite might not have name at all #58

merged 1 commit into from Mar 14, 2023

Conversation

Tattoo
Copy link
Member

@Tattoo Tattoo commented Feb 27, 2023

Fixes JENKINS-69807

In RF4, suite name in output.xml might be non-existent in some cases (see more below [*]). In these cases, RobotTestObject.getName() returned null as well, which became problem for RobotTestObject.getRelativePackageName().

Handle null from getName() as an empty string.

[*] RF uses double underscore ('__') in suite name as a separator as per https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-suite-name-and-documentation

If user has named their suite so it ends with double undercore (eg. suite__.robot), suite name is of course empty. Before RF5, this meant output.xml's tag did not get name-attribute at all; hence the null.

In RF4, suite name in output.xml might be non-existent in some cases (see more
below [*]). In these cases, `RobotTestObject.getName()` returned null as well,
which became problem for `RobotTestObject.getRelativePackageName()`.

Handle null from `getName()` as an empty string.

[*] RF uses double underscore ('__') in suite name as a separator as per
https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-suite-name-and-documentation

If user has named their suite so it ends with double undercore (eg.
suite__.robot), suite name is of course empty. Before RF5, this meant
output.xml's <suite> tag did not get name-attribute at all; hence the null.
@Tattoo Tattoo requested a review from asimell February 27, 2023 11:43
Copy link
Contributor

@asimell asimell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Tattoo Tattoo merged commit 90aafd7 into master Mar 14, 2023
@Tattoo Tattoo added the bug label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants