Forum Discussion
rupert_anderson
8 years agoValued Contributor
Hi,
Do you have any actual content / text that you would like to write to the PDF?
To create a very simple PDF from Groovy in SoapUI, maybe consider the iText (http://developers.itextpdf.com/examples-itext5). Here is a simple script to get you started, it works from a Groovy TestStep (or tear down script etc):
import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter; Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream("/Users/test/soapuiblog/test.pdf")); document.open(); document.add(new Paragraph("Hello SoapUI!")); document.close();
You'll need to include the itextpdf-5.5.9.jar (or similar version 5) into the SoapUI java/app/bin/ext directory and restart.
Obviously, the PDF structure can be improved, but at least you can find tons of examples for iText 5.
If you need help obtaining the SoapUI test results in order to feed them into the report, then let me know.
Regards,
Rupert
- Sandyapitester8 years agoFrequent Contributor
Awesome bro, let's give a try will reach u once implemented..
Related Content
- 6 months ago
Recent Discussions
- 3 days ago