I would like to get some opinion from the community about the “TDD / BDD and Unit testing the SharePoint component”.Â
Everyone likes to test and automate 100% of the required functionality. It is always tricky to unit test the SharePoint components as it mostly going to be a configuration and followed by custom functionality development.
It would be helpful, if you can post your ideas for the following,
1. Have you used TDD / BDD for the SharePoint development?
My comments: I have used TDD / BDD to test only the custom business logic components (c# class). and I haven’t used unit test to develop / configure / deploy any of the out of the box components like features, fields, site or list definitions, deploy web parts in a page etc.Â
2. How and Where would you use the unit testing for the SharePoint components?
My comments: I have followed different strategy based on the available or given time. In some projects we have used Mock and designing the components accordingly to test (Web parts – MVP pattern) etc.
3. Have you used any tools for testing?
My comments: I have used Spec-flow to build the test and Selenium to automate the SharePoint UI test. We have used http://sharetest.codeplex.com (Selenium) based to test the DocRead internally.Â
4. Any other comments / Â ideas regarding this topic?
My comments: In one of our project, we have used SharePoint API in the unit test check for components deployed / configured correctly. example: Check for List, Page libraries, Webparts in a page etc.
Thanks
Balamurugan Kailasam
Cheers Mark.ly I’d forgotten all about that. Will point them in the direction.
Have you done anymore work on it recently?