First, you need to file a request, mentioning the need for drug testing and how it is relevant to the case. Your attorney will file the petition, and the judge will order the test based on legal circumstances. Moreover, the court will specify the type of drug testing and the lab.