Split up query test file into smaller logical components