Code Monkey home page Code Monkey logo

sixpack-java's Introduction

sixpack-java

Build Status Coverage Status

A Java client for SeatGeek's Sixpack a/b testing framework: https://github.com/seatgeek/sixpack

Installing

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>

Overview

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

Getting Started

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.

Creating Experiments

  1. 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();
  2. Participate in that new Experiment by calling participate()

        ParticipatingExperiment participatingExperiment = colorsExperiment.participate();
  3. When the user performs the action measured in the test, convert the experiment

        participatingExperiment.convert();

Contributing

  1. Fork this repo and clone your fork
  2. Make your desired changes
  3. Add tests for your new feature and ensure all tests are passing
  4. Commit and push
  5. 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

License

Sixpack-Java is released under the BSD 2-Clause License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.