I am using the extentreports jar verson 3.1.2. When I copied the ExtentManager.java class, it seems to having issues as in the screenshot. Is this because some of the methods in the class are not working in later jars?? how to resolve this issue. I cant move forward in DDF until this issue is resolved.
Instructor
Ashish Thakur Replied on 18/04/2020
Please watch the latest video on extent reports as explained in hybrid framework
I wathched the hybrid video and after using ExtentManager from hybrid, I am getting nullpointerexception. Here is the trace, testcase, properties file, ExtentManager class. Can you please help with this?
RemoteTestNG] detected TestNG version 7.0.0
org.testng.TestNGException:
Cannot instantiate class com.qtpselenium.testcases.DummyTestC
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:30)
at org.testng.internal.InstanceCreator.instantiateUsingDefaultConstructor(InstanceCreator.java:193)
at org.testng.internal.InstanceCreator.createInstanceUsingObjectFactory(InstanceCreator.java:113)
at org.testng.internal.InstanceCreator.createInstance(InstanceCreator.java:79)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:114)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:172)
at org.testng.TestClass.getInstances(TestClass.java:102)
at org.testng.TestClass.initTestClassesAndInstances(TestClass.java:82)
at org.testng.TestClass.init(TestClass.java:74)
at org.testng.TestClass.<init>(TestClass.java:39)
at org.testng.TestRunner.initMethods(TestRunner.java:463)
at org.testng.TestRunner.init(TestRunner.java:342)
at org.testng.TestRunner.init(TestRunner.java:295)
at org.testng.TestRunner.<init>(TestRunner.java:226)
at org.testng.remote.support.RemoteTestNG6_12$1.newTestRunner(RemoteTestNG6_12.java:33)
at org.testng.remote.support.RemoteTestNG6_12$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_12.java:66)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:679)
at org.testng.SuiteRunner.init(SuiteRunner.java:196)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:127)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1265)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1093)
at org.testng.TestNG.runSuites(TestNG.java:1032)
at org.testng.TestNG.run(TestNG.java:1000)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:23)
... 26 more
Caused by: java.lang.NullPointerException
at com.qtpselenium.testcases.DummyTestC.<init>(DummyTestC.java:12)
... 32 more
test case is:
properties files is:
ExtentManager class is:
Instructor
Ashish Thakur Replied on 21/04/2020
Which module number are you watching?
Hi sorry for the delay. I was doing module 23 part4 which is about generating extent reports. You said use the method in hybrid framework for extenet manager and use it in the data driven framework. But that doesnt seem to was shown in above error message. please help or let me know if you want to remote loginto my machine that will be a quicker way to resolve the issue
problem is with version of ExtentManger file
send your email address I will send you file
Instructor
Ashish Thakur Replied on 04/05/2020
New Extent Reports version has come up. New Extent Manager file has to be made.
We uploaded new video:
https://www.qtpselenium.com/selenium-tutorial/testng-selenium-framework-part-4
when you will you update the extentmanager in all the franmework?? I have been stuck due to old extenmanager for a while now.
Also have you covered listners in TestNG? Sorry if I have missed it.
Instructor
Ashish Thakur Replied on 05/05/2020
1) In the above video, we have shown the new extent manager. It can be easily used in the framework by replacing file. Please watch it once
2) Listeners are covered in Testng