Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Forcing the "test" experience #47

Open
t1mwillis opened this issue Apr 6, 2021 · 3 comments
Open

Forcing the "test" experience #47

t1mwillis opened this issue Apr 6, 2021 · 3 comments

Comments

@t1mwillis
Copy link

Is there any way, for testing purposes, to force viewing the "test" experience, aside from simply setting the weight to 100? I ask because it can be helpful for QA purposes to verify expected functionality between test and control. It seems like manually modifying the cookie is another option, but I would prefer something like ?testName=enabled as a query param. If this is outside of the scope of the module, simply let me know.

@farzadso
Copy link
Collaborator

farzadso commented Apr 7, 2021

Why not set the weights accordingly based on the current environment you're in? e.g., using environment variables, etc.

I think this is kind of outside the scope. What do you think @hecktarzuli @pi0 ?

@t1mwillis
Copy link
Author

@farzadso Can you provide some more insight on how I might go about setting those environment variables? Do the experiments receive the context as an argument? Or are you simply talking about referencing process.env.TEST_A_WEIGHT within the experiments. The latter will not work as we build the application once using docker, then inject various environment specific variables.

Passing the context as an argument could be beneficial in that it would allow for different test id's within environments as well.

@farzadso
Copy link
Collaborator

farzadso commented Apr 8, 2021

@t1mwillis I meant the latter and since you're using the same built image you can't achieve what I meant.

If your test environments have a specific URL structure, a hacky version would be to set the conditions based on the different URLs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants