Split testing (or A/B testing) is a powerful way of assessing the impact of features or changes on your user base. At its simplest, Split Testing Framework allows you to isolate chunks of view code inside "features" that can be turned on and off on a per-user or per-feature basis.
<% feature :myfeature do -%>
Super-cool beta feature
<% end #feature:myfeature -%>
NOTE: the #feature:myfeature comment on the end tag is important for automatically stripping feature blocks out when you're cleaning up.
rake stripfeature FEATURE=myfeature
class User < ActiveRecord::Base
acts_as_tester
end
This gives you two methods to use for enabling and disabling features on a per-user basis:
> User.find(:first).enable_tester('myfeature')
> User.find(:first).disable_tester('myfeature')
If current_user is defined such that the FeatureHelper
can call it, then the current user will be checked for tester access on top of the checking for whether the feature is enabled.
Copyright (c) 2008 Eric Allen, released under the MIT license