Rails 3 A/B Split Test System Without Redis?
Asked Answered
S

3

7

I'm looking for an easy way to integrate split testing into my Rails 3 application. I've researched and found two alternatives that seem to be up to date for Rails 3...

Vanity: http://vanity.labnotes.org

Split: https://github.com/andrew/split

However, both of these use Redis, which my employer doesn't want to use. I notice that Vanity can be used with ActiveRecord instead, but I was wondering if anyone had experience with setting up an A/B Split Test system without using Redis and what configuration would you recommend?

Schoolhouse answered 13/9, 2011 at 19:37 Comment(3)
did you find answer i have same issue :(Sissified
I'm working on adding multiple database adapters to split, you can follow the progress here: github.com/andrew/split/issues/37Resplendent
ruby-toolbox.com/categories/A_B_TestingVineyard
B
3

I don't have experience with Split but I have setup vanity without Redis. The way to do this is to add the following to your config/environments/development.rb

Vanity.playground.establish_connection :development

Then, create a file called vanity.yml under config/ and add the following:

development:
  adapter: active_record
  active_record_adapter: mysql
  host: localhost
  database: database_name
  username: mysql_username
  password: mysql_password
Bar answered 30/10, 2011 at 8:24 Comment(0)
R
1

You can take a look at the A/Bingo plugin. It uses ActiveRecord, and there is a RailsCasts episode on how to configure and use it.

Rivers answered 22/10, 2011 at 21:7 Comment(0)
H
0

For those of you who are looking for a simple-to-use lightweight solution for split and smoke testing, then I've developed the eeny-meeny gem. It does not require you to use Redis or anything like it. It is built as rack middleware and handle everything based on cookies.

All you need to use it is to define your experiment(s) and use the experiment helpers where you need them:

if participates_in?(:my_experiment, variation_id: :my_variation)
  # variation specific code
else
  # normal code
end

if smoke_test?(:my_secret_test)
  # smoke test specific code
else
  # normal code
end
Harwin answered 12/9, 2016 at 6:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.