STUnknownMessage ERROR: No Such Function: ‘status’
STUnknownMessage ERROR: No Such Function: ‘errors’
put merge(template) into file resultsName --like of code that shows the error
set failures to zero
set totalErrors to zero
repeat with each test in testResults
if the status of test is "Failure" then add 1 to failures
add test's errors to totalErrors
end repeat
I just tested this script and it worked on the large suite I tested it on. I think you may be running it against a suite that is missing an output file or has a corrupted logFile.txt. When the script fails, use the Show Script button to find the line it failed on. Put a breakpoint on that line and then run the script again. When the script pauses at the breakpoint, check the values that are feeding into it.
You can either clean up the suite so that the script will run, or you can add some checks to the values so that the script doesn’t try to process empty results.