"Test combination does not match the test definition" A/B test error


Description

Starting A/B testing might fail with an unhandled exception, when the test is not fully published from the Content Management (CM) to Content Delivery (CD) server. The following error can appear:
3364 18:53:15 ERROR Application error.
Exception: System.InvalidOperationException
Message: Test combination does not match the test definition
Source: Sitecore.Kernel
at Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message)
at Sitecore.ContentTesting.Models.TestCombination.GetValue(Int32 variableIndex)
at Sitecore.ContentTesting.Pipelines.EvaluateTestExposureBase`1.ValidateCombinationDatasource(TestCombination combination, ITestConfiguration testConfiguration)
at Sitecore.ContentTesting.Pipelines.EvaluateTestExposureBase`1.Process(TPipelineArgs args)
at (Object , Object )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
at Sitecore.Mvc.Routing.RouteHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Solution

To resolve this issue, download and install the patch compatible with the affected product version found on this page:
https://github.com/SitecoreSupport/Sitecore.Support.173501/releases

To get a solution for other releases, contact Sitecore Support.