• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WWDC and AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WWDC and AS


  • Subject: Re: WWDC and AS
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 1 Apr 2004 18:14:58 -0800

On Apr 1, 2004, at 10:24 AM, Andrew Oliver wrote:

To me, "Automated Testing" screams 'emulating user actions'. It does not in any way imply or require a robust object or event dictionary in the application which is what's needed for *true* AppleScriptability (at least on any worthwhile level). ... If Apple are redefining 'AppleScript support' as meaning 'can be automated via UI scripting' it's a sad, sad day for us all.

"Automated testing" means "automated testing." There are a variety of ways to attack the problem, depending on exactly what code you want to test and what tradeoffs you're willing to make.

If you want to test your View (as in the Model-View-Controller layers [1]), then GUI Scripting is a good way to do that. However, using GUI Scripting to test everything may be awkward for all the reasons that GUI Scripting itself is awkward -- it's difficult to read or write because there are no cues about what the heck checkbox 4 actually controls, and the scripts break whenever you rearrange your controls.

If you want to test your Model layer, then scripting (in the usual AppleScript sense, no, we're not changing it, quit panicking) is a good way to do it -- a proper dictionary should closely mirror your Model [2], and while AppleScript's current implementation may have a number of flaws (hi, has!), the parts that have to do with talking to an application actually work quite well. Added bonus: you write something that your customers can use, too! If you wanted a more direct link, as has seems to want, you could build tests directly into the application itself. However, this has problems of its own: it means that either the test code ships with the application, or else you don't test quite the same thing that you ship; and that tests must be written in C or some such, and many QA types don't know C (well).


--Chris Nebel
AppleScript Engineering

[1] See <http://developer.apple.com/documentation/Cocoa/Conceptual/ AppArchitecture/Concepts/MVC.html>.

[2] See the first two sections of <http://developer.apple.com/technotes/tn2002/tn2106.html>, in particular "What Is Scriptability?"

P.S.: Y'all should sit down, take a few deep breaths, and read <http://www.crazyapplerumors.com/archives/000206.html>.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: WWDC and AS (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: Get System Info - How
  • Next by Date: Re: Get System Info - How
  • Previous by thread: Re: WWDC and AS
  • Next by thread: Re: WWDC and AS
  • Index(es):
    • Date
    • Thread