Yes, it’s legal to drug test employees in the UK, provided it’s included in the employment contract and is justified by health and safety reasons [2]. Random testing is permissible for safety-critical roles [3].