簡體   English   中英

有沒有辦法在機器人框架中測試完成后在電子郵件中發送log.html,report.html和output.xml?

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

我試圖實現一個場景,我需要在完成測試套件和測試用例后直接在電子郵件中發送log.html,report.html和output.xml。 我看到了這方面的討論,但沒有得到正確的答案。

我的問題是:

  1. 如果可能的話,我們如何才能完成這項任務?
  2. 如果我們無法實現那么替代方式是什么?

由於adiralashiva8,有一個新的指標報告發布。

指標提供了更多信息,包括圖表。

這可能是您的問題的替代方案。

它支持電子郵件發送:

要使用新指標發送電子郵件,您需要使用電子郵件更改robotmetrics.py文件:

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

sender = 'sample@sample.com'
recipients = ['sampleuser@sample.com']

你可以在這里找到更多信息:

新指標

更新:

要在測試執行后運行指標,可以使用以下命令

 robot test.robot && robotmetrics

使用Jenkins Post-build Actions

在此輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM