If you don’t want to modify yii’s directory structure, or don’t need to do it, you can use /index.php and /index_test.php as your bootstraps, and /protected/tests/bootstrap.php as your bootstrap for phpunit and selenium tests.
If you need to control the execution of your scripts, you may alter routing configuration in /protected/config/main.php, or set the CMap structures to the paths you need.
If you want to run some code in the application initialization, you can attach a callback to the onBeginRequest application object event.
Read this wiki page for complete information: yii directory structure.
If you need a developer team environment, then follow Mr. JFReyes recommendation, but I’m having doubts about Gii’s (by example) behavior in these kind of environments.