uttesh / pdfngreport

This is the pdf report plugin library written for testng/selenium frameworks, this listener will generate the pdf report on testcases execution, its very simple to configure no need to write any code.
http://uttesh.github.io/pdfngreport/
Other
30 stars 26 forks source link

Can we add few more columns to the table in the report? #13

Open padmasri opened 8 years ago

padmasri commented 8 years ago

Hi Uttesh, @uttesh

Thank you so much for your efforts to generate PDF reports.

Is there any way that, we can add few more columns (Like Description about test case..etc) to the table in the report?

Regards, Padma.

uttesh commented 8 years ago

thanks padmasri, but report template may get affected if we increase the columns. could you please provide me more details.

padmasri commented 8 years ago

Thank you so much for responding quickly. :)

My management team has asked me that is there any way we can add Description about the test case in the place of "TimeTaken(ms)", which will give the details what the test is doing.

And if possible adding the company logo, in the bottom of the file. Same like Footer in MS Word file.

uttesh commented 8 years ago

@padmasri hmm need to make dymanic column on demand by the template of the report is under development , I will update this in next release.

padmasri commented 8 years ago

Thank you so much :)

uttesh commented 8 years ago

@padmasri footer is reserved for the open source library content. cont remove that or add any company logo on footer.

uttesh commented 8 years ago

@padmasri library is updated with new feature showing and hiding the table columns. its available under maven repository version"2.1.2" release, use this version for the latest changes or download the latest jar and use

ayazhasankhan commented 8 years ago

Hi Uttesh,

I have similar concern as padmasri has. Please find the attached Query.

You are doing great. Thanks for your help

Pdf Report.docx

uttesh commented 8 years ago

@ayaz915 thanks,

You can use annotation attribute testNameof the test method, Plugin will consider annotation attribute testNamefirst if not present it will consider method name.

i.e.

@Test(testName = "testing the testname attribute 1 ", description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut porttitor ut augue ut sodales. Vivamus maximus arcu ac odio vehicu ") public void Page1Test() { Assert.assertEquals(true,false); }

test case value will be attribute testName if not present it will get method name i.e. Page1Test hope this helps.

you can also make the data provider dynamically set the method name for your requirement, Once the test name are dynamically populated, pdf plugin automatically update those names. below link may help to set the method name dynamically by data provider.

http://stackoverflow.com/questions/15220262/custom-test-method-name-in-testng-reports

http://biggerwrench.blogspot.in/2014/02/testng-dynamically-naming-tests-from.html

ayazhasankhan commented 8 years ago

Thanks Uttesh,

Actually I am using data provider to generate multiple runs of the same test and want each run to have a unique name then there is a problem----

  1. @Test(testName ="") would not help in this case.
  2. I tried to implement ITest as suggested in http://stackoverflow.com/questions/15220262/custom-test-method-name-in-testng-reports But i dont see this getting reflected in reports.

Please Help..

uttesh commented 8 years ago

@ayaz915 Create an issue for your requirement, it's in my todo list for next release.

ayazhasankhan commented 8 years ago

Thanks Uttesh, I have created an issue for this. Please let me know when you have release.

padmasri commented 8 years ago

@uttesh,

Thank you so much for adding this.