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
Actually yes, a friend of mine Glen improved it a bit a few weeks ago. Tbh if we go full coverage of the main SharePoint Site Collection admin screens, this would be an awesome toolkit.
Cheers Mark.ly I’d forgotten all about that. Will point them in the direction.
Have you done anymore work on it recently?
I understand the tooling in Visual Studio 2012 is much better for unit testing and integration testing. I’d be intersted to hear if anyone in the community are using these in anger.
My current client is looking at rolling out autmoated testing, similar to that we did at O2 Bala. I’ve been looking for some blogs/posts that deal with the set up and config of Selenium 2 with Visual Studio and the gotchas etc but have found very little.