So how do you test a smoke detector? Holding the button down usually just tests the electronics and battery/power source, but not the sensor/detector element. This can sprays an odorless, non-toxic, fast dissipating smoke that will trigger properly operating smoke alarms. (It obviously won't work with rate-of-rise heat or over-temperature sensors.)
NOT A TOY. Sorry, but the smoke disappears too quickly to make a decent prank.