Daily automated test plan status emails from Jira: How to set it up?

Hey everyone,

I’m trying to figure out how to get Jira Xray to send out daily test plan status emails automatically. We’re already using Jenkins for remote parallel execution, which updates the test case statuses in Jira Xray. But I want to take it a step further.

What I’m aiming for is an email that goes out to my manager and me every day at a set time. It should give us a quick rundown of how many test cases passed and how many failed.

I’ve played around with the ‘Create rules’ feature and tried using smart values, but I’m not getting anywhere. Has anyone set up something like this before? Any tips or tricks would be super helpful!

Thanks in advance for any advice you can throw my way!

hey alice, have u tried jira automation? its pretty good for this kinda stuff. u can set up a rule to run daily, grab test stats, and send an email. might need some jql knowhow tho. if that doesnt work, maybe look into a plugin? theres tons out there for custom reporting

I’ve tackled this challenge before using Jira’s built-in tools. The key is leveraging Jira Automation combined with a well-crafted JQL query. Start by creating a new automation rule that triggers daily at your desired time. In the rule, use JQL to filter for your specific test cases and their statuses. Then, add an action to send an email, utilizing Jira’s smart values to populate the content dynamically. You can include things like {{jira.issue.key}}, {{issue.status}}, and aggregation functions to summarize pass/fail counts. It might take some tweaking, but once set up, it’s a hands-off solution. Just ensure your JQL is precise to avoid information overload in the emails.

I’ve actually implemented something similar in my organization, and it’s been a game-changer for our test reporting process. We used a combination of Jira’s built-in features and a custom script to achieve this.

First, we set up a JQL filter to capture the test cases we wanted to report on. Then, we created a dashboard in Jira with gadgets showing test case statuses. This gave us a visual representation of our test plan status.

For the email automation, we wrote a simple Python script that queries Jira’s REST API to fetch the test case data. We scheduled this script to run daily using a cron job on our server. The script compiles the data into a concise email format and sends it out using our company’s SMTP server.

It took some trial and error to get the formatting right and ensure we were pulling the correct data, but once set up, it’s been running smoothly for months. The daily emails have significantly improved our team’s visibility into test progress and helped catch issues earlier in the development cycle.

If you’re comfortable with a bit of scripting, this approach might work well for your needs too.