Capture output in test runner