Airlines are required by the FAA to randomly test pilots for drugs and alcohol, and tests can also be required after an accident or when someone — such as a fellow crew member or security personnel — has reason to suspect a pilot might be under the influence.