logo logo

How To Get Slack Notifications for your Test Automation Reports

main post image

In the last few years Slack has become the most popular collaboration tool for development teams around the world. Besides chatting with team members, Slack is often used to broadcast important information regarding various processes and events in the product’s development cycle. With TestProject you now have the option to receive easy to read summary reports of your test automation job executions with Slack notifications. Whether your job was executed manually, by a schedule or from a CI tool build like Jenkins.

This article will guide you step by step through the process of sending TestProject job notifications to your team’s Slack workspace.

Prerequisites

  1. You need to have a TestProject account. Don’t worry, it’s FREE.
  2. Slack team account.

Overview

  1. Adding Slack Integration to TestProject
  2. Sending TestProject Job Notifications to Slack
  3. Conclusion

1. Adding Slack Integration to TestProject

NOTE: This part can be only completed by a TestProject account administrator.

  • Open your favorite browser and login to your TestProject account.
  • Navigate to the “Integrations” section in the settings page from the top-right menu (Account–>Integrations).
  • Click the  and you will be redirected to the Slack authorization page.

  • After the redirect you will need to choose the team and a channel where your TestProject notifications will be sent to (You will be asked to login into your Slack team account if you were not already logged in).
  • Choose the team and the channel and hit “Authorize”. In this example we will choose the #automation channel in the “GoodTeam” team.

  • After authorizing, you will be redirected back to the “Integrations” section of your TestProject account settings. You will now see a Slack integration entry containing the name of your slack team and the channel for the integration.

That’s it. You now have completed setting up your Slack integration and you are ready to send notifications to the chosen destination team/channel. You can add several Slack integrations in the same TestProject account if you wish to have separated channels for different jobs/projects.

2. Sending TestProject Job Notifications to Slack

After setting up Slack integration and authorizing a designated channel, we are ready to send notifications.

  • Navigate to your desired project and click on the envelope icon of your job of choice to open the notifications preferences.
  • Enable Web Hooks, select the Slack integration that we’ve added in the beginning and click “Save”.

This is it! You will now receive a well formatted job execution summary in Slack after the job completes its execution. Here is an example of such a notification for a “Sanity” job that was executed on Chrome and IE browsers and contained 2 tests. The notification also contains a direct link to the generated TestProject report.

3. Conclusion

In this article, we’ve connected Slack to our TestProject account and configured a job notification to be sent when the job finishes execution. Getting an execution summary notification right into Slack allows you to always be aware of your automated test execution results and quickly respond to any unexpected failures that may occur.

 

Happy Testing! 

Feel free to leave your comments below  ➡ 

Eldar Kravetsky

About the author

Eldar Kravetsky

Test Automation Expert & CTO at TestProject

Join TestProject Community

Get full access to the world's first cloud-based, open source friendly testing community. Enjoy TestProject's end-to-end test automation Platform, Forum, Blog and Docs - All for FREE.

Join Us Now  

Comments

7 4 comments
  • Avatar
    theove April 3, 2019, 9:31 am

    Thanks for the post!
    It seems like the hook does not send to Slack when the job is on a recurring schedule.

    • Eldar Kravetsky
      Eldar Kravetsky April 3, 2019, 5:57 pm

      Hi Theove,

      Thank you for bringing this to our attention, I highly appreciate your feedback! Just now released a fix for this, let me know that it works well for you now.

  • Avatar
    theove April 4, 2019, 12:35 pm

    Hi Eldar,
    Thank you for fixing the issue so quickly, it works like a charm!
    The only think now is when I hover the mouse over the clock for the job, the time does not change/update for the next execution.

    • Karen Teboulle
      Karen Teboulle April 17, 2019, 5:30 pm

      Hi Theove,
      We’ve released a new version (0.52) and fixed the issue you had. Let us know if it works well for you now.
      We are always here if you need anything or have any further questions 🙂

Leave a Reply

Join TestProject Newsletter

Join a 20K community of readers! Always stay up-to-date with all the latest test automation trends, best practice and tips shared by leading software testing community experts across the globe!

FacebookLinkedInTwitterEmail