testng
testng copied to clipboard
fix the bug that xml report, testng-results.xml, doesn't have field 'test-instance-name' populated by any value of test result.
The current version of xml report leaves value of test-instance-name empty. this fix will fill the correct value for it.
I found this bug when learning this project, https://github.com/djangofan/testng-dynamic-testname
@peidong-hu Could you try to add a non regression test that will prove the fix?
Julien,
What do you mean 'non-regression test'? is it a code level unit test or a system level feature test?
Peidong
On 04/30/2015 03:01 PM, Julien Herr wrote:
@peidong-hu https://github.com/peidong-hu Could you try to add a non regression test that will prove the fix?
— Reply to this email directly or view it on GitHub https://github.com/cbeust/testng/pull/536#issuecomment-97928124.
I mean something which will warn if the same issue appears again.
not sure how this change will fix the problem. the following code is already there in getTestResultAttributes function
String testInstanceName = testResult.getTestName();
if (null != testInstanceName) {
attributes.setProperty(XMLReporterConfig.ATTR_TEST_INSTANCE_NAME, testInstanceName);
}
I fixed some testResult.getTestName()
issues few days ago.
Maybe this problem is no more relevant now.
Without a dedicated test, it is still difficult to check it.