in onBeforeRequest/onBeforeAction/etc handler place logic that will choose theme A or B and set Yii::app()->theme = $theme; then views used by render(), renderPartial() will try to use provided by the theme and if there is no such view - it will fall back to regular view in project directory structure.
Its a good idea to use the theming for the ab testing.
my only issue left is to which event to attach the logic, i want something before the render -> when the action already decided what view it will render.
some actions might have 2/3 different views they might render depending on the scenarion…