-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Parameters added in XmlTest during AlterSuiteListener not available in SuiteListener #2469
Comments
https://github.com/cbeust/testng/blob/841ae94bd07f68695878f679e03f6d6be6a1884d/src/main/java/org/testng/xml/XmlTest.java#L429 |
Looking at it more, this issue impacts several other fields. Since the method does not advertise support for deep cloning, I hesitate to call this a bug, just undesired behavior. I'd be willing to look deeper into what else would need an update to support a deep clone, but perhaps someone more established could provide some insight? |
I agree it should work. Could you propose a fix? Until it breaks things, we will be happy to merge it. |
I'll work on it. This certainly goes very deep given how many models are nested under the XmlTest. The circular reference between XmlTest and XmlSuite may need some extra thought. My intuition is that cloning the test should not clone the parent suite. However, using the same suite would lead to a slightly inconsistent state where the cloned test has a parent suite but will not be executed since it is not listed in the suite's tests. As long as this is explicitly stated in the javadoc, does this behavior make sense? |
TestNG Version
7.3.0
Is the issue reproductible on runner?
Test case sample
testng.xml
AlterSuiteListener
SuiteListener
From the above
SuiteListener
code following is the behaviorExpected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: