https://www.growthbook.io/ logo
#announcements
Title
# announcements
r

rhythmic-chef-84815

06/10/2022, 7:27 AM
Hello again 🙂 I am now trying to know what would be the correct approach to do testing for the backend part, what I want to do is to change the variation of an user so I assume I need to add an override rule. I saw that there is 3 types, but I do not know for sure which one I should use between force value and ab experiment. I think both would work, just not sure how to setup exactly. Is there an example I could use?
f

fresh-football-47124

06/10/2022, 8:09 AM
if you want to do an experiment (testing) the right one to use is A/B experiment
force variation will just push users into one variation or another, but not do any experiment exposure event tracking so you can't analyze the results
r

rhythmic-chef-84815

06/10/2022, 8:10 AM
but how would I force an user into a variation there?
this is just about the testing part
Would I have to add a rule for example that the id is the id of the user I want to force and then change the variations & weights to be 100% to the one I want?
f

fresh-football-47124

06/10/2022, 8:11 AM
that would work, but it's not the best way
r

rhythmic-chef-84815

06/10/2022, 8:11 AM
What would be better?
f

fresh-football-47124

06/10/2022, 8:11 AM
there are a few ways to do testing
one, use our chrome dev tool (if you're using JS or React) two: use the force rule above the experiment rule, and target the force rule at a specific list of user ids
r

rhythmic-chef-84815

06/10/2022, 8:13 AM
The dev tool is really nice but basically just when the test starts in the frontend, if it starts in the backend I can not use the tool. So for this, use the forced value instead of A/B Experiment? is that what you mean?
f

fresh-football-47124

06/10/2022, 8:14 AM
Depending on the SDK and if you're testing on the web, you can use a query string to override your test case, or, as you pointed out, you can adjust the weights to 100% to be sure that a user is assigned.
you can use both force and the experiment
one moment, let me show you
r

rhythmic-chef-84815

06/10/2022, 8:15 AM
awesome 🙂
f

fresh-football-47124

06/10/2022, 8:15 AM
the way the rules work, the first matching rule is served, other wise it will continue down to the other rules
so in this example, if they are an admin, its serving 'on' other wise it will serve an experiment with 10% in each variation
r

rhythmic-chef-84815

06/10/2022, 8:16 AM
I see, so if I am using a number the difference would be that instead of SERVE ON I just serve the number
f

fresh-football-47124

06/10/2022, 8:16 AM
yes
r

rhythmic-chef-84815

06/10/2022, 8:16 AM
Thanks again for the help 🙂
I really appreciate the support you guys give
f

fresh-football-47124

06/10/2022, 8:17 AM
no problem
16 Views