Forum Discussion

Mr_Bro's avatar
Mr_Bro
Champion Level 0
5 years ago

Extent Report Child Nodes

Hi Team,

please tell me how to add child nodes to a step in extent report.

i reffered the article ini the link and tried achieving the same by using "AppendChild" method, but it is not working as expected.

it should give the "test" count as 1, but its giving the count as 2. i have attached the image of the report also.

below is the code snipped for the same.

  Test1 = extent.startTest("TestCase : TC001");
    Step1 = extent.startTest("Step : 1");
    Step1.log(logStatus.PASS, "Info");
    Step2 = extent.startTest("Step : 2");
    Step2.log(logStatus.PASS,"Pass");
    Test1
        .appendChild(Step1)
        .appendChild(Step2);

can anyone tell me how to do it.