PDF Ng Report

This is the pdf report plugin library written for testng/selenium, this listener will generate the pdf report on test cases run, its very simple to configure no need to write any code.

No Coding Just Configuration ! Free, Open source PDF report generator library for testng/selenium framework

Download sample pdf report Eclipse sample code Ant/Maven sample code

Quick start

Environment and dependent jar file

  • Minimum JDK 1.6 or higher
  • Jfree jar
  • Apache FOP jar



Maven central repository

testng suit xml file

<?xml version="1.0" encoding="UTF-8"?>
<suite name="Simple Reporter Suite">

  <parameter name="pdfngreport-properties" value="D:\property_files\pdfngreport.properties" />

    <listener class-name="com.uttesh.pdfngreport.PDFReportListener" />

  <test name="Simple Reporter test">
      <class name="xyz" />
      <class name="abc" />

pdfngreport.properties file

pdfreport.title.text=Report Title Here

# application build version
pdfreport.app.build.version=Build v2.0.8

# Build System Details manual/code/hide code is default, use hide for not to display
# enable below only for manual setting by setting code mode it will automactically populate the values in report
# manual only for the mobile/tab env related details
#pdfreport.additional.line1=OS : testOS (64 bit)
#pdfreport.additional.line2=SYSTEM : test@testingbox
#pdfreport.additional.line3=Lorem ipsum dolor sit amet

#TimeColumn Date Format
#"yyyy.MM.dd G 'at' HH:mm:ss z" | 2001.07.04 AD at 12:08:56 PDT
#"EEE, MMM d, ''yy" | Wed, Jul 4, '01
#"h:mm a"  |  12:08 PM
#"hh 'o''clock' a, zzzz" | 12 o'clock PM, Pacific Daylight Time
#"K:mm a, z" | 0:08 PM, PDT
#"yyyyy.MMMMM.dd GGG hh:mm aaa" | 02001.July.04 AD 12:08 PM
#"EEE, d MMM yyyy HH:mm:ss Z"  |  Wed, 4 Jul 2001 12:08:56 -0700
#"yyMMddHHmmssZ" | 010704120856-0700
#"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" |  2001-07-04T12:08:56.235-0700
#"yyyy-MM-dd'T'HH:mm:ss.SSSXXX" |  2001-07-04T12:08:56.235-07:00
#"YYYY-'W'ww-u" | 2001-W27-3

pdfngreport.time.column.format=MMMM dd YYYY hh:mm:sss


# chat related

# pdf report output location

# pdf report file name

# tables/page setting : show/hide

# Below setting only for selenium user for selenium failed screen shot link show related

# error screen shot/image name standards.
#image type : png 
#image name : className + "_" + methodName

# for the better view or use of the space please use only 4 column. showing all columns will make the view cluttered : show/hide

# Custom color setting Coming soon on 3.0.0 version

pdfngreport.properties file can be in any location just provide full real path of the file.
windows :

<parameter name="pdfngreport-properties" value="d:/application/properties/pdfngreport.properties" />

linux :
<parameter name="pdfngreport-properties" value="/user/home/application/pdfngreport.properties" />


1. If dataproviders are used in the test classes and need to update test case dynamically on scenario data base do the following changes.
a. Test class should implements 'ITest'
public class DynamicDataProviderTestName implements ITest {
b. Add @BeforeMethod(alwaysRun = true) method to update the test cases dynamically according to data provider data.
@BeforeMethod(alwaysRun = true)
    public void testData(Method method, Object[] testData) {
        String testCase = "";
        if (testData != null && testData.length > 0) {
            TestParameters testParams = null;
            String _dyna_name = null;
            //Check if test method has actually received required parameters
            for (Object testParameter : testData) {
                if (testParameter instanceof TestParameters) {
                    testParams = (TestParameters) testParameter;
                if (testParameter instanceof String) {
                    _dyna_name = (String) testParameter;
            if (testParams != null) {
                testCase = testParams.getTestName();
                testCase = _dyna_name;
        this.mTestCaseName = String.format("%s(%s)", method.getName(), testCase);
c. Full Test sample class

Code examples

Eclipse sample code Ant/Maven sample code