Home

Awesome

Switchboard - easy A/B testing for your mobile app

What it does

A/B testing and feature flags for Android built on top of Switchboard.

Use Switchboard to

Switchboard lets you control what happens in your app. Quick, easy, useful.

Additionally, Switchboard segments your users consistently; because user segmentation is based upon a UUID that is computed once, the experience you switch on and off using Switchboard is consistent across sessions.

What it does not do (i.e. what you have to do yourself)

Switchboard does not give you analytics, nor does it automatically administer and optimize your A/B tests. It also doesn't give you nice graphs and stuff. You can get all of that by plugging an analytics package into your app which you're probably doing anyway.

Features

What Switchboard was designed for

Switchboard was designed as a super lightweight and flexible mobile A/B testing framework.

Infrastructure

The goal was to serve millions of requests very reliablly without much infrastructure. It should easily scale horizontally to avoid overhead in maintaining it while your application scales. It is designed without a database or any other type of persistent storage that would slow it down.

User segmentation

Consistency in user segmentation is one of the most important things in A/B testing. This means that one individual user will always have a consistent experience over a long period of time.

Switchboard does consistent user segmentation based on a unique device id.

How to use it

Link the Switchboard project to your Android project as a library project. You only need to initialize the Switchboard core at the application start once.

Then, you can add switches to your app and have the Switchboard give you the current state.

You can customize the DynamicConfigManager to send all sorts of information to the Switchboard server for control decisions, e.g. location, OS version, device, language.

Here's some on/off switch example code on Android:

Context myContext = this.getApplicationContext();
String experimentName = "showSmiley";

//get settings from Switchboard
boolean isSmiling = Switchboard.isInExperiment(myContext, experimentName);

//Switching code for testing
if (isSmiling) //variant A
	showSmileyWelcomeMessage();
else //variant B
	showFrownyFace();

And it works for varying any value too:

if (isSmiling) {
	if(Switchboard.hasExperimentValues(myContext, experimentName)) {
		
		//get remote controlled values from Switchboard
		JSONObject smileValues = Switchboard.getExperimentValueFromJson(myContext, experimentName);

		int smileWidth = smileValues.getInt("width");

		//do something with it
		prepareSmiley(smileWidth);
		showSmileyWelcomeMessage();
	}
}

More information about it:

Problems & Bugs

Please report issues in the Issues area above.

License

Switchboard is licensed under the Apache Software License, 2.0 ("Apache 2.0")

Authors

Switchboard is brought to you by Philipp Berner and Zouhair Belkoura, founders of Keepsafe, and the rest of the Keepsafe team.

We'd love to have you contribute or join us!

Used in production for many millions of users