Why test on animals? It's not the way to do it, not just from a moral pont of view but from a practical point of view, the fact it rarely works seems to suggest it is also a very great waste of effort and money.
Animal testing is a very very valuable tool in drug development. Mice share ~85% of human genes. As we attempt to target different pathways to intervene in disease, it is necessary to ensure that something that looks good in vitro (activating or shutting down a particular biomolecular cascade for instance) is relevant to the disease in question. A good way to tell is by testing on rodents to see if it the compound in question has an effect on the disease model in these species. If it doesn't, then the odds are very good that it won't work in humans.
Equally important is comparison of similar compounds with subtle structural differences that may have different affinities to the target, or different physicochemical properties (affecting things like absorbance and metabolism). Testing in mice or rats often allows us to pick the best available candidates before going into higher species like dogs or monkeys (which have greater similarity to the human genome). To advance, a potential drug has to be safe (no overt toxicities or unacceptable side effect profiles in at least one higher species and in rats) and efficacious in the best available disease model for these species.
A typical drug program will test many thousands (or millions) of compounds against a specific drug target (most of these will be done on isolated fractions of cells or whole cell assays). Potentially up to a few hundred will go into rodents to test whether they can reach their target in the body, and to see if they do what we want them to inside a living system. Of these, a handful will go into a short-term (2 weeks worth of dosing is typical) toxicity study in rats. Signs of overt toxicity (eg. hair loss, vomiting, etc) generally ends the study early as we have no need to continue dosing if such a dramatic effect can be seen early. The compound(s) (likely 1-3) that look best will then go into a higher species for profiling and toxicity studies. Once the studies are complete and the compounds can be shown to have good efficacy in the animal disease model and no markers of unacceptable toxicity (of which there are many), the compound is then submitted with all data to the regulatory agencies who approve whether or not the potential new drug can go into people.
It is true that there are differences in animal and human biology, and this is often a reason why drugs fail during human clinical trials; either they are much less effective on the human disease state than in the model (failing to be efficacious in treating the disease), or they exhibit side effects or toxicities which were not observed in the animal models.
Mouse Xenograft models of cancer (as mentioned in your second post) are really a different argument; in these cases, mice are infected with specific human cancer cell types and drug candidates are tested for their efficacy in halting progression or causing regression in these tumors. The problem here is not with the animal testing, but rather with the fact that human carcinomas tend to be far more complex than the single cell-type xenograft; often compounds which have been optimized against the xenograft models fail in human clinical trials because they lack activity against more complicated cancers in people. Nonetheless, the xenograft models have aided in successful development of new anti-cancer agents in many cases.
Animal testing is a necessary evil. The alternative is to directly test materials on people with
no idea whether or not they'll work or what side effects and toxicities can be expected. Obviously, this is completely unethical, and would cause great harm to untold numbers of people.
Animal testing will not uncover 100% of the problems associated with a new potential drug (however, neither do human clinical trials; there have been multiple instances when specific toxicities and problems were only seen years later when much much larger populations were treated, such as thalidomide), nor will it guarantee the drug will be effective in people.
Without animal testing, we'd still be suffering from Polio, AIDS would be a disease that always killed (instead of a condition that can lived with for many years), Insulin never would have been invented, and a whole host of other conditions would be death sentences that are now treatable and or curable.
The alternative to animal testing is to give up on the idea of intervening in human disease altogether.