In a substrate testing device, a testing unit acquires a tested result of
a substrate by scanning of an electron beam. An alignment mark detecting
unit optically detects an alignment mark on the substrate. A substrate
position calculating unit calculates a substrate position within the
substrate testing device from a position of the alignment mark. A
position aligning unit aligns a position of the tested result with the
calculated substrate position.