Automated daily test execution summary emails from Jira Xray at scheduled time

I need help setting up automated email reports in Jira Xray that show test execution results daily. I want these emails to include details like how many tests passed and how many failed, sent to specific people at a set time each day.

My current setup uses Jenkins for running tests in parallel, and it updates our test results in Jira Xray automatically. This part works fine. However, I also need to get daily summary emails with the test statistics.

I already tried setting up automation rules with smart values but couldn’t get it working properly. Has anyone managed to configure scheduled email reports for test plan summaries in Jira Xray? What’s the best approach to achieve this kind of daily reporting?

we fixed this with Xray’s built-in reporting plus webhook triggers. set up a webhook that fires after test runs finish, then have it hit a small serverless function (we went with AWS Lambda) to pull the data together and send emails. way easier than messing with automation rules and you get way more control over how the emails look.

Had the same need and got it working with Jira’s automation rules plus JQL queries. I set up a scheduled rule that runs daily and uses JQL to grab test executions from the last 24 hours. You can pull the stats with smart values like {{issue.testExecutions.passed}} and {{issue.testExecutions.failed}}, but here’s the catch - these only work with Test Plan issues. So your rule has to loop through the relevant Test Plans first. Mine runs at 8 AM and queries all Test Plans with executions from the previous day. I used basic HTML in the email template to make the data look clean. Watch out for timezones though - your JQL needs to account for your local timezone when filtering dates or you’ll get weird results.

To achieve daily automated summary emails in Jira Xray, consider leveraging Xray’s REST API in conjunction with a scheduled script. Since your Jenkins setup already runs tests, you can modify it to retrieve test execution statistics through the API. Utilizing the GraphQL API allows you to specifically access the results from designated test plans or sets. I implemented a Python script scheduled via cron, which fetches the necessary data, formats it into an HTML report, and sends it through our SMTP server. This API access reliably provides pass/fail statistics and execution details. If custom scripting is not feasible, you might explore tools like Zapier or Power Automate to link Jira webhooks to email services, although additional configuration will be required for daily summaries.