Historical examples as mentioned in the comments, include: Asch's Conformity Experiment; Milgram's Obediance Experiment; and similarly, the Stanford Prison Experiment by Zimbardo.
Zimbardo's experiment had more to do with situational forces and taking on an assumed role. A brief synopsis: He randomly assigns healthy students to either guard of prisoner roles in a mock basement prison. They assume their roles with striking commitment, which leads to some unfortunate interactions between the guards and prisoners. Some of his rhetoric would probably suit your story nicely. In the later chapters of his book published after the conclusion of the experiment, Zimbardo discusses his idea of a "hero" able to resist the situational forces. He believes this to be a latent attribute within an individual, and that leads us towards personality psychology. It is more akin to Asch's study, in that there is no true "authority" but rather situational forces brought about by other conforming peers.
As far as an specific test, I believe the Big Five Inventory can be adapted to your purposes. In personality psychology, it is regarded as a rather valid and consistent tool. Some of the metrics included could predispose an individual to obedience. Some examples that come to mind:
Agreeableness: Includes applicable measures of trust and compliance
Conscientiousness: Perhaps some use of self-discipline and dutifulness would identify as positive traits for an obedient character (thinking soldier or the like).
Openness to Experience: Scoring highly in measures of curiosity and values may make a character less apt to be obedient.
Source - Also includes a 44-item sample inventory.