Testing support for Silverlight apps in Visual Studio 2010

Whenever we talk about platform coverage for UI automation one of the frequent requests is support for Silverlight app testing. We have been hard at work trying to cater to this need and here is an update on where we are with this roadmap.

We are working on adding support for Silverlight controls for “Fast forward for manual testing” and “Coded UI Tests”. The focus is on line-of-business applications built with Silverlight 4 for both in-browser and on the desktop. The initial investigation is in progress and we are working with the Silverlight team to close on the overall design. We are planning to release a CTP version of a plugin by Q2CY2010. This will be delivered out of band to active MSDN subscribers (Test Pro, Premium and Ultimate) only. We are establishing the final release timeline yet.

Here is a picture of the state of our current Silverlight support

Testing for Silverlight apps

Test case authoring

Works – agnostic to client tech

Manual test case execution

Pure manual testing with pass/fail marking, bug filing works fine

Data diagnostic adapters

Fastfwd/action log

Not supported – work in progress. Plugin for UI automation for SL apps will be release out of band post Dev10


No specific support for SL apps. You could use Intellitrace to profile the business logic in the web app. For instance, collect IT logs on the web server remotely

Test Impact

No specific support for SL apps. You could collect TI logs on the web server remotely

Code coverage



No VS integration. Use separate command line at http://code.msdn.microsoft.com/silverlightut

From command line: use msbuild /t:coveragetest after id-ing the assembly to instrument in the unit test project file  

Event log

Works as is

Video recorder

Works as is

Unit tests


Separate download available from http://code.msdn.microsoft.com/silverlightut. SL unit test project is a separate project template in VS. Same test metadata as the VS unit test project. Runs from VS or through command line. Generates trx files as test results.

Coded UI tests

Not supported – work in progress. Plugin for UI automation for SL apps will be release out of band post Dev10

Web performance tests


Web perf tests work at the protocol layer, the SL client pieces are not tested. However SL apps could use WCF/JSON/REST protocols to communicate with the server. Editing and playback for these payloads have good support via the plugin here

Load tests

Use the web perf tests as part of the load test. No specific perf counters for SL apps

Comments (20)

  1. Ramkumar.A says:

    Hi Anu,

    We are using excel file in coded ui test, it read first record perfectly, but while selecting second record, buttonds are disabled and error messages says as

    “Test method LPS_AM_B2_230310.CodedUITest1.CodedUITestMethod1 threw exception:

    Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnBlockedControlException: Window ‘LPS Rate Collection System’ is blocking the control Next >. Please move the window ‘LPS Rate Collection System’ or make the control Next > visible and retry the action. Additional Details:

    TechnologyName:  ‘MSAA’

    Name:  ‘Next >’

    ControlType:  ‘Button’

    —> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F003″

    Can you please suggest any other method which we can use excel file for Coded UI test.

    [Anu] Ram – are you trying to record and play on an Excel worksheet? If that is the case, it won’t work since Excel grid is not supported. The blocked control exception however indicates you have some control blocking the excel sheet – is that correct?

  2. Ramkumar.A says:

    Am generating a method for second time (subsequent times), at first it allows us to generate the method, but we are getting the above error for subsequent times and recorded code was lost.

    “UIObject with ID UIClosewindow1 was not found”


    VSTS2010 RC

    OS: Windows Vista, XP

    Hi Vijet – Please post this q on the forum(http://social.msdn.microsoft.com/Forums/en-US/vsautotest ) after collecting the appropriate logs for this coded UI test to make more sense of the error message. Check out this blog for more info on collecting the right debug logs: http://blogs.msdn.com/gautamg/archive/2009/12/08/logging-a-message-in-test-result-as-part-of-an-automated-test.aspx




  3. Maan says:


    It would be great if it supports Silverlight app. Please let us know if we can use beta version of it.


    [Anu] Hi Maan – sure, we would love to have you dogfood our beta for SL UI testing support. Can you write to me via the blog contact link so that we can take this forward? Thanks!

  4. Ketan says:

    Hi Anu,

    I am also interested in Beta testing the plugin for SL automation.Can you please let me know what I am required to do to take this forward.

    [Anu] Hi Ketan – can you write to me via the “contact” link if your app matches the following please?

    • Is a Business app using Silverlight 4

    ·         Using (or willing to use) Visual Studio for writing test automation

    ·         No 3rd party controls

    Thanks and Regards,


  5. Lisa Habig says:

    Please add us to the beta as quickly as possible. Silverlight 4.0 coded UI testing on VS 2010 needed ASAP.

    [Anu] Hi Lisa – can you write to me via the contact link on my blog please? We can follow this up over mail

  6. Hi – I am a developer and will be using automated testing in VS 2010 heavily in the near future. OSIsoft is, I believe, an Ultimate subscriber.

    Could you please include me in the beta for these features.

    [Anu] Hello Randy – Tim from OSISoft is in touch with me about this already – I have a call with him today. I’ll let him know to loop you in as well. Thanks for your interest.

    Thank You


  7. Bill says:

    Any update on the CTP (or public beta)? Q2 is almost over. We have a SL4 LOB app with some Telerik controls. Thanks!

    [Anu] Hi Bill – we are running late on the SL CTP release. I should post an update this week. Thanks for your patience.

  8. Unit Testing says:

    It would be great if i could become a part of this program, but i am just a fresher in this field and i guess it will take me another couple of years to understand the whole working.

    [Anu] Hi – you can certainly take part in the beta program – this will be public and I'll update my blog when it is available

  9. Hiral says:

    Hi Anu,

    We have an application in Silverlight 4.0 and we wanted to automate it using VSTS 2010.  It will be great if you can provide any help to us since we need to finish it within3-4 weeks..



    [Anu] Hi again, Hiral – you can do unit testing or web testing on the SL app with 2010, but UI automation testing is not yet ready. Sorry!

  10. Cam says:

    Hi Anu,

    Would you be able to provide us with an estimated timeframe for the SL UI automation?



    [Anu] Hi Cam – the plugin should be released by end of year. And a beta should be available later this year – more specific dates when I have them (hopefully early next week)

  11. Cam says:

    Thanks for being so responsive to our questions!

    [Anu] Thanks for being so interactive, Cam – that's the reason I run this blog 🙂

  12. Unit Testing says:

    Looking forward to see the CTP version, it is always good to have beta test before actually making the launch of an application. This certainly helps to build more trustworthy softwares!

    Great piece of write up, thanks for sharing it with us!

    [Anu] Yeah – it is really so important to hear back from our users on the CTP builds. we are ALMOST there with the first CTP – this will be a limited preview with the NDA folks.

  13. Vikas says:

    Hi Anu,

    When we can expect the CTP build? 🙂

    [Anu] Vikas – the CTP is released. I mailed you about it



  14. CamB says:

    Hi Anu,

    I would like to get in on the CTP. Please let me know what you need.



  15. SimonD says:

    Anything further on this? We're currently working on a Silverlight project and really looking at getting Automated tests in place. We're using VS 2010 and Microsoft Test Manager.

    [Anu] Stay tuned, Simon – announcement coming up


  16. JohnM says:

    Any chance of access to the CTP? We are currently considering commercial tools but it would be nice to know whether the feature pack (2) would be enough for us. Also are there any firm dates for the actual release?

    [Anu] Check out the release details at http://blogs.msdn.com/b/anutthara/archive/2010/11/15/ui-automation-for-silverlight-apps-now-available-in-feature-pack-2-for-vs-2010.aspx

    Many Thanks,


  17. Mithul says:

    Hi Anu,

    Do you have update when will Microsoft release its UI Automation (Coded UI) framework with VS 2010 for Silverlight Applications. Thanks in advance.

    [Anu] Mithul – we released it in the Feature pack already – check out Visual Studio Feature Pack for more



  18. Satish G says:

    Hi Anu,

    Can you please let me know whether Silverlight is used for the Windows Phone UI Automation of the different apps like zune, camera? Please explain

    [Anu] Satish – you can use the plugin for all SL apps that run on the desktop


  19. QA Man says:

    Unfortunately the performance of Silverlight Coded UI test execution is unacceptably low.

    Why for example it is not possible to set "Playback.PlaybackSettings.DelayBetweenActions" to less than 100?

    Also is it possible to replace "Type" with something like "Set" as a method for entering text into TextEdit?

    It is in fact FASTER to fill-in two my Silverlight forms manually rather with VS 2010 UI Test!!

    [Anu] QA Man – that sounds strange. Can you please send us the UI test logs on my email id? Here are instructions to collect logs: http://blogs.msdn.com/b/gautamg/archive/2009/11/29/how-to-enable-tracing-for-ui-test-components.aspx

  20. testing whiz says:


    I would really love to guest post on your blog…E-testing equips employees and freelance staff with the skills necessary to create and execute effective and successful tests……

    [Anu] Write to me via the contact request please