Get 'unique' results when uniqueness is defined by a different element

I have results from test runs, every run has a testrun_uuid, and every run creates 100s of result sets.
I want to create a pie chart of results in a field (which is metadata about the test run and he same in every result set from a specific run), but want one count per testrun (ie using the test_uuid to determine uniqueness of record)
How should I go about this please... ?

Hi Paul,

I'm not quite clear on what you're asking. Are each of your result sets a pass or fail of a test? And you're trying to get the count of pass or fail for each test run? Maybe you could show a mock-up of the important fields of a few documents?

Regards,
Lee

thanks for the reply. here are some sample documents..

{
"testrun_uuid": "eea579b6-1512-45c2-ac36-18ccc14ef730",
"type": "success",
"name": "test_02_edit_service_offering",
"time": 0.07197904586791992,
"base_cloudstack_version": "4.9",
"marvin_hypervisor": "vmware",
"hypervisor_version": "5.5",
"testrun_date": "Thu Dec 7 05:01:24 UTC 2017",
}

{
"testrun_uuid": "eea579b6-1512-45c2-ac36-18ccc14ef730",
"type": "success",
"name": "test_09_delete_detached_volume",
"time": 25.823681116104126,
"base_cloudstack_version": "4.9",
"marvin_hypervisor": "vmware",
"hypervisor_version": "5.5",
"testrun_date": "Thu Dec 7 05:01:24 UTC 2017"
}

I would have hundreds of these documents per test run.

These two documents refer to the same test run (they have the same testrun_uuid)
I want to be able to do things like:

  • show how many failures in each test run. for different hypervisors
  • show coverage of hypervisor testing over last month (with each test run being a count of 1, rather than 100's)

many thanks

Paul Angus

There's a lot of possibilities for looking at that data. One example would be to create a new Visualization using a Data Table.
In this example I first did a Terms aggregation on clientip, but you would pick either testrun_uuid or marvin_hypervisor.
And then I did a Filter aggregation with response:200 and response:404, but you would use type:success and type:failure.
Then in the results you would see each testrun_uuid (or marvin_hypervisor) with the pass and fail counts.

Another way to get almost the same thing, is to split with a Terms aggregation on both fields like below. In this case I might see other response codes that I hadn't included in the filters above. But I also don't see the count where it's zero.

And you can do the same thing in a pie chart;

As you create visualizations that are useful, save them, and then add them to a dashboard.

Regards,
Lee

Thanks for the effort that you’re putting in here.
Let me ask this a different way, if I wanted to know how many test runs I had done (ie how many unique uuids are there) – how would I get to that?

Kind regards,

Paul Angus

VP Technology
paul.angus@shapeblue.com
www.shapeblue.com

Sorry for the dealy. Holidays and all that.

It's easy to create a new Metric visualization and change the default Count metric to Unique Count and then select the field that you want the unique count of (like test run id).

Regards,
Lee