read and format test file