+2 votes
394 views
in Test Automation by Laurin Prinz (17 points)
Hi everybody,

I've created a test script in Typhoon Test IDE and created some plots with the matplotlib library. I exported them and stored them as a .png.

Can I import this .png into the automatic generated PDF Report ?

I already figured out how to import them into allure but not in the PDF.

Thanks!

1 Answer

+1 vote
by Jovan Zelic (156 points)
selected by Dimitrije Jelić
 
Best answer

Hi Laurin,

I'm not sure which way you generated and exported your plots, but adding of the plots in .png format should be possible using attach_figure function from TyphoonTest API: documentation

I've never used that function with pdf reports, but I'd expect it to work the same way it does for Allure reports.

by Tiarles Guterres (10 points)
+2
This solution given by Jovan is a good way to plot the signals that you require in the report.

An alternative, in case you don't wish to replace your plots by using the attach_figure function and to attach them as they are, is using the allure package and the allure.attach.file function.

With this function, you can attach files, like .png format, in your Allure report. In a quick test that I tried, the attached figure is also shown on the PDF report.
by Laurin Prinz (17 points)
+1
Thanks you for your aswers. Both ways solved my problem perfectly!

Thanks a lot!
...