Re: WWDC and AS (was Re: QuickTime and GarageBand)
Re: WWDC and AS (was Re: QuickTime and GarageBand)
- Subject: Re: WWDC and AS (was Re: QuickTime and GarageBand)
- From: Jon Pugh <email@hidden>
- Date: Thu, 01 Apr 2004 11:11:12 -0800
At 2:32 AM +0100 4/1/04, has wrote:
>
John C. Welch wrote:
>
>
>Ooh...the list of WWDC sessions that mention AppleScript:
>
>[...]
>
>Automated Testing Using AppleScript
>
>[...]
>
>
This piqued my interest, so I looked up the description for this session:
>
>
"Using practical examples, this session will teach you how adding an AppleScript interface to your application can provide an efficient and powerful way to create thorough automated testing.[...]"
>
>
Uh-oh...
>
>
As acting temporary devil's advocate, I gotta say this sounds very _wrong_. Writing tests against an application's scripting interface is fine... for testing the scripting interface. But for testing an application's business layer, aka Model, developers should be writing their automated tests directly against the Model's own APIs, classes, procedures, etc. Not several layers away; especially when those extra layers are closed, immature, and a potential source of bugs themselves.
On the contrary, as one of the few people who have written fully recordable factored applications, I can only say that using AppleScript to test your program is the greatest thing since Virtual User.
Scripting typically talks directly to the model, and using automated scripts to do regression testing (does it still work?) and basic functionality testing results in a much more stable application.
There's a common distinction in the testing world between "black box" and "white box" testing. Black box is where the user cannot see any of the code, just the UI. White box is where they test the application's APIs with custom code. It turns out that scripting can help with both of these roles. Having bug reports submitted with scripts is wonderful, and it helps both the developers and testers get past the whole "but you didn't mention that step" part of bug reporting. Recording *really* helps here since you can record the steps to recreate a bug and submit the bug.
So basically, this isn't a bad idea at all. It's a downright good idea.
Jon
_______________________________________________
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.