The following flow give a very basic demo of how this can be achieved.
Note how the AB Split condition is used to randomly send a caller down 1 of 2 paths. In this example we have a simple Say/Play but you would likely have a string of IVR menus using Gather Input. Finally, you can fire a Send Analytics Event action to your analytics provider so you can record the results of your A/B test.