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
@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")
@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")
it worked.
Thanks a lot,
@gpayal18 , Glad to know 🙂 . Please accept as answer to close the thread