Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Testing Sitecore using NUnit, serializing content

In my business, I am working on Unit Testing, after finishing an example in a .NET application. We want to use a standard .NET Unit Testing project. We also want to mock the Sitecore data by serializing the Sitecore objects. I have been looking for, but could not find a good tutorial to do this. How can I do this?

like image 929
dpwulp94 Avatar asked Oct 16 '13 14:10

dpwulp94


1 Answers

Interesting videos on Youtube

  1. Sitecore Unit Testing video by gravypower.
  2. Another interesting video by codeflood.
  3. Most knowledgeable for me was this video by Alistair Deneys from Hedgehog

Other interesting blogs are

  1. Igloo - Unit Testing for Sitecore
  2. iStern - Unit testing with Sitecore Item by Thomas Stern
  3. Mocking Sitecore with MS Fakes Part I and Part II by Thomas Stern
  4. And lastly my preferred Coffee => Coder => Code again by Alistair Deneys
  5. Knifecore's blog also helped me a lot when I was trying to write tests.

Let us know if this was helpful.

If you are interested in Serialization, Kern Nightingale has got a perfect presentation which will give you insight to how to use it for testing as well.

Finally would also recommend Sitecore Glimpse by Kevin Obee, the project's one of the purpose is "provide build scripts that automate the tasks of compiling, testing and packaging the project artifacts to make it easier to open the project up for collaborative development" which he mentions on his blog.

like image 71
Shriroop Avatar answered Sep 24 '22 17:09

Shriroop