How can I extract the pass/fail tests results

The solution is simple : just use a try {…} catch {…} pattern

See example here.