1) Where possible, don't test in animals.
2) When testing in animals, first ensure that there is reasonable confidence the risk and severity of harm from the testing will be minimal. Only begin initial in vivo testing after this has first been achieved.
3) For test animals that are or aren't harmed, allow them to live happy, (relatively) normal, natural lives. Don't end their life early unnecessarily, with exceptions for humane euthanasia if the testing has unexpectedly caused significant, persistent suffering. Treat them as a pet owner would treat their beloved pet rat.
Some may consider it extreme, but, in my view, in an ideal world, people would treat testing in animals almost like testing in humans. The researcher should first ask "would I feel comfortable testing this in a voluntary human test subject?" Non-human animals would still be the first line of testing, since harm/death in a rat/mouse/chimpanzee is less morally bad than in a human, but I think this should be the mindset.