Please see How to Modify Squish Functions for an introduction to this topic.
The following example demonstrates an alternative approach to modifying Squish functions which may or may not be a bit easier to understand.
In addition to modifying Squish functions, the example demonstrates counting the number of "fails" and "passes" in the respective variables.
Note that one drawback of this approach (and the approach at
How to Modify Squish Functions
) is that a double click on an entry in the Test Results view will open the script file at the line where the original Squish test function gets called - which could be - for example - the third line of the function