When a researcher thinks about testing their hypotheses they think about how they are going to perform their experiment. They consider what type of experiment to perform, what variables are going to be used, and what exactly is going to be tested. However, if animals or humans are involved in the experiment, the researcher must also be aware of the ethical issues involved.
Things for researchers to consider, but are not limited to, involve: honesty, integrity, objectivity, carefulness, openness, respect for intellectual property, confidentiality, responsible publication, responsible mentoring, respect for colleagues, social responsibility, non-discrimination, competence, legality, and human subjects protection (National Institute of Environmental Health Sciences).
The institutional review board (IRB) requires researchers to exercise informed consent, which requires researchers to inform their subjects of what is involved in a study before asking them to participate. The IRB also requires researchers to inform subjects of any form of deception involved in the experiment along with a debriefing of the experiment. It's also notated that any deceit involved in an experiment may not cause the subjects physical pain or emotional distress. (Psychology: From Inquiry to Understanding).
A very notable example of the breaches in ethical standards involved in research is the unfortunate occurrence of the Tuskegee study. In this study, African American men who had been diagnosed with syphilis were observed and experimented on in order to find out how syphilis reacted without treatment. However, the men involved in this study were not aware that they had syphilis, were not informed that there were antibiotics available to treat the disease, and were not aware that they were even subjects in an experiment.
On a lighter note, here's a cartoon of a more humorous incident.