We are passing test name to ExtentReports.createTest() as
ExtentReports.createTest("LoginTest);
if a file contains more than one test,
then how to pass testname to ExtentReports.createTest() dynamically.
Instructor
Ashish Thakur Replied on 28/11/2020
You want to make a seperate report for each test?
If yes the you can write this line in each test. Or you can write it once in @BeforeMethod annoation.
In @Beforemethod you can get the name of the test as well. Just watch the testng videos and you will come to know how
Got the answer in next module. By using ITestResult in init()
Thanks
Instructor
Ashish Thakur Replied on 01/12/2020
Thats good :)
More ways are there. I am creating new video for data driven framework. Will discuss in that