Set up Magento block as a SUT for PHPUnit

I'd like to unit test my Magento blocks using PHPUnit, how can I properly instantiate my models using the Magento framework to be used as a System Under Test? I include the path to my class, but it will need a link to the rest of the framework to run.. What do I do to avoid a long line on include statements?

include C:\repo\magento\cwdl\app\code\core\Mage\Adminhtml\Block\Sales\Order\Shipment\Create\Tracking.php';

class TrackingPageTests extends PHPUnit_Framework_TestCase{

public function testGetCarriers(){
$this->SUT = new Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Tracking();$this->SUT.getCarriers();
\$this->assertEquals(5,5);
}
}


You have to include at least the Magento autoloader (Varien_Autoload) and register it. I'd recommend doing this in your test bootstrap file instead of in each test case.
But if you are not testing your classes completely isolated, which is rare for blocks, you will also need to instantiate the Magento application (Mage::app()), basically turning your tests into integration tests.
There is lots of global state in Magento, so you should call Mage::reset() in the setUp() methods to reset all registry values and singletons.