methods for writing tests to files and getting them