Automated Testing with Sitecore V2. Introduction. Alistair Deneys Developer on the CMS Team at Sitecore Former MVP Wrote the chapter on automated testing in the first official Sitecore book by John West Creator of the Revolver module http://adeneys.wordpress.com firstname.lastname@example.org.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Small automated tests to exercise a piece of code
Code under test
Unit Test Definition 2.0
A unit test is a fast, in-memory, consistent, automated and repeatable test of a functional unit-of-work in the system.
A unit of work is any functional scenario in the system that contains logic. it can be as short as a function, or it can span multiple classes and functions, and it provides internal or business value to the system under test.
An integration test usually is not in-memory: it may touch the disk file system, databases, registry or other shared resources. It may read or need a configuration file of the file system, wheas a unit test can be fully configured in-memory, for example.
An integration test will usually run much slower because it does not run in-memory.
An integration test can be less consistent – it may use threads or random number generators so that the result of the test is not always consistent.
Scenario: Write and test a method to produce numbers from the Fibonacci Series.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, …
Scenario: Test a functional component in Sitecore
Code under test
How can we test presentation components?