Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

[HelpNeeded]Unable to Append Child Tests in for loog in version 2.0 #1105

Open

Description

@rajikuchana

Summary

1.Running API Tests using Excel Data for 4 rows
2.Created Parent Test before for loop
3.Created Child Test under for loop to print Test Case Name in report
4.After appending child Test to parent displaying 4 records in report and each record having 1 test case name and 2nd row having 2 records,3rd row having 3 records,4th row having 4 records.
Please help how to resolve this problem and my code is .

Expected Behavior

Current Behavior

Sample

pubcli Class{

![extent child tsts](https://user-images.githubusercontent.com/25505499/44206219-bd5cf980-a176-11e8-8435-e1478e0c46d7.png)
![extent child tsts](https://user-images.githubusercontent.com/25505499/44206234-ca79e880-a176-11e8-83f6-c426a754e8c0.png)

@Test
public void testCustomerCreation(){

parentTest = extent.startTest("Create Customer API Test");

for(int i=1,i<=4;i++){

String testCaseName = ReadWriteExcel.getCellValue(xl, sheet, i,1);

test = extent.startTest(testCaseName);			
test.log(LogStatus.PASS, "Customer Creation Test is started");	

//Some If Condtions here

if(response_Mes.equals("SUCCESS")){

test.log(LogStatus.PASS,response_Mes );	

}else{
test.log(LogStatus.FAIL,response_Mes );	
	}

parentTest.appendChild(test);
			extent.endTest(parentTest);
			test.getRunStatus();

	}

}


}

Environment Details

  • Extent report Version used:2.04
  • Operating System and version:Windows 7
  • JDK Version:1.8

Screenshots

Activity

  1. foursyth commented on Aug 16, 2018

    @foursyth

    Version 2 is no longer supported. Please upgrade to version 3 out the upcoming version 4 (next month).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions