Return test results as array instead of printing to stdout