SlideShare a Scribd company logo
Automated Unit Testing with Silverlight for Windows Phone 7 Jacinto Limjap, Jr. Microsoft MVP for C# Senior Applications Developer, FBM e-Services
Agenda Automated unit testing and Test Driven Development MVVM – an overview Putting it all together using Silverlight for Windows Phone 7
Any  mobile developers  in the house?   What do you use in terms of frameworks/patterns/unit testing?
AUTOMATED UNIT TESTING & TDD An introduction
What is Test Driven Development? Using unit tests to design software Allows change in code without fear of (inadvertently ) changing functionality Produces loosely coupled objects and methods with single responsibilities
What is Test Driven Development? Unit tests are just side effects: main point is DESIGN Write tests first, code later (?!)
What is Test Driven Development NOT? Substitute for QA testing Necessarily means successful project Silver bullet
TDD Mindset
Writing Tests Think about how you want to express your code and intentions Think about inputs, and intended output Separate small, isolated areas of functionality
Issues Unit tests should come BEFORE code Unit tests should NOT depend on presence or absence or external dependencies (e.g., storage, database, internet connection) How to solve this: Mocks, stubs and fakes
Do we  really  have to do test first?  
MVVM The Model View ViewModel Pattern
Model-View-ViewModel Introduced in 2005 by John Gossman Originally designed for Windows Presentation Foundation (WPF) applications Designed in response to attempts to use Model-View-Controller (MVC) in WPF
Model-View-ViewModel Model – class or data representation of object you are using within your application View – the part of your application representing the user interface ViewModel – class or data representation of an object or combination of objects, as seen in the View
Model-View-ViewModel View (XAML) View Model Model Data Binding
So why is MVVM important?
DEMO Unit testing on Silverlight for Windows Phone 7
Discussion http://dotnet.kapenilattex.com http://twitter.com/LaTtEX http://facebook.com/LaTtEX
References Introduction to Model/View/ViewModel pattern for building WPF apps  http:// blogs.msdn.com/b/johngossman/archive/2005/10/08/478683.aspx Silverlight Patterns: Model-View-ViewModel in Silverlight 2 apps  http:// msdn.microsoft.com/en-us/magazine/dd458800.aspx Model-View-ViewModel (MVVM) Explained  http:// csharperimage.jeremylikness.com/2010/04/model-view-viewmodel-mvvm-explained.html Introduction to Test Driven Development  http://dotnet.kapenilattex.com/? p=201 Windows Phone 7 Tutorials  http:// compiledexperience.com/windows-phone-7 Updated Silverlight Unit Testing Framework bits for Windows Phone and Silverlight 3  http://www.jeff.wilcox.name/2010/05/sl3-utf-bits / Steps to run the Windows Phone 7 Unit Test Framework  successfully  http:// codingsolutions.blogspot.com/2010/03/steps-to-run-windows-phone-7-unit-test.html TDD Kata for Windows Phone 7  http:// github.com/dgadd/TDD_Kata_For_MVVM_on_Win_Phone_7 Migrating Apps from Windows Phone April CTP Refresh to Beta Build  http ://blogs.msdn.com/b/jaimer/archive/2010/06/28/migrating-apps-from-windows-phone-ctps-to-the-beta-build.aspx?wa=wsignin1.0

More Related Content

PDF
Android MVVM TDD
PDF
PDF
Mvp pattern
PPSX
Developers Border Line: Unit Testing
PPTX
Walther Mvc
PDF
Android-centric-architecture vs. unit testable apps
PPSX
SCM Process and smartBuild
PPTX
Compatibility testing a must do of the web apps 2012
Android MVVM TDD
Mvp pattern
Developers Border Line: Unit Testing
Walther Mvc
Android-centric-architecture vs. unit testable apps
SCM Process and smartBuild
Compatibility testing a must do of the web apps 2012

What's hot (20)

PDF
Automated Browser Compatibility Testing
PPTX
Compatibility testing
PPT
Compatibility testing
PPT
Web testing
PPTX
17 Ways to Save Time on Manual Cross Browser Testing
PDF
Compatibility Testing
PPT
Testing the documentation
PPT
Design pattern in android
PDF
ITFT - Software prototyping
PPTX
Software prototyping
PPT
Software Prototyping
PPTX
Prototypemodel in SDLC ppt
PPT
Bug Advocacy
PPTX
King Tut Architecture
PDF
Ganeshkumar Resume
PPTX
Introduction to Software Engineering
PPTX
Project on software engineering types of models
PPT
Prototype model
PPTX
MVVM_Ashraf
PDF
The 7 minute accessibility assessment and app rating system
Automated Browser Compatibility Testing
Compatibility testing
Compatibility testing
Web testing
17 Ways to Save Time on Manual Cross Browser Testing
Compatibility Testing
Testing the documentation
Design pattern in android
ITFT - Software prototyping
Software prototyping
Software Prototyping
Prototypemodel in SDLC ppt
Bug Advocacy
King Tut Architecture
Ganeshkumar Resume
Introduction to Software Engineering
Project on software engineering types of models
Prototype model
MVVM_Ashraf
The 7 minute accessibility assessment and app rating system
Ad

Similar to Automated Unit Testing in Silverlight for Windows Phone 7 (20)

PPT
MVC(Model View Controller),Web,Enterprise,Mobile
PDF
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
PPTX
MVVM ( Model View ViewModel )
PPTX
Windows Store Apps: Tips & Tricks
PPT
Silverlight2 Unit Testing Slides
DOCX
A report on mvc using the information
PPT
Shine a Light with Prism (the Composite Application Guidance for WPF and Silv...
PPTX
Building web applications using kendo ui and the mvvm pattern
PDF
Lublin Startup Festival - Mobile Architecture Design Patterns
PPTX
Modern ASP.NET Webskills
PPT
Code Camp 06 Model View Presenter Architecture
PDF
Model view view model
PPTX
Building xamarin.forms apps with prism and mvvm
PPTX
Test driving an MVVM App
PPTX
Mvvm pattern
PDF
Introduction To MVVM
PDF
DotVVM Fundamentals
DOC
Ravindra Prasad
PPTX
Struts & hibernate ppt
PPTX
Architectural Design Pattern: Android
MVC(Model View Controller),Web,Enterprise,Mobile
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
MVVM ( Model View ViewModel )
Windows Store Apps: Tips & Tricks
Silverlight2 Unit Testing Slides
A report on mvc using the information
Shine a Light with Prism (the Composite Application Guidance for WPF and Silv...
Building web applications using kendo ui and the mvvm pattern
Lublin Startup Festival - Mobile Architecture Design Patterns
Modern ASP.NET Webskills
Code Camp 06 Model View Presenter Architecture
Model view view model
Building xamarin.forms apps with prism and mvvm
Test driving an MVVM App
Mvvm pattern
Introduction To MVVM
DotVVM Fundamentals
Ravindra Prasad
Struts & hibernate ppt
Architectural Design Pattern: Android
Ad

More from Jacinto Limjap (11)

PPTX
Maintainable UI Tests with Selenium and C#
PPTX
Refactoring to Microservices
PPTX
Donetconf2016: The Future of C#
ODP
C# and the Evolution of a Programming Language
PPTX
SQL vs NoSQL
PPTX
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
PPTX
N-tier and oop - moving across technologies
PPTX
MSDN Ramp-Up Part 3: Business logic
PPT
Developing windows phone 7 applications
PPTX
Dynamics & Object Runtime Composition with C# 4.0
PPTX
Three Developer Abilities They Dont Teach In College
Maintainable UI Tests with Selenium and C#
Refactoring to Microservices
Donetconf2016: The Future of C#
C# and the Evolution of a Programming Language
SQL vs NoSQL
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
N-tier and oop - moving across technologies
MSDN Ramp-Up Part 3: Business logic
Developing windows phone 7 applications
Dynamics & Object Runtime Composition with C# 4.0
Three Developer Abilities They Dont Teach In College

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Empathic Computing: Creating Shared Understanding
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Chapter 3 Spatial Domain Image Processing.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MYSQL Presentation for SQL database connectivity
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Understanding_Digital_Forensics_Presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks
NewMind AI Monthly Chronicles - July 2025
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing

Automated Unit Testing in Silverlight for Windows Phone 7

  • 1. Automated Unit Testing with Silverlight for Windows Phone 7 Jacinto Limjap, Jr. Microsoft MVP for C# Senior Applications Developer, FBM e-Services
  • 2. Agenda Automated unit testing and Test Driven Development MVVM – an overview Putting it all together using Silverlight for Windows Phone 7
  • 3. Any mobile developers in the house?  What do you use in terms of frameworks/patterns/unit testing?
  • 4. AUTOMATED UNIT TESTING & TDD An introduction
  • 5. What is Test Driven Development? Using unit tests to design software Allows change in code without fear of (inadvertently ) changing functionality Produces loosely coupled objects and methods with single responsibilities
  • 6. What is Test Driven Development? Unit tests are just side effects: main point is DESIGN Write tests first, code later (?!)
  • 7. What is Test Driven Development NOT? Substitute for QA testing Necessarily means successful project Silver bullet
  • 9. Writing Tests Think about how you want to express your code and intentions Think about inputs, and intended output Separate small, isolated areas of functionality
  • 10. Issues Unit tests should come BEFORE code Unit tests should NOT depend on presence or absence or external dependencies (e.g., storage, database, internet connection) How to solve this: Mocks, stubs and fakes
  • 11. Do we really have to do test first? 
  • 12. MVVM The Model View ViewModel Pattern
  • 13. Model-View-ViewModel Introduced in 2005 by John Gossman Originally designed for Windows Presentation Foundation (WPF) applications Designed in response to attempts to use Model-View-Controller (MVC) in WPF
  • 14. Model-View-ViewModel Model – class or data representation of object you are using within your application View – the part of your application representing the user interface ViewModel – class or data representation of an object or combination of objects, as seen in the View
  • 15. Model-View-ViewModel View (XAML) View Model Model Data Binding
  • 16. So why is MVVM important?
  • 17. DEMO Unit testing on Silverlight for Windows Phone 7
  • 19. References Introduction to Model/View/ViewModel pattern for building WPF apps http:// blogs.msdn.com/b/johngossman/archive/2005/10/08/478683.aspx Silverlight Patterns: Model-View-ViewModel in Silverlight 2 apps http:// msdn.microsoft.com/en-us/magazine/dd458800.aspx Model-View-ViewModel (MVVM) Explained http:// csharperimage.jeremylikness.com/2010/04/model-view-viewmodel-mvvm-explained.html Introduction to Test Driven Development http://dotnet.kapenilattex.com/? p=201 Windows Phone 7 Tutorials http:// compiledexperience.com/windows-phone-7 Updated Silverlight Unit Testing Framework bits for Windows Phone and Silverlight 3 http://www.jeff.wilcox.name/2010/05/sl3-utf-bits / Steps to run the Windows Phone 7 Unit Test Framework successfully http:// codingsolutions.blogspot.com/2010/03/steps-to-run-windows-phone-7-unit-test.html TDD Kata for Windows Phone 7 http:// github.com/dgadd/TDD_Kata_For_MVVM_on_Win_Phone_7 Migrating Apps from Windows Phone April CTP Refresh to Beta Build http ://blogs.msdn.com/b/jaimer/archive/2010/06/28/migrating-apps-from-windows-phone-ctps-to-the-beta-build.aspx?wa=wsignin1.0