Chirag Dhingra
Chirag Dhingra

Reputation: 138

Is there a way to send log.html,report.html and output.xml in email after test completion in robot-framework?

I am trying to achieve one scenario in which i need to send log.html, report.html and output.xml directly in the email after completion of test suite and test case. I saw discussions on this part but not able to get the proper answer.

My questions are:

  1. How we are able to achieve this task if its possible?
  2. If we are not able to achieve then what's the alternate way?

Upvotes: 1

Views: 2501

Answers (2)

Batchu Bhargava
Batchu Bhargava

Reputation: 49

Use Jenkins Post-build Actions

enter image description here

Upvotes: 0

AutoTester213
AutoTester213

Reputation: 2862

There is a new metrics report release thanks to adiralashiva8.

The metrics provide more information including graphs.

This could be an alternative for your problem.

It supports email sending:

To send emails using the new metrics you would need to change the robotmetrics.py file with your email:

server = smtplib.SMTP('smtp.office365.com:587')
msg = MIMEMultipart() 
msg['Subject'] = 'MyProject Automation Status'

sender = '[email protected]'
recipients = ['[email protected]']

You can find more info here:

New metrics

Update:

To run your metrics after test execution you can use the following command

 robot test.robot && robotmetrics

Upvotes: 3

Related Questions