Extent reports Error | Selenium Forum
Abhinav chawla Posted on 04/11/2020

When I am writing this line  in the code on the custom listener class, I am getting the below error. Without this line code is running fine. If this line doesnt run, it means even if the test case is failing, in the extent reports it will show as pass. I am stuck because of this.

code : test.log(Status.FAIL, (String) result.getThrowable().getMessage());


Error : java.lang.NullPointerException: Cannot invoke "com.aventstack.extentreports.ExtentTest.log(com.aventstack.extentreports.Status, String)" because "this.test" is null


Please help me with this .... And Thanks Ashish sir for the previous query

Ashish Replied on 04/11/2020

test is null

this means you have not initialized your test object

Please check video and code again

Related Posts