unified getTestPath method