Hello!
I use XRAY server and would like to compute Test Failure rate for each of my tests automatically and on regular basis.
Test failure rate = (No. of times test failed) / (Total no. of times test got executed)
I can get a similar statistics from Squish Test Center. Please see image below:

I have already tried following:
1. I figured out that I can compute Rate=A/B manually for a specific test (e.g. DEMO-9) using the following JQL
A = [issuetype = 'Test Execution' and issue in testTestExecutions('DEMO-9', 'FAIL')]
B = [issuetype = 'Test Execution' and (issue in testTestExecutions('DEMO-9', 'FAIL') OR issue in testTestExecutions('DEMO-9', 'PASS')]
For this, I referred documentation at the link below:
https://docs.getxray.app/display/XRAY/Enhanced+querying+with+JQL
But there is no way that I could find to do this automatically for all of my tests.
2. I tried but could not accomplish this with Rich Filters on my Dashboard to show list of my tests with a column for "Failure rate".
3. I was not able to find any column on the default XRay Reports or Test panel to get such a statistics. A similar statistics is available on Test Execution Report for "Success Rate" (please see image below) but that is applicable for the entire execution which may contain several tests. I would like to see it for individual tests.

Any help is greatly appreciated. Thanks!