Build quite large test facility with diverse artificial scenes. Pay people to walk/bike/drive around. Use external motion capture, GPS, stationary radars, etc. with additional offboard computation to act as a watchdog and step in when the onboard systems fail. Would be expensive, but the companies pursuing autonomous driving can afford it.