Download presentation
Presentation is loading. Please wait.
Published byCaren Harmon Modified over 8 years ago
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
SILVERLIGHT UNIT TESTING DEMO
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
TESTING WINDOWS PHONE APPS DEMO
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
TESTING WINDOWS PHONE APIS DEMO
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/ http://silverlight.codeplex.com/ Ships with Silverlight 4
22
Questions? Jeff Wilcox – Email jwilcox@microsoft.com – Talk resources www.jeffatmix.comwww.jeffatmix.com – Blog www.jeff.wilcox.namewww.jeff.wilcox.name Please fill out an evaluation form!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.