I’m able to use the HTML Extra Reporter to capture our test’s results.
I then compress it and send it as an email.
This would mean that the recipient will get the ZIP file and will need to open the attachment first before getting into the actual report.
Thus, I’m thinking if I can include the number failures in the email body itself, so if there’s none, the recipient can focus on opening the attachments with failures.
Has anyone tried this? My script runs on PowerShell if it matters.
This isn’t really a Postman query if you are using PowerShell to send the email.
In your PowerShell script, you will need to import and parse the HTML report and target those elements so you can use them in your email template (before the code to compress the report).
I know a fair bit about PowerShell, but I’ve never had to work with HTML files before so I can’t tell you exactly how to parse the file (like I could if it was an CSV extract).
Couldn’t you just send the whole email as HTML, and not compress it?