Need help in grouping my test case results based on categories.
Hi,
I am having a requirement where i need to represent my tests in categories, Let say i have 10 tests which falls under 2 categories. I want to so these two categories as main headers and then when user clicks this category it should show the 5 tests under it.
Category1: Test1......Test5 Category2 Test6........Test10.
Can you please provide these pointers how we can achieve using C# .
Thanks Chaitanya
As far as I know, you need to use the parent-child concept here to satisfy your requirement.
ExtentTest parent = extent.startTest("Parent");
ExtentTest child1 = extent.startTest("Child 1");
child1.log(LogStatus.INFO, "Info");
ExtentTest child2 = extent.startTest("Child 2");
child2.log(LogStatus.PASS, "Pass");
parent
.appendChild(child1)
.appendChild(child2);
extent.endTest(parent);
here parent will be your category1, category 2 and child will be individual tests within that category.
source: extentreports documentation
I hope this will help.
I am not getting parent.appendChild itself