Export test to file