What's in This Chapter?
Understanding automated testing
Creating test projects
Testing through an HTTP interface
Interacting with a page under test through a browser
Limiting the scope of tests for presentation components
Calling the Sitecore API
Creating test data
This chapter introduces general concepts involved in automated testing, and then describes a number of techniques that you can use to create and invoke automated tests for your Sitecore solutions. These techniques address various challenges that you will face when designing tests for code that executes in the context of a third-party system — in this case, the Sitecore ASP.NET web content management system (CMS). This chapter describes these approaches, including their advantages and disadvantages to help you determine when each is appropriate.
After explaining some of the complexities involved in automated testing of Sitecore solutions, this chapter presents three specific testing techniques, each of which address some of those challenges. These techniques include the following: