About Me: Eric Hexter Director of Austin.Net User Group AspInsiders Organized the 2007 Austin Code Camp Build websites and web applications since 1996 Unit Testing since 2004 Test Infected since 2006
What is Silverlight Why do you need a whole session on unit testing? Silverlight Runtime Types of Tests Unit Test Pattern Testing Framework Choices Code Async Tips & Tricks Resources
Silverlight 2.0 Rich Internet Application platform It is a Web technology Subset of the.Net Runtime Runs cross platform – Windows/Linux/Mac Runs cross browser – IE/Firefox/Safari Silverlight 1.0 = Javascript Silverlight 2.0 =.Net – C#,Vb.Net,dynamic languages….
The standard solutions for unit testing do not apply. The CLR is a subset of.Net Currently no Mocking support All networking is Async The Test Framework can solve solutions which were previously solved by multiple solutions.. ie nUnit + Watir / Selenium
Unit Test Tests a single method for a single assertion Integration Test Test the interaction of multiple classes. Can leave the process boundry. Make calls to webservices…ect. Smoke Tests Tests the happy path by pushing the UI to perform user based test cases.
Arrange Act Assert See Code Sample - UnitTestSample
Silverlight Test Framework Unit Tests – run all tests Integration Tests Smoke Tests TestDriven.Net Unit Tests – single test execution nUnit (Silverlight Project Template) Unit Tests Some Integration Tests
Show Project References Special Project Templates Test Framework Runner Why Asynchronous Tests Silverlight User Interfaces can be async. Out of process calls are async. Sample….
Making the Asynchronous tests palatable Easier to read… Easier to remember months later Less clutter / easier to meet the 3As A fluent interface wrapper.. Sample
Eric Hexter’s Blog Jeff Wilcox Jaime C