First of all, the mirror test is not exactly intended as a general test for consciousness, but a specific test for self-consciousness, and more exactly self-recognition. It is generally applied to some higher mammals and infants. The test consists on determining whether or not the subject can recognize its own reflection in a mirror. So far, only subjects belonging to the following species have passed the mirror test:
humans (over 2 years old),
great apes (bonobos, chimps, orangutans, and gorillas),
I think it is important to note that only a determined number of individuals of these species have passed the tests, while others generally fail to pass it. Obviously the test has to be adapted to each specie, although it typically consists on an odorless paint mark made in the forehead while the animal is anesthetized.
The mirror test has been considered by some researchers as one of the best available ways to test self-consciousness in organisms (see for instance how it is applied to Elephants in , and see  for an open discussion about the mirror test validity). Mirror test is famous thanks to its application to primates, as introduced by Gordon Gallup in the 70’s . However, little work has been done in the application of the mirror test to robots.
Can we build a robot able to successfully pass the mirror test? And if so, does it really mean that the robot is self-aware?
Takeno et al.  at Meiji University in Japan claim that they have succeeded in achieving mirror image cognition for a robot. They define four steps for their experiments, where four robots are used: the self robot Rs, the other robot Ro, the controlled robot Rc, and the automatic robot Ra. The first two robots are endowed with the mirror image cognition system. The third robot is controlled by the self robot, while the last one moves automatically.
The four experiments are as follows:
1) The self robot Rs imitates the action of its own image reflected in a mirror.
2) The self robot Rs imitates an action taken intentionally by the other robot Ro as imitative behavior.
3) The controlled robot Rc is controlled completely from the self-robot to imitate his behavior.
4) The self robot Rs imitates the random actions of the automatic robot Ra.
The robot is able to recognize its own image reflected in a mirror without confusing it with the image of another robot with the same physical aspect. The mirror image cognition system is based on an artificial neural network. The aim of this system is to recognize and differentiate robot’s own behavior from other robot’s behavior. Takeno also suggests that imitation is a proof of consciousness as it requires the recognition of other subject’s behavior and then the application of that behavior to oneself.
The results described in the paper indicate that in some way the robots are passing the mirror test with an accuracy of 70%, but I am reluctant to claim that they are self-conscious. I would rather say that the present a-consciousness of their recognized image.
 Gallup, G.G., Jr. (1977). Self-recognition in primates: A comparative approach to the bidirectional properties of consciousness. American Psychologist, 32, 329-337.
 Junichi Takeno, Keita Inaba, Tohru Suzuki. Experiments and examination of mirror image cognition using a small robot. Proceedings. 2005 IEEE International Symposium on Computational Intelligence in Robotics and Automation, 2005. CIRA 2005. Full paper available at: http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=1554325