1 / 24

Unit Testing Silverlight & Windows Phone Applications

Unit Testing Silverlight & Windows Phone Applications. Jeff Wilcox Senior Software Development Engineer Silverlight jwilcox@microsoft.com. Outline. Getting Started What’s new in Silverlight testing Unit testing in 5 minutes Silverlight Testing Walkthrough Testing Windows Phone Apps

fola
Télécharger la présentation

Unit Testing Silverlight & Windows Phone Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Unit Testing Silverlight & Windows Phone Applications Jeff Wilcox Senior Software Development Engineer Silverlight jwilcox@microsoft.com

  2. Outline • Getting Started • What’s new in Silverlight testing • Unit testing in 5 minutes • Silverlight Testing Walkthrough • Testing Windows Phone Apps • Wild Stuff • Questions

  3. Silverlight Unit Testing • Old Test Framework

  4. New Test Features • Modern user interface • Silverlight-based • Simple, focused user experience • Out of Browser support • Results management • Copy results to the clipboard • Elevated apps can e-mail

  5. Silverlight Unit Testing • New for 2010

  6. New Test Features • Better performance • Automation improvements • Command-line executable • Windows XP support • Out-of-browser launcher

  7. What is Unit Testing? Goal is to exercise business objects, states, validators. Keep the suits happy. Not so much… • Integration testing • User interface automating • Rendering verification

  8. Unit Tests are Important • Tests are important assets • Maintain a “suite of pain” for your code • Invest in your product for the long term • Consider test-driven development

  9. Unit Test Metadata Attributes [TestClass] [TestMethod] [ExpectedException(…)] [Priority(0)] Assertions Assert.IsTrue Assert.IsNotNull Assert.IsInstanceOfType StringAssert.Contains

  10. DEMO Silverlight unit testing

  11. Windows Phone Testing Where to start?

  12. Windows Phone Testing Same exact Silverlight unit test framework

  13. Windows Phone Testing

  14. Windows Phone Unit Testing • Silverlight Unit Test Framework • Same Visual Studio unit test metadata • Run existing Silverlight unit tests • Run .NET unit tests • Explore results • on the phone or in the emulator • in debug output

  15. DEMO TESTING WINDOWS PHONE APPS

  16. Windows Phone APIs • Accelerometer • GPS • Licensing • Phone Tasks • Vibration

  17. How to test phone APIs • Crawl • Manual & exploratory testing • Walk • Inversion of Control (IoC) with mocking • Run • Only time will tell

  18. DEMO TESTING WINDOWS PHONE APIs

  19. Wild Stuff • Automating tests during daily builds • Verifying storyboards, states, visual properties • Asynchronous testing • Testing WCF RIA Services and Silverlight apps as one large system • Network, authentication, authorization • User interface automation

  20. Wednesday Session Improving Software Quality for the Modern Web Learn about many testing methodologies for agile, modern web developers Euan Garden Wed 3:00 PM in Breakers J

  21. Call to Action • Get the bits today http://jeffatmix.com/ • In the next Silverlight Toolkit release http://silverlight.codeplex.com/Ships with Silverlight 4

  22. Questions? • Jeff Wilcox • Email jwilcox@microsoft.com • Talk resources www.jeffatmix.com • Blog www.jeff.wilcox.name Please fill out an evaluation form!

  23. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related