Skip to main content

What is A/B Testing?

A/B testing lets you route a percentage of live traffic to a test version while the rest continues to the current live version. Both versions produce execution logs, so you can compare their performance with real data before fully switching.

Prerequisites

Before starting an A/B test, you need:
  • A policy group with a currently deployed (live) version
  • A test version that has been published (ACTIVE status)
  • Both versions must belong to the same policy group

Traffic Identity Key

A/B routing splits traffic by a single value your application sends with each execution request: context.trafficKey. The engine hashes that value together with the policy group ID and assigns the request to a bucket, so the same key value always lands on the same version for that group. Send it in context, not in facts. Routing reads the context object only. A trafficKey placed in facts is ignored.
If trafficKey is missing or empty, no split happens and the test version receives 0% of traffic. The test still shows as running in the console and execution logs keep accumulating, so nothing about the response reveals the problem. The server logs a warning on every such request. Choosing a value:
  • Stable per experiment unit. A customer ID, a merchant ID, a session ID, whatever you want the experiment measured on
  • Opaque. The whole context object is stored in the execution ledger, so send a hash or a surrogate key rather than an email address or a phone number
  • Never a value that changes every request. A request ID or a timestamp scatters one user across both versions and destroys the comparison
Bucketing is per group. The group ID is mixed into the hash, so the same trafficKey value gets an independent assignment in every policy group and one experiment never skews another.

Where the key goes

GET /execution/groups/{groupId}/requirements returns an exampleRequest whose context does not include trafficKey. Copying that template as-is leaves an A/B test at 0%.

Starting an A/B Test

Console

Navigate to the policy group → click Start A/B Test → select the test version → set the traffic percentage.

CLI

The --traffic-rate is the percentage (1–99) of traffic routed to the test version. The remaining traffic stays on the live version.

Monitoring Results

While the A/B test is running, both versions generate execution logs. Compare them using:
Check success rates, match rates, latency, and output variable distributions across both versions.

Adjusting Traffic

Gradually increase the test version’s traffic as you gain confidence:

Stopping an A/B Test

Stopping reverts all traffic to the live version. The test version remains ACTIVE but no longer receives traffic.

Typical Workflow

A/B tests affect production traffic. Start with a low traffic percentage (5–10%) and monitor closely before scaling up.

Next Steps

Impact Simulation

Test against historical data before running an A/B test.

Deployments

Deploy the winning version to production.