We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
7.3.0
getXmlClasses()in XmlTest should not be null when xmlTest.Clone()
getXmlClasses()
XmlTest
xmlTest.Clone()
getXmlClasses()in XmlTest is null when xmlTest.Clone() is called
Sample TestNG XML File
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite verbose="1" name="TestSuite" annotations="JDK"> <test name="Test1"> <classes> <class name="com.qa.SampleTest"/> </classes> </test> </suite>
The listener is added in the META-INF.services folder
META-INF.services
public class TestNgAlterSuiteListener implements IAlterSuiteListener { @Override public void alter(List<XmlSuite> suites) { XmlSuite suite = suites.get(0); List<XmlTest> xmlTests = suite.getTests(); XmlTest test = xmlTests.get(0); XmlTest newTest= (XmlTest) test.clone(); System.out.println("Contains: " + newTest.getXmlClasses().toString()) } }
The text was updated successfully, but these errors were encountered:
result.setXmlClasses(getXmlClasses()); is missing in the clone method.
result.setXmlClasses(getXmlClasses());
Would you like the propose a fix?
Sorry, something went wrong.
https://github.com/cbeust/testng/issues/2467
c554220
testng-team#2467; test case for bug
1fe0121
testng-team#2467; updated CHANGES.txt
e729bc6
result.setXmlClasses(getXmlClasses()); is missing in the clone method. Would you like the propose a fix?
Please check the PR for the fix
Issue 2467 (#2468)
d882ce7
* #2467 * #2467; test case for bug * #2467; updated CHANGES.txt
No branches or pull requests
TestNG Version
7.3.0
Expected behavior
getXmlClasses()
inXmlTest
should not be null whenxmlTest.Clone()
Actual behavior
getXmlClasses()
inXmlTest
is null whenxmlTest.Clone()
is calledIs the issue reproductible on runner?
Test case sample
Sample TestNG XML File
The listener is added in the
META-INF.services
folderThe text was updated successfully, but these errors were encountered: