Assuming you still have the _time field in the base search, then, on the assumption that the where clause test applies to the data prior to evaluating latest, then | where (resultMessage=="null") OR (Status=="Fail")
| table _time testName Status executed resultMessage
| stats latest(*) as * by testName will pick the latest one for each testName. If you do not have _time, then you can create time from the 'executed' field with | eval _time=strptime(executed, "%F %T.%Q") before the table statement. Note that your original resultMessage test was wrong as it is checking for =="null" AND NOT - so it will always be true, so you will need to correct according to your requirements. I have removed the redundant part above.
... View more