Serialize test results to file.