For a note identification test, each professor may run their assessments a little differently. I will give you the most common scenario:
In a classroom situation, the professor will sit at the piano and give you the beginning prompts for each of eight questions. The beginning prompt will include the first note, the value of that first note, and the time signature for the example. You will write these down on your manuscript paper, if you are not already given a test paper from the professor. Usually the professor will play the example three times.
As to your question, if there are 8 questions on the test, and each note identification question takes approximately 2 minutes, you are looking at a total length of approximately 16 minutes.
How to succeed on note identification test:
Since you will most likely have three repetitions of the question, don’t try to dictate everything right away. On each repetition, focus on various elements of the music. For example:
Repetition 1) Focus on the rhythm. Write the rhythm above where you will be writing the actual music. You don’t even have to write out the actual note values, you can even just write tick marks within the measure where the rhythm takes place. This will go faster and you can get to the actual notes immediately. You should already be humming the melody back in your head between repetitions, some you can already understand the contour of the melody, if not the first several measures of the question.
Repetition 2) Focus on the notes. You can easily hear stepwise melodies, but pay attention to the exact value of greater intervals. Write down the actual notes, with exact rhythm, that you hear. Use the space between the repetitions to check intervals by humming back in your head. By this repetition you should be confident of the exact notes used.
Repetition 3) Proof your work. Are there any accidentals that you hear? Mode-mixtures from minor to major (or vice versa)? Correct any issues in rhythm or note-accuracy!