Dashboards & Visualizations

How to figure out Pass/Fail status of test cases based on the info provided and display it in a bar chart?

gpayal18
Explorer

Input to splunk is a CSV file which has columns as TestCaseID, ExpectedTime (Time which is expected for a test case to execute) and ActualTime (Time which test case has taken to execute). If Actualtime is <=ExpectedTime, then it is passed.
I want to figure out pass/fail test cases count by comparing ActualTime

0 Karma
1 Solution

renjith_nair
Legend

@gpayal18 ,

Try

|inputlookup testcase.csv |eval TestStatus=if(Actualtime <=ExpectedTime ,"Pass",Fail")|stats count by TestStatus

If your Actualtime and ExpectedTime are strings, then convert them to epoch by using strptime(your_time_variable,"Your dateformat")

---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

0 Karma

renjith_nair
Legend

@gpayal18 ,

Try

|inputlookup testcase.csv |eval TestStatus=if(Actualtime <=ExpectedTime ,"Pass",Fail")|stats count by TestStatus

If your Actualtime and ExpectedTime are strings, then convert them to epoch by using strptime(your_time_variable,"Your dateformat")

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

gpayal18
Explorer

it worked.
Thanks a lot,

0 Karma

renjith_nair
Legend

@gpayal18 , Glad to know 🙂 . Please accept as answer to close the thread

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...