Quality Testing

Quality is delighting customers

Generating PDF report at the end of Selenium execution

Hey guys,

This is my first post here. :)

Is there any way we can generate PDF report having test cases pass/fail and other details at the end of Selenium test?

Thanks in advance.

Views: 1810

Reply to This

Replies to This Discussion

Hi Shah,

 do you  have solution for other format not PDF to test cases pass/fail can generate..Is it possible let me know..

I am also new to selenium..using selenium webdriver-Java..

Thanks in advance!!

Thanks & Regards,

Uday Reddy.S

Hi Uday,

You can use TestNG which generates report at the end of test execution with pass/fail status.

Hi  Maharshi Shah,

   You can use pdfngreport pdf plugin, which will generate the pdf report for the selenium/teestng test cases and no coding is required, just configuration and its open source free to use.!!


Hey thanks for the pointer.

Will give it a try.


I set it up with my existing project successfully with Ant. Test runs fine but below error is noticed after test is completed.

Exception in thread "main" java.lang.NoClassDefFoundError: com/lowagie/text/DocumentException
[testng] at com.uttesh.pdfngreport.PDFReportListener.generateReport(PDFReportListener.java:68)
[testng] at org.testng.TestNG.generateReports(TestNG.java:1115)
[testng] at org.testng.TestNG.run(TestNG.java:1074)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1364)
[testng] at org.testng.TestNG.main(TestNG.java:1333)
[testng] Caused by: java.lang.ClassNotFoundException: com.lowagie.text.DocumentException
[testng] at java.net.URLClassLoader$1.run(Unknown Source)
[testng] at java.net.URLClassLoader$1.run(Unknown Source)
[testng] at java.security.AccessController.doPrivileged(Native Method)
[testng] at java.net.URLClassLoader.findClass(Unknown Source)
[testng] at java.lang.ClassLoader.loadClass(Unknown Source)
[testng] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[testng] at java.lang.ClassLoader.loadClass(Unknown Source)
[testng] ... 5 more

PDF report is not generated.

Any idea about what might be causing the issue?

I believe its missing the itext.jar file in the classpath, Version 2.0.0 is released for the better quality of the pdf report. http://uttesh.github.io/pdfngreport/

OK, Finally I have figured out how to generate PDF report for Selenium test execution. In case anyone wondering how, I have blogged about it at below link.


That's good...
if anything else do share please.

I want to run commands from excel to command selenium to test.Can you help me out in this case

Thank you

I believe you want to use some spreadsheet data as an input to your Selenium tests. In that case, you can use some Java libraries like Apache POI or JXL.

Nice to see the extracted code from the library, thats what open source  is for.... for details library with good quality of pdf use latest  2.0.0 version http://uttesh.github.io/pdfngreport/


TTWT Magazine





© 2022   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service