# What is A/B-Testing

One of the features offered on the Fredhopper (FHR) **platform, as part of the Insights** product is **A/B testing**. **A/B** **testing** can be performed on multiple features available on the FHR platform, such as:

* Campaigns
* Rankings
* Result Modifications
* Search Configuration

## How does FHR A/B testing work

If you have the FHR platform integrated into your web shop, you need to make a query to FHR to display a given page to the shopper. This may include different types of pages, such as: navigation pages, search results pages or product detail pages. Without A/B tests, such a query would return the standard (default) version of the page. With A/B tests however, you would request a **variant** of that page with the A/B test applied, based on the user's **session** **id**. This way, different shoppers would receive different **variants** of the page, thus allowing you to compare how different **variants** of the same page perform.

{% hint style="info" %}
**Important!** The following implementation is intended for **server to server** implementations. The steps in the next section are not intended to be done on client side.
{% endhint %}

Throughout this documentation you will learn the necessary steps to integrate the solution. There are separate solutions depending on whether your website supports caching or not. If you support caching, you may choose to develop your own integration by implementing each of the steps mentioned in this overview section or you can choose to use the Java SDK which will do most of the work for you. Whilst you can jump to the SDK implementation directly, it is advisable to read through the integration steps in order to get a better understanding of how things work and what the SDK does under the hood.

## Integration of A/B tests

A/B tests are configured inside the **Merchandising Studio** of FHR\*\*.\*\* There are separate integration solutions for websites that support caching and for the ones that do not.

### Integration for a non-caching solution

In the case your website does not support caching, there is an optional solution to integrate A/B tests into your website. The selection of the A/B tests and their variants will be performed on our server’s side, according to the user **session id** passed as a query parameter. Instructions on how to include this parameter can be found in the following page:

{% content-ref url="/pages/wXdLlIA3qIZn4sEFzhfc" %}
[Configuring the Non-Caching A/B Testing Integration](/product-discovery/a-b-testing-for-fhr/integration-steps-for-a-non-caching-solution.md)
{% endcontent-ref %}

### Integration for a caching solution

For the purpose of simplifying the integration we have developed an **SDK** for **Java** platforms. If your backend application runs in Java, or at least can make use of Java libraries, you can integrate using our own **Java AB Testing SDK.** To dive right into that check the page below.

{% content-ref url="/pages/WBHw924Dtcam9pz6lBs0" %}
[Integrating Using the Java SDK Solution](/product-discovery/a-b-testing-for-fhr/integration-steps-for-a-caching-solution/java-sdk-integration.md)
{% endcontent-ref %}

In order to learn more about how the integration works and why it's necessary, check out the page below. If you want to integrate AB testing, but your language or framework is not covered by one of our SDKs, you can refer to the steps covered there. The platform officially supports Java, Node.js and PHP integrations. However, the algorithm is straightforward and can be done with any language or framework able to perform standard HTTP queries.

{% content-ref url="/pages/tNVk5pkDfWR2QXe7ySHo" %}
[Integrating Using the Manual Solution](/product-discovery/a-b-testing-for-fhr/integration-steps-for-a-caching-solution/manual-a-b-tests-integration.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://crownpeak.gitbook.io/product-discovery/a-b-testing-for-fhr/fhr-a-b-testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
