Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Email Notification for dynamic test run


#1

Hi Tobias,

I’m creating dynamic test run from my c# nunit tests and i would like to send email notification about the new test run/ test result (test report) to my team after all test cases in that test run finishes. We have back ground task (task.php) set up in our test rail server and it’s running. Under Administration > site settings > Email i added our smtp server and the test email is working. I’m not sure what i should do next. Please help!!!

Thanks,
Sara


#2

Hi Sara,

Thanks for your posting. TestRail wouldn’t create an email notification in this case and “only” when assigning new tests or adding new results. You can subscribe to test runs via the email icon when viewing a test run and are notified about changes. Do you add test results via the API as well or via the UI? If you automatically adding results and close the test run, you can also look into sending the emails from your script. Would this work for you?

Cheers,
Tobias


#3

Thank much for the response Tobias! I’m adding test results via API using “add_result_for_case” . I would like to send test results (pass/fail) for my new test run in the email. Is there a way i can do it?
Please see attached screenshot


#4

Hi Sara,

TestRail will automatically send notifications for new test results depending on the subscriptions you registered (in the UI), or if the tests are assigned. The notification for add_result/add_result_for_case is the same as in the UI via the Add Result dialog. You can also always send additional/custom notifications on your own as part of your script independently of TestRail.

I hope this helps!

Cheers,
Tobias


#5

Is there any tutorial/article on how to do subscription from UI?

Thanks,
Salma


#6

Hi Salma,

You can simply subscribe to changes in a test run via the email icon when viewing a test run:

(the icon on the left)

I hope this helps!

Cheers,
Tobias