How to create a test partition for the OS X Yosemite beta

Ars Technica:

The final version of the software won’t be available for a few months, but Apple developers (and, for the first time ever, one million public beta testers) can download and install the first Yosemite beta version now. Developers will be used to the process of testing new OS X versions on their hardware, but those people in the public beta may be wading into uncharted waters.

This guide is for those people, the ones who want to test the new OS X beta without wrecking their Mac—you never want to put your data at risk by installing beta software on your main partition. This way, you can play with all the shiny new features without risking the comfortable, stable, non-beta OS X installation you need to get all your work done.

You don’t want to install the Developer Preview or the beta on your main machine without doing something similar to this.