I'm struggling to figure out how to display a metric. I'm trying to display the overall pass rate of test passes. In my index, I have a scripted field which has total_tests, it is a sum of the following three fields:
results.passed_tests
results.skipped_tests
results.failed_tests
I'd like to display a metric which is a sum of results.passed_tests divided by the sum of total_tests.
In other words, I'd like to display
(results.passed_tests)/(results.passed_tests+results.skipped_tests+results.failed_tests).
I can get the overall sum of tests executed. And I can get the overall sum of results.passed_tests. And I can get both of those displayed on the metric widget at the same time. But the final part, the results-passed/total-tests part? I just can't figure it out. Can someone guide me, please?