Udostępnij za pośrednictwem


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

Intellitrace

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 https://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 https://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

  • Anonymous
    March 22, 2010
    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?

  • Anonymous
    March 25, 2010
    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" Environment 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   -          Anu  

  • Anonymous
    April 07, 2010
    Anu, It would be great if it supports Silverlight app. Please let us know if we can use beta version of it. Thanks, [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!

  • Anonymous
    April 26, 2010
    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, Ketan

  • Anonymous
    May 07, 2010
    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

  • Anonymous
    May 07, 2010
    The comment has been removed

  • Anonymous
    June 25, 2010
    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.

  • Anonymous
    June 29, 2010
    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

  • Anonymous
    July 06, 2010
    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..Thanks,Hiral[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!

  • Anonymous
    July 07, 2010
    Hi Anu,Would you be able to provide us with an estimated timeframe for the SL UI automation?Thanks,Cam[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)

  • Anonymous
    July 08, 2010
    Thanks for being so responsive to our questions![Anu] Thanks for being so interactive, Cam - that's the reason I run this blog :)

  • Anonymous
    July 11, 2010
    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.

  • Anonymous
    July 20, 2010
    Hi Anu,When we can expect the CTP build? :-)[Anu] Vikas - the CTP is released. I mailed you about itRegards,Vikas

  • Anonymous
    August 16, 2010
    Hi Anu,I would like to get in on the CTP. Please let me know what you need.Thanks,Cam

  • Anonymous
    October 31, 2010
    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 Cheers

  • Anonymous
    November 07, 2010
    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.aspxMany Thanks,John

  • Anonymous
    January 03, 2011
    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 Regards,Mithul.

  • Anonymous
    March 09, 2011
    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 desktopRegards

  • Anonymous
    March 13, 2011
    The comment has been removed

  • Anonymous
    July 19, 2011
    The comment has been removed