# A/B split testing in rails?

**URL:** <https://www.ruby-forum.com/t/a-b-split-testing-in-rails/121235>\
**Category:** Rails\
**Created:** [November 25, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/a-b-split-testing-in-rails/121235 "2007-11-25T21:30:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 25, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/a-b-split-testing-in-rails/121235/1 "2007-11-25T21:30:12Z")

</div>

What’s the best practice around setting up an A/B split test in  
rails? Initially, I’d like to test the effectiveness of different  
view elements, but ultimately would like to also split test business  
logic, so the split test framework should extend to the controllers  
and perhaps models.

Ideally, this functionality would be encapsulated into some kind of  
plug-in, so that it can be reused easily and facilitate easy creation  
of tests and reporting. I couldn’t find any plug-ins that facilitate  
this, however.

Has anyone gone down this road before? Any thoughts on the best way  
to structure a split testing framework so that it’s easily re-usable,  
and without littering one’s code with a bunch of case statements?

Thanks!
