AB icon indicating copy to clipboard operation
AB copied to clipboard

Same variation in seed

Open ziozec-zz opened this issue 11 years ago • 3 comments

Hi, test work well, but when i add seed to container it use only 2 type of variation, all first on last test choices, hereby the code:

    if (!$session->get('seed')) {
        $session->set('seed', mt_rand());
    }

    $abt = new Container(array(
        new Test('promo_code.layout', array(
            'TestAB:step1a.html.twig' => 1,
            'TestAB:step1b.html.twig'   => 1,
        )),
        new Test('promo_code.text', array(
            'Discount code'    => 1,
            'Promo code'     => 1,
        )),
        new Test('promo_code.button', array(
            'button'    => 1,
            'arrow'     => 1,
        )),
    ), $session->get('seed'));

    echo "seed: ".$session->get('seed');

What can be the issue? Thanks

ziozec-zz avatar May 13 '14 10:05 ziozec-zz

hi @ziozec,

that's because you are passing the seed: removing it you will see the tests giving you random results.

The seed is there so that a user always gets the same variation during the navigation, thats how it's expected to be working.

odino avatar May 20 '14 12:05 odino

hi @odino , thanks for your support. I know how seed works, what i mean is that when I enable seed also with 2k different users and tracking result I get only two type of variations 000 or 111 not all possible variations.

ziozec-zz avatar May 20 '14 15:05 ziozec-zz

eheh sorry @ziozec, wasnt sure of what you meant :)

Would you be able to add a test case that fails? In that way it is easier to give you a fix...it anyhow sound very strange!

odino avatar May 20 '14 19:05 odino