Visualisation of latest results for distinct test cases in Bar chart, Pie chart

I am trying to use Kibana 7.6 for making visualisation for test results data.
I have around 58 different test cases which have been run multiple times(around 600) and stored in the DB.
Now whenever a test is run it results in pass or fail state. I am trying to create a visualisation which shows 2 bars for displaying the count of pass and fail of these 58 different test cases based on their state in the latest run.

Here are some of the discussions trying to address the same problem, but I could not find a solution in them.

Trying to address the problem graphically :
This screenshot shows that there are a total of 58 unique test cases.

But when we split it , it shows the count of unique test cases that have failed/ passed considering all the 600 test runs.

What I want is that those 58 unique test cases are distributed among the pass and failed bars based on their last run status. I have tried all the possible ways I could think of like top hit, unique count but could not find a solution.

I am hoping that in the latest updates you guys might have incorporated a way to do this. So is there any way to project this data graphically using Kibana?

@Marius_Dragomir - can you please take a look at this question when you get up?
Aryaman, can you please take a look at TSVB and see if it helps?


Hi Bhavya,

Thanks for the prompt reply ! I have been looking into your suggestion from the past few days.
I looked into TSVB and it looked quite promising as it operates on the recent values of a particular field. Unfortunately, I am not able to accomplish the desired results as mentioned in the Q.
The closest thing I was able to generate using TSVB is :
Using cardinality :

But even this is wrong as there are a total of 58 diff test cases and if we collect data based on the latest test runs of each case, 57 should be shown as passed and 1 should be shown as failed.

I tried other aggregations as well like top hit but it did not seem to work for getting the desired results as Top hit took only number fields.

Do you have any other suggestion as to how this can be accomplished?


Hi Aryaman,
Did you find a way to do this? I am trying to do almost the same thing , to make aggregations based on the results of latest occurrence. But I could not find a way to do this. Any luck?

Anyone else who could have tried this also can help me out.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.