testng icon indicating copy to clipboard operation
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.

Open peidong-hu opened this issue 10 years ago • 5 comments

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 avatar Jul 17 '14 01:07 peidong-hu

@peidong-hu Could you try to add a non regression test that will prove the fix?

juherr avatar Apr 30 '15 19:04 juherr

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.

peidong-hu avatar Apr 30 '15 19:04 peidong-hu

I mean something which will warn if the same issue appears again.

juherr avatar Apr 30 '15 20:04 juherr

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);
    }

testn avatar Nov 05 '15 21:11 testn

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.

juherr avatar Nov 06 '15 02:11 juherr