DEV Community

Discussion on: Unit Testing A/B Test Code

Collapse
 
chenxeed profile image
Albert Mulia Shintra

Thanks for this article!

As much as "having everything tested" is a clear practice, but some scenario shall be considered properly based on the use-case scenario, and unit testing AB-testing is also one of it.

I like the comparison table you've made to determine if the test is needed or not based on the probability of the "B-Test" scenario is going forward or not.

We can also have the consideration for the timing. If the "B-Test" scenario is likely going for production, but the test is not written yet during the development (because it's not written in TDD way), when do you think it's the best time to write the test then? I believe this is also one of the feedback given from the developers during review, but let me know if anyone think differently.