PHPackages                             lwc/kumite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. lwc/kumite

ActiveLibrary[Testing &amp; Quality](/categories/testing)

lwc/kumite
==========

A simple library for multivariate testing in web applications

3.0.1(11y ago)2337.9k2[2 issues](https://github.com/lwc/kumite/issues)[1 PRs](https://github.com/lwc/kumite/pulls)3MITPHPPHP &gt;=5.3.2

Since Jan 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/lwc/kumite)[ Packagist](https://packagist.org/packages/lwc/kumite)[ RSS](/packages/lwc-kumite/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (15)Used By (3)

Table of contents

- [What is kumite?](#what-is-kumite)
- [Installing](#installing)
- [Running tests](#running-tests)
    - [Starting tests](#starting-tests)
    - [Varying content](#varying-content)
    - [Tracking events](#tracking-events)
- [Defining tests](#defining-tests)
- [Integrating with your application](#integrating-with-your-application)
    - [Configuring](#configuring)
    - [StorageAdapter](#storageadapter)
    - [CookieAdapter](#cookieadapter)
- [Contributing](#contributing)

### What is kumite?

[](#what-is-kumite)

Kumite is a framework for managing split testing.

It's purpose is to manage and track participants in split tests, as well as track events/outcomes. It makes no assumptions about how participants are allocated into variants.

Tests may be defined with a number of variants and an allocation strategy that can assign a variant to a request. Events may be tracked against variants, with optional metadata if desired. It makes no assumptions about how your application interacts with cookies or how you would like to store test data. It is named for the fictional fighting tournament, portrayed in the 1988 Jean-Claude Van Damme movie Bloodsport.

### Installing

[](#installing)

The easiest way to install is via composer: `composer require lwc/kumite`

### Running tests

[](#running-tests)

- [Starting tests](#starting-tests)
- [Varying content](#varying-content)
- [Tracking events](#tracking-events)

##### Starting tests

[](#starting-tests)

In order to run a test, you must first select a starting point for your test. Typically this will happen inside a controller action in your application. When starting a test, you must provide the test key of the defined test and optionally an array of metadata to attach to the test participant and allocation method that will override the method declared in the test definition. Allocators must be an instance that implements [Allocator](/lwc/kumite/blob/master/lib/Kumite/Allocator.php), something callable in php terms, or a constant value representing a variant.

Using a constant value:

```
