capture_test_output fleshed out