1. A method of testing an infrared sensor, the method comprising: receiving one or more image frames from the infrared sensor; generating one or more image gradient frames based on the one or more corresponding image frames; generating one or more binary image frames of outliers based on the one or more corresponding image gradient frames; calculating a test statistic for each of the binary image frames, wherein the calculating the test statistic comprises calculating a Clark-Evans statistic based on a characterization of nearest-neighbor distances, wherein random samples from a complete set of nearest-neighbor distances are made and with a distribution of a sample being normal according to a central limit theorem; and determining if the infrared sensor is defective by comparing the test statistic to one or more thresholds.