Resistance tests, the newest tools in the HIV kit, can be helpful in choosing from the cocktail menu. The tests come in two flavors: genotypic and phenotypic. Neither will tell you which drug is best -- only which drugs probably won't work.
Genotypic tests do a genetic analysis of your virus to figure out what mutations it has developed. They're faster (results in a week or two) and cheaper ($400 to $600). Phenotypic tests pit your virus directly against HIV meds in a test tube. Results are measured on a sliding scale of "sensitivity," where high drug sensitivity generally means the drug will work in your body, and low equals resistance. They're more expensive ($900 to $1,000) and slower (results take two to four weeks).
Each test gives you different information, and each doc has a preference (usually based on which he or she least misunderstands!). Generally your doctor will run a genotype before you begin treatment to check for possible resistance, adding or switching to phenotypic testing for second- or third-round decisions. Many docs use both following your first treatment failure, in order to get the clearest possible picture of what's going on.
Two cautions: Neither works well if your viral load is below 50, and neither will be accurate if you've been drug-free for a while -- maybe even for a few weeks.