user-1: 
Vajrayana Buddhism is esoteric, in the sense that the transmission of certain teachings only occurs directly from teacher to student during an initiation or empowerment and cannot be simply learned from a book. Many techniques are also commonly said to be secret, but some Vajrayana teachers have responded that secrecy itself is not important and only a side-effect of the reality that the techniques have no validity outside the teacher-student lineage.
  (Source: http://en.wikipedia.org/wiki/Vajrayana#Esoteric_transmission)

But in my travels through the Buddhist landscape, I find that teachers are human: some good, some mediocre.  How do I find the right teacher?  Are there tests that the student can apply to the teacher?

user60: The "Jewel Ornament of Liberation" by Gampopa describes different levels of teachers and their qualifications. Some rely on the 31st chapter of the Avatamsaka Sutra (also known independently as the "Sutra of the Ten Bhumis") which describes a set of criteria on which to judge someone as a Mahayana teacher.
edit: it occurs to me that you may have been wondering about specifics, not just where you can find it talked about.
Some basics would be: have they taken the Bodhisattva Vow? Do they have demonstrable knowledge of the Mahayana path? Are they patient while teaching? Do they make sure people understand? Do they seem to get discouraged or disappointed with students? Can they speak to you at your level of understanding?
And of course standard things like ethical behavior.

user92: (Disclaimer: This is not a Vajrayāna approach so feel free to discard it but I'd say the advice is useful nonetheless.)
To find a skillful teacher, one could approach the matter prudently by trying to get the most points checked from the following list:  

Doesn't accept any money, especially for teaching.1 
Has the qualities mentioned in AN 4.73 & AN 4.192.  
Doesn't show traces of greed, hatred or delusion in their behavior.  
Meditates frequently and for lengthy periods.  
Eats once a day before noon.2 
Is content with very little.3 
Is bent on solitude & seclusion.4 

Note that these points are just good guidelines and should be taken as a supplement to one's own discernment.  
For further references, you might want to read some early discourses concerning this:  

DN 12: Teachers that are worthy & unworthy of criticism.
MN 8: The whole discourse is worth reading but I linked to the specific section about instruction called "Quenching".  
MN 47: This discourse addresses the issue head-on.  
AN 5.100: Teachers being covered up by their pupils.  
AN 5.159: Five qualities a teacher should set up.  
Dhp 158-159: Two verses about teachers.    

Footnotes: 

AN 5.159 has five qualities a teacher should set up. The fourth one is that he will not speak for the purpose of material reward.
MN 65 is a good reference about the Buddha's thoughts concerning this issue.
AN 4.27 is a good reminder about contentment with the bare minimum but I wouldn't advocate it as a necessary guideline.  
AN 8.53 has the qualities that make-up the Buddha's teaching and one of them is solitude\seclusion.


user43: "The Words of My Perfect Teacher" by Patrul Rinpoche has a chapter (Ch. 6) on how to choose, test and follow a "spiritual friend" (teacher):

pure, never having contravened any of the commitments or prohibitions (Pratimoksha, Bodhisattva's Vow, Secret Vows of Secret Mantrayana)
unstained by negative emotions
learned, not lacking in knowledge of sutras, tantras and shastras
heart suffused with compassion, loves each being like his only child
well-versed in vast array of rituals and ceremonies
not merely verbal but by putting the meaning of teaching into practice has actualized in himself the achievements of riddance and realization
generous, completely free of attachments
language should be pleasant
teaches each according to person's needs
acts in accordance with what he teaches

Teachers to avoid:

Like a millstone made of wool (high lamas by birth but have not studied and practiced seriously enough for the above qualities to arise)
Like the frog that lived in a well (with very limited exposure to true depth and breadth of Practice, having never seen a genuine spiritual master)
Mad guides (loose in discipline, strong in emotions, overemphasizing the esoteric and transcendental)
Blind guides (don't know what they are talking about)

"Treasury of Precious Qualities" by Jigme Lingpa has several pages (in Ch.5) on fully qualified masters vs. false teachers:
(repeats most of the above and adds the following)

Good teacher must have few activities, exclusively preoccupied with Dharma
His presence has transforming effect, inspiring all who meet him to seek for liberation
Must have an unconfined view, having realized the equality of nirvana and samsara
Having direct experience of the above, he is the source of his own freedom
Has been ripened by empowerments that came down to him in an uninterrupted lineage.


-1: <blockquote>
  <p>Vajrayana Buddhism is esoteric, in the sense that the transmission of certain teachings only occurs directly from teacher to student during an initiation or empowerment and cannot be simply learned from a book. Many techniques are also commonly said to be secret, but some Vajrayana teachers have responded that secrecy itself is not important and only a side-effect of the reality that the techniques have no validity outside the teacher-student lineage.
  (Source: <a href="http://en.wikipedia.org/wiki/Vajrayana#Esoteric_transmission" rel="nofollow">http://en.wikipedia.org/wiki/Vajrayana#Esoteric_transmission</a>)</p>
</blockquote>

<p>But in my travels through the Buddhist landscape, I find that teachers are human: some good, some mediocre.  How do I find the right teacher?  Are there tests that the student can apply to the teacher?</p>
 60: <p>The "Jewel Ornament of Liberation" by Gampopa describes different levels of teachers and their qualifications. Some rely on the 31st chapter of the Avatamsaka Sutra (also known independently as the "Sutra of the Ten Bhumis") which describes a set of criteria on which to judge someone as a Mahayana teacher.</p>

<p>edit: it occurs to me that you may have been wondering about <em>specifics</em>, not just where you can find it talked about.</p>

<p>Some basics would be: have they taken the Bodhisattva Vow? Do they have demonstrable knowledge of the Mahayana path? Are they patient while teaching? Do they make sure people understand? Do they seem to get discouraged or disappointed with students? Can they speak to you at <em>your</em> level of understanding?</p>

<p>And of course standard things like ethical behavior.</p>
 92: <p><sup><em>(Disclaimer: This is not a <em>Vajrayāna</em> approach so feel free to discard it but I'd say the advice is useful nonetheless.)</em></sup><br>
To find a skillful teacher, one could approach the matter prudently by trying to get the <em>most</em> points checked from the following list:  </p>

<ul>
<li>Doesn't accept any money, especially for teaching.<sup>1</sup>  </li>
<li>Has the qualities mentioned in <a href="http://www.accesstoinsight.org/tipitaka/an/an04/an04.073.than.html" rel="nofollow"><em>AN 4.73</em></a> &amp; <a href="http://www.accesstoinsight.org/tipitaka/an/an04/an04.192.than.html" rel="nofollow"><em>AN 4.192</em></a>.  </li>
<li>Doesn't show traces of greed, hatred or delusion in their behavior.  </li>
<li>Meditates frequently and for lengthy periods.  </li>
<li>Eats once a day before noon.<sup>2</sup>  </li>
<li>Is content with very little.<sup>3</sup>  </li>
<li>Is bent on solitude &amp; seclusion.<sup>4</sup>  </li>
</ul>

<p><em>Note that these points are just <strong>good guidelines</strong> and should be taken as a supplement to one's own discernment</em>.  </p>

<p>For further references, you might want to read some early discourses concerning this:  </p>

<ul>
<li><a href="http://www.accesstoinsight.org/tipitaka/dn/dn.12.0.than.html#sorts3" rel="nofollow"><em>DN 12</em></a>: Teachers that are worthy &amp; unworthy of criticism.</li>
<li><a href="http://www.accesstoinsight.org/tipitaka/mn/mn.008.nypo.html#mire" rel="nofollow"><em>MN 8</em></a>: The whole discourse is worth reading but I linked to the specific section about instruction called "Quenching".  </li>
<li><a href="http://librarum.org/book/20401/209" rel="nofollow"><em>MN 47</em></a>: This discourse addresses the issue head-on.  </li>
<li><a href="http://librarum.org/book/21501/725" rel="nofollow"><em>AN 5.100</em></a>: Teachers being covered up by their pupils.  </li>
<li><a href="http://librarum.org/book/21501/773" rel="nofollow"><em>AN 5.159</em></a>: Five qualities a teacher should set up.  </li>
<li><a href="http://www.accesstoinsight.org/tipitaka/kn/dhp/dhp.12.than.html#dhp-158" rel="nofollow"><em>Dhp 158-159</em></a>: Two verses about teachers.    </li>
</ul>

<p><em>Footnotes:</em>  </p>

<ol>
<li><a href="http://librarum.org/book/21501/773" rel="nofollow"><em>AN 5.159</em></a> has five qualities a teacher should set up. The fourth one is that he will not speak for the purpose of material reward.</li>
<li><a href="http://librarum.org/book/20401/273" rel="nofollow"><em>MN 65</em></a> is a good reference about the <em>Buddha</em>'s thoughts concerning this issue.</li>
<li><a href="http://librarum.org/book/21501/414" rel="nofollow"><em>AN 4.27</em></a> is a good reminder about contentment with the bare minimum but I wouldn't advocate it as a necessary guideline.  </li>
<li><a href="http://www.accesstoinsight.org/tipitaka/an/an08/an08.053.than.html" rel="nofollow"><em>AN 8.53</em></a> has the qualities that make-up the <em>Buddha</em>'s teaching and one of them is solitude\seclusion.</li>
</ol>
 43: <p>"The Words of My Perfect Teacher" by Patrul Rinpoche has a chapter (Ch. 6) on how to choose, test and follow a "spiritual friend" (teacher):</p>

<ul>
<li>pure, never having contravened any of the commitments or prohibitions (Pratimoksha, Bodhisattva's Vow, Secret Vows of Secret Mantrayana)</li>
<li>unstained by negative emotions</li>
<li>learned, not lacking in knowledge of sutras, tantras and shastras</li>
<li>heart suffused with compassion, loves each being like his only child</li>
<li>well-versed in vast array of rituals and ceremonies</li>
<li>not merely verbal but by putting the meaning of teaching into practice has actualized in himself the achievements of riddance and realization</li>
<li>generous, completely free of attachments</li>
<li>language should be pleasant</li>
<li>teaches each according to person's needs</li>
<li>acts in accordance with what he teaches</li>
</ul>

<p>Teachers to avoid:</p>

<ul>
<li>Like a millstone made of wool (high lamas by birth but have not studied and practiced seriously enough for the above qualities to arise)</li>
<li>Like the frog that lived in a well (with very limited exposure to true depth and breadth of Practice, having never seen a genuine spiritual master)</li>
<li>Mad guides (loose in discipline, strong in emotions, overemphasizing the esoteric and transcendental)</li>
<li>Blind guides (don't know what they are talking about)</li>
</ul>

<p>"Treasury of Precious Qualities" by Jigme Lingpa has several pages (in Ch.5) on fully qualified masters vs. false teachers:</p>

<p>(repeats most of the above and adds the following)</p>

<ul>
<li>Good teacher must have few activities, exclusively preoccupied with Dharma</li>
<li>His presence has transforming effect, inspiring all who meet him to seek for liberation</li>
<li>Must have an unconfined view, having realized the equality of nirvana and samsara</li>
<li>Having direct experience of the above, he is the source of his own freedom</li>
<li>Has been ripened by empowerments that came down to him in an uninterrupted lineage.</li>
</ul>
