Vehicles are tested by the companies that build them.
Companies must comply with Federal Motor Vehicle Safety Standards and certify that their vehicle is free of safety risks.
Many companies today are testing advanced automated vehicles to ensure that they operate as intended, but a great deal of work remains to be done to ensure their safe operation before they are made publicly available.
Source: https://www.nhtsa.gov/technology-innovation/automated-vehicles-safety