What a great question, there are so many ethical issues around animal testing and when we are talking about ethics it is very different from person to person, so something I may be happy with ethically someone else may feel is not ethical and vice-versa. For me as long as I feel I can justify the work I do and what I am surrounded by to myself I feel my own ethics are sound.
One time I was involved with trapping a troop of baboons in order to take DNA samples and mark them at the same time (the DNA sample was a piece out of their ear, so we could recognise each animal individually by where the cut in the ear was made). Ethical issues to consider were those of how long can you keep a baboon trapped in a cage, how do you make sure they don’t become too stressed, what happens to those few individuals that you can’t trap and are out there by themselves?
Scientists are not in the business of hurting animals or making them uncomfortable. They will only do things if absolutely necessary, and will try minimize any influence they have on animals as much is possible. And it’s not only the scientist him/her self who decides whether it is justified or worthwile: for all these sorts of thing there is an ethical committee which decides this. They are very experienced and make sure that scientist do everything right and think about all sorts of things to minimise the impact. For the baboons troop, we had many people helping to speed up the process as much as possible and veterinarians to take care of the animals welfare during the trapping. There are a few pictures on my profile about the trapping if you want to see what it looked like.