codeflood logo

Posts tagged in Testing

Automated Testing and Sitecore - Part 6

In this installment we'll cover testing the static behaviors and presentation of our other Sitecore presentation components; layouts, sublayouts and renderings. These components are more difficult to test as they need to be hosted inside a Sitecore page to allow testing them. Because these components will be hosted in a page, we will be making web requests to the server to get the page output,...

Automated Testing and Sitecore - Part 5

In the last part of this series we started to write tests around code which uses the Sitecore API. These tests were run inside the NUnit custom test runner we wrote back in part 3 of this series. In this post, we'll start testing our presentation components, starting with the easiest to test, which is a Sitecore WebControl. This is any class which inherits from Sitecore.Web.UI.WebControl. The...

Automated Testing and Sitecore - Part 4

So far in this series we have covered some of the theories and techniques required to automate testing of Sitecore components, creating a custom NUnit test runner which runs inside the Sitecore website and exposes the Sitecore context to the running tests and how to programmatically setup our test environment for repeatable testing against know content structures. In this post we are going to...

Automated Testing and Sitecore - Part 3

In my first post of this series I talked about the high level concepts of how I do my automated testing in Sitecore. All of the techniques I wrote about require a known content structure to test against as the content tree makes up one part of the input into our test. This post is going to focus on programatically setting up our test environment so we can perform our tests in a repeatable...

Automated Testing and Sitecore - Part 2

In the first post of this series I mention I make use of a custom NUnit test runner which runs in the Sitecore context. In this post I'll take you through creating such a test runner. The test runner is just a web form deployed to the webroot of your Sitecore site. Because it runs inside your Sitecore application it runs within a Sitecore context. The test runner allows running a selection of test...

Automated Testing and Sitecore - Part 1

Well, my last post seems to have generated some interest. Automated testing with Sitecore is a hot topic. It is much more difficult and complex than those 2 second demos you see for general unit testing in your code. The purpose of this post is to describe how I currently perform my automated testing against Sitecore. I say currently because I am constantly updating how I do this as I discover...

Page: 1 2