How will we automate a Silverlight application?

Microsoft Silverlight Recent Silverlight rants encouraged me to dig into it to help better understand exactly what it is, and how one would automate the technology. My fear was that since it’s a Flash killer, it means that it’s like Flash, and automation would be near impossible. My hunch is correct, at least for now.


I did a little exploratory research to better understand Silverlight and knowing that it uses JavaScript my thought was that maybe it could be driven through the function calls available in application’s exposed JavaScript functions. No success. In IE7, when trying to simply redefine a JavaScript defined variable from the URL bar I get the following error:


Internet Explorer cannot download .
Unspecified error


Similar attempts with FireFox and the FireBug addon didn’t get me any further.


Today, the Braidy Tester mentioned a new software testing forum, and I spied it as a great opportunity to post my concern with Microsoft testers listening. Brian McMaster gave us a little insight to where automation of Silverlight is at and the possibility of it’s future:


Brent Strange wrote:
I’m a little worried about how we test automation engineers will be able to pull off the automation of a Silverlight application. What are your thoughts? Is there a plan for a supporting automation library? Is there any information available regarding this?


Brian McMaster wrote:
I understand your worry.  Right now, it’s pretty much untestable from the traditional out-of-proc UI testing perspective.  I’m a Test Architect at Microsoft, and I’m struggling with the same issue.  We urged the Silverlight team to implement Accessibility for this release, but there just wasn’t time.  I can assure you that Silverlight will support MSAA and/or Windows UI Automation on Windows, and Silverlight intends to support the Mac AXAPI on the Mac.  Thus, any existing test tools that support driving UI through Accessibility will be fully enabled to automate Silverlight applications in a future release.


For now, you pretty much would need to do some in-proc testing of your application using the object model.

It looks like Microsoft intends to do the right thing, it’s just too early in the game. How could they not? Without the possibility of automation, Silverlight will never find a snug little home in a world class business Web application. Confining tests to only manual would cost way too much. I can’t imagine companies sacrificing cost for a pretty UI.

…Well, at least not the quality conscious companies.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.