HLA-B*5701 testing remained the preferred strategy only if abacavir-based treatment had equal efficacy and cost less per month than tenofovir-based treatment. Results were also sensitive to the cost of HLA-B*5701 testing and the prevalence of HLA-B*5701.