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

#2974: Add overrideGroupsFromCliInParentChildXml test #2975

Merged
merged 4 commits into from
Sep 2, 2023

Conversation

dr29bart
Copy link
Contributor

@dr29bart dr29bart commented Aug 31, 2023

#2974: Add a test method for "Regression in -groups CLA"

Closes #2974

@krmahadevan
Copy link
Member

@dr29bart - are you also planning to add changes to fix this issue? I ask because if this PR is containing a test that will reproduce the problem then it cannot be merged since it sill start breaking the build.

@dr29bart
Copy link
Contributor Author

@krmahadevan unfortunately, I don't have a solution. The PR is a just sample of test case for the bug.
I am ok closing this PR without merging it.

@juherr
Copy link
Member

juherr commented Aug 31, 2023

@dr29bart The fix should be easy. Do you want to try a fix?

You think it is a regression. Could you tell us when the behavior changed?
The documentation is not precise enough about the expected behavior: addition instead of overriding could be a valid behavior too. In such cases, we prefer to choose the historical behavior.
The fix should include a documentation update too.

@dr29bart
Copy link
Contributor Author

dr29bart commented Sep 1, 2023

The 'groups' parameter overrides any defined groups in parent and child xml files in 7.3.0
Starting with 7.4.0 the parameter does not affect scope defined in xml files.

@juherr the behavior has changed in 7.4.0 with this commit:
9c6cb87#diff-c9ad087b236ef4e9750660f8daa935b53c2356a437d3bf5d069ba370e8994cf6R499
It initializes m_currentRun

m_currentRun = new XmlRun();

which then affects condition in XmlSuite#getIncludedGroups:

    if (m_xmlGroups != null && (m_xmlGroups.getRun() != null)) {
      return m_xmlGroups.getRun().getIncludes();
    }

There is XmlTest#setIncludedGroups which works with xmlGroups,I tried to use the same approach for XmlSuite#setIncludedGroups. Please let me know if there is a better way to address the issue.

@krmahadevan krmahadevan merged commit 692d013 into testng-team:master Sep 2, 2023
8 of 9 checks passed
@dr29bart dr29bart deleted the groups_cli branch December 29, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in -groups CLA
3 participants