Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Generating email reports

mwobensmith edited this page Jun 11, 2019 · 1 revision

Iris is capable of generating a report at completion, and sending it via email to desired recipients. This is done by editing the config file to add your specific user credentials, and running Iris with a specific command-line argument.

Email report example:

[Firefox 64.0][Osx_non_retina]Iris Test Report 2016-6-23

 Repo_details:
 Branch_name:dev
 Branch_head: 5dc6128bdfb30416b59bd6c165b2b99722f2d18e

Test_Run_Details:
----------------------------------------------------------------------------------------------------
Platform: osx, Firefox Version: 64.0, Firefox Build: 20181022150107
Passed: 114, Failed: 2, Skipped: 36, Errors: 0 -- Total: 152            Total time: 2954.18 second(s)

The following tests did not pass:
change_search_engine_positions
drag_and_drop_within_awesomebar

Editing the config file

The config.ini file lives in root of the Iris repo. It contains user-specific data that is read by your local Iris configuration. While it already contains some entries, it is considered to be your personal data. For email reporting, you will need to enter in private credentials for an email account, in plaintext, so you will likely not want to check in your changes to a public code repo. You are making a security decision about this email account. As such, use this feature at your own discretion.

Example:

[EmailServerConfig]
smtp_ssl_host = smtp.gmail.com
smtp_ssl_port = 465

[EmailRecipients]
sender = my.iris.report@gmail.com
targets = ['test@mail.com']

[EmailAccount]
username=my.iris.report@gmail.com
password=I_Love_kittens81
  • The section EmailServerConfig specifies the protocol and port used by your email provider.

  • The section EmailRecipients contains both your email address (sender) and a list of target recipient addresses. Multiple recipients, including email lists, can be specified here.

Example:

targets = ['test@mail.com','test1@mail.com','test2@mail.com']

  • The section EmailAccount contains your email address and password. Again, this information is sensitive and should only be used if you are comfortable with storing your password in plaintext on your computer.

Reporting results

Once the config.ini file has been properly updated, Iris can be made to send an email report when it completes a run.

Examples:

To run a single test and report it:

iris -t copy_context_menu -e

To run directory of tests and report it:

iris -d bookmark_tests -e

To run the entire Iris project and report all tests:

iris -e