Could the test execute iTermTests instead? The test target already includes all the code in iTerm, so it should work (though you'll have to change your applescript test code to "tell application iTermTests", I guess)