Mocking, TDD, BDD for wp7<br />max paulousky<br />www.maxpaulousky.com<br />twitter: @paulousky<br />This work is licensed...
agenda<br />BDD<br />TDD<br />mocking<br />
BDD<br />Based on SpecFlow library and Gherkin syntax<br />I forked SpecFlow and implemented WP7 support. Will be merged i...
demo<br />BDD<br />
TDD<br />Create a separate testing assembly<br />You can use one assembly as an entry point (reduce number of apps on your...
demo<br />TDD<br />
Mocking <br />No native support in WP7 runtime<br />Should use Silverlight assemblies<br />Can’t add a reference to WP7 as...
demo<br />   mocking<br />
summary<br />Unit test tell you that you build the system right<br />Acceptance tests tell you that you build the right sy...
links<br />www.specflow.org/<br />github.com/techtalk/SpecFlow<br />github.com/aximus/SpecFlow<br />csharperimage.jeremyli...
thanks<br />max paulousky<br />www.maxpaulousky.com<br />twitter: @paulousky<br />This work is licensed under a Creative C...
questions<br />
Upcoming SlideShare
Loading in...5
×

Wp7 tdd, bdd, mocking

1,162

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,162
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Wp7 tdd, bdd, mocking

  1. 1. Mocking, TDD, BDD for wp7<br />max paulousky<br />www.maxpaulousky.com<br />twitter: @paulousky<br />This work is licensed under a Creative Commons Attribution By license.<br />
  2. 2. agenda<br />BDD<br />TDD<br />mocking<br />
  3. 3. BDD<br />Based on SpecFlow library and Gherkin syntax<br />I forked SpecFlow and implemented WP7 support. Will be merged into the main trunk<br />We can’t operate with Views directly – have to work with ViewModel<br />Call commands<br />Read/write properties<br />
  4. 4. demo<br />BDD<br />
  5. 5. TDD<br />Create a separate testing assembly<br />You can use one assembly as an entry point (reduce number of apps on your device)<br />You may tag your test methods<br />You may test internal methods<br />You may test asynchronous methods<br />Test methods may use additional attributes<br />
  6. 6. demo<br />TDD<br />
  7. 7. Mocking <br />No native support in WP7 runtime<br />Should use Silverlight assemblies<br />Can’t add a reference to WP7 assembly<br />Some WP7 features are not available (XNA)<br />WP7 specific classes should be wrapped with the adapter pattern, put into containers and used as interfaces<br />
  8. 8. demo<br /> mocking<br />
  9. 9. summary<br />Unit test tell you that you build the system right<br />Acceptance tests tell you that you build the right system<br />You can use either both kind of tests or just one<br />Mocking for WP7 is not trivial but possible<br />
  10. 10. links<br />www.specflow.org/<br />github.com/techtalk/SpecFlow<br />github.com/aximus/SpecFlow<br />csharperimage.jeremylikness.com/2010/07/silverlight-ui-automation-testing-using.html<br />www.hanselminutes.com/default.aspx?showID=267<br />codingsolutions.blogspot.com/2010/03/windows-phone-7-tdd-kata-using-mvvm-and.html<br />www.linkedin.com/groups?home=&gid=3405242&trk=anet_ug_hm<br />stackoverflow.com/questions/4137528/ui-automation-for-wp7<br />www.smartypantscoding.com/a-cheat-sheet-for-unit-testing-silverlight-apps-on-windows-phone-7<br />http://msdn.microsoft.com/ru-ru/magazine/gg490346.aspx<br />
  11. 11. thanks<br />max paulousky<br />www.maxpaulousky.com<br />twitter: @paulousky<br />This work is licensed under a Creative Commons Attribution By license.<br />
  12. 12. questions<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×