How do I filter Errors and Warning from the Test Run?
The ScriptResults() function returns all the results for the current script (or optionally the name of a scripted passed in).
These results are stored in a list from the first run through to the last run. For this example we ONLY look at the latest run. We can easily filter the results by parsing the log file.
(* InterestingResults -- Returns an Array of Log Lines With Errors or Warnings for the latest run of the current script (or passed in script name) *) params scriptName set returnResults to empty if scriptName is empty then put logfile of last item of ScriptResults() into latestLogFile else put logfile of last item of ScriptResults(scriptName) into latestLogFile end if repeat with each line logLine of file latestLogFile put item 2 delimited by tab of logLine into Command if Command equals "logerror" or Command equals "logwarning" then insert logLine after returnResults end repeat return returnResults