To test an air purifier sensor, use an aerosol spray or cigarette smoke near the purifier's intake, and observe if the sensor detects and adjusts the air quality readings.