Export a testcase into a file