ReportNG create better report than TestNG's normal report.
To Start With:
Step 1 : Download reportng-1.1.3.jar and velocity-dep-1.4.jar into classpath
Step 2: Create a testNG.xml file
Sample code for testNG.xml file
Note: In above code TestScripts2 is the class name under test
Step 3: Now right-clicking on that XML file and select "Run as... TestNG suite".
>>The Report generted will be @ test-output/html and are as shown below:
Note: In case you are getting the following error
java.lang.NoClassDefFoundError: com/google/inject/Module
> at java.lang.Class.getDeclaredMethods0(Native Method)
java.lang.NoClassDefFoundError: com/google/inject/Module
> at java.lang.Class.getDeclaredMethods0(Native Method)
Solution Is -->
1) Disable defaultlisteners , goto Eclipse Project-> Properties -> TestNG -> Diable deafult listeners.
and , 2) Download google-guice-3.0.zip and paste guice-3.0.jar into your classpath.
Now run and check the report in workspace/test-output/html.
1) Disable defaultlisteners , goto Eclipse Project-> Properties -> TestNG -> Diable deafult listeners.
and , 2) Download google-guice-3.0.zip and paste guice-3.0.jar into your classpath.
Now run and check the report in workspace/test-output/html.