none
Test Driven Development in SharePoint 2010

    Question

  • Hi,

    We would like to implement Test Driven Development(TDD) for SharePoint Development projects,Can anyone suggest me best articles /Tools for it?

    We would be interacting with SPList,SPWeb and other objects,What is the best way to test them and How to mock them?If we are developing any custom webparts/user controls,how can we test them using TDD?

    Please provide me any inputs which could be better approach thinking in terms of both SP2010 and SP2013

    Thanking you all


    • Edited by Venu545 Friday, May 3, 2013 7:39 AM
    Friday, May 3, 2013 7:38 AM

All replies

  • Hi,

    I have seen Moq which is an Opensource one ,and seems to be like its more simpler to run.

    http://code.google.com/p/moq/

    How about this one?Can we mock SharePoint Objects with this?

    Thanks

    Venu

    Monday, May 13, 2013 8:03 AM
  • Hi Venu,

    I attended a SharePoint Retreat run by Andrew Woodward back in 2011 that focussed on TDD in SharePoint which I found very informative. If you're interested, I blogged about the day and the methodology we used. (Which included the TypeMock product.)

    http://www.myfatblog.co.uk/index.php/2011/03/spretreat-tdd-a-retrospective-see-what-i-did-there/

    I hope it's useful. (Apologies for the formatting on some of the text, the post didn't migrate to the new blog provider too well.)

    Paul.


    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

    Monday, May 13, 2013 8:42 AM
  • Hey,

    Thanks for your reply,However we need to buy license for this product if you want to use it.However Microsoft has launched the Microsoft Fakes Framework and SharePoint Emulators to do Unit Testing on SharePoint Object.Its a very nice concept and it can be achieved only with VS2012 Ultimate version.We dont need to buy any TypeMock product for this.

    Saturday, June 29, 2013 6:34 AM