/DAZABTest

A synchronous ABTest framework with a simple API.

Primary LanguageObjective-CMIT LicenseMIT

DAZABTest

Build Status Coverage Status

DAZABTest is a simple split-testing framework with a synchronous API.

Test conditions are persisted across sessions and launches using NSUserDefaults, ensuring that every user will have a consistent experience, no matter which testing bucket they end up in.

Installation

The easiest way to get started is to use CocoaPods. Just add the following line to your Podfile:

pod 'DAZABTest', '~> 1.0'

Usage

Split-test with equal weights

NSString *buttonText = [DAZABTest splitTestWithName:@"SampleEqualWeightTestName"
											 values:@[@"Log In", @"Sign In", @"Submit", @"Confirm"]];

Split-test with unequal weights

NSDictionary *conditions = @{[UIColor redColor]: @(0.30),
                             [UIColor blueColor]: @(0.25),
                             [UIColor yellowColor]: @(0.25),
                             [UIColor greenColor]: @(0.20)};
UIColor *buttonColor = [DAZABTest splitTestWithName:@"SampleUnequalWeightTestName"
										 conditions:conditions];

Acknowledgement

This library was inspired by SkyLab in an effort to create a simpler, sans-block based API.

Contributing

We'd love to see your ideas for improving this library! The best way to contribute is by submitting a pull request. We'll do our best to respond to your patch as soon as possible. You can also submit a new GitHub issue if you find bugs or have questions. :octocat:

Please make sure to follow our general coding style and add test coverage for new features!