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?
Unit Testing Sitecore using NUnit, serializing content
Asked Answered
Interesting videos on Youtube
- Sitecore Unit Testing video by gravypower.
- Another interesting video by codeflood.
- Most knowledgeable for me was this video by Alistair Deneys from Hedgehog
Other interesting blogs are
- Igloo - Unit Testing for Sitecore
- iStern - Unit testing with Sitecore Item by Thomas Stern
- Mocking Sitecore with MS Fakes Part I and Part II by Thomas Stern
- And lastly my preferred Coffee => Coder => Code again by Alistair Deneys
- 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.
Don't forget the presentation from todays Sitecore Virtual Summit :) youtube.com/watch?v=I_iuvYAtig8 and youtube.com/watch?v=4PR595c2_rM –
Tega
© 2022 - 2024 — McMap. All rights reserved.