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
- You need to have a TestProject account. Don’t worry, it’s FREE.
- Slack team account.
Overview
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 ➡
Thanks for the post!
It seems like the hook does not send to Slack when the job is on a recurring schedule.
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.
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.
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 🙂
Hi there,
Having an issue when adding testproject app to slack. Specifically when choosing which channel to post to, when i select the channel and then press allow i get this error.
This page isn’t workingIf the problem continues, contact the site owner.
HTTP ERROR 400
any idea what im doing wrong here?
looks like it redirects to https://api.testproject.io/int/slack/auth/redirect?
removed the code from that url just in case.
Hello Mike, thanks for sharing the issue you’ve experienced. I understand our Support team reached out to you privately and was able to help resolve the issue for you? Always here if you have any further questions! 😉
Hi,
How to push the (Summary report Full report) on slack ?
Also, how to push only the failure screenshots to slack ?
Hello,
To answer your questions,
A short summary with a link to the TestProject platform’s report section is sent in slack.
To access the screenshots, full and summary reports, you can follow the link.
If you would like to be notified only on failure of the job, you can check that option when setting up the notifications on the job settings.
Thanks David, but is there any option of getting the summary pdf itself on slack where we can see or download the report instead of redirecting it to TestProject platform? As if the other person clicks on that link from the slack channel they won’t be able to open it if they are not in my Testproject teamlist.
When I try to Add Slack intergrations to y TestProject, I get the following error:
Apologies, but TestProject can’t be installed
This app isn’t listed in the Slack App Directory, so only workspace owners can install it.
How do I go about resolving this. Thank you!
Hello Trupthi,
This error probably mean that the workspace owners enabled app approval https://slack.com/intl/en-il/help/articles/202035138-Add-an-app-to-your-workspace.
You can talk with them about enabling TestProject.