A Java client for SeatGeek's Sixpack a/b testing framework: https://github.com/seatgeek/sixpack
Sixpack-java is currently only being deployed to maven snapshots, to use it, add the following dependency to your build.gradle:
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
compile 'com.seatgeek:sixpack-java:0.4-SNAPSHOT'
}
or, if you're a maven user:
<dependency>
<groupId>com.seatgeek</groupId>
<artifactId>sixpack-java</artifactId>
<version>0.4-SNAPSHOT</version>
</dependency>
The Sixpack client has some nomenclature to be familiar with...
- A Sixpack server is the deployment of the Sixpack-server that will be hosting your test results
- An experiment represents a single test in the Sixpack server. It can have multiple alternatives
- An alternative is one potential result returned to the client when participating in an experiment
- You start a test by participating in an experiment with alternatives
- Once the server has selected an alternative for you, you can convert the experiment when the user performs the action that you're measuring
After installing...
The first thing to do is create a Sixpack
client using the SixpackBuilder
:
Sixpack sixpack = new SixpackBuilder()
.setSixpackUrl("http://api.mycompany.com/sixpack")
.setClientId(user != null ? user.sixpackId : getCachedClientId())
.build();
It is recommended that you maintain a singleton instance of Sixpack
with the DI library of your choice.
-
Create a new experiment from your
Sixpack
instance:Experiment colorsExperiment = Sixpack.experiment() .withName("colors") .withAlternatives( new Alternative("control"), new Alternative("red"), new Alternative("green"), new Alternative("blue") ) .build();
-
Participate in that new
Experiment
by callingparticipate()
ParticipatingExperiment participatingExperiment = colorsExperiment.participate();
-
When the user performs the action measured in the test, convert the experiment
participatingExperiment.convert();
- Fork this repo and clone your fork
- Make your desired changes
- Add tests for your new feature and ensure all tests are passing
- Commit and push
- Submit a Pull Request through Github's interface and a project maintainer will decide your changes fate.
note: issues can be submitted via github issues
Sixpack-Java is released under the BSD 2-Clause License