Empirically Evaluating Flaky Tests for Autonomous Driving Systems in Simulated Environments
In Autonomous Driving Systems (ADS) testing, a test scenario is a pre-defined, specific sequence of events, including static entities (e.g., road shapes and traffic signs) and dynamic entities (e.g., traffic lights and the trajectories of surrounding vehicles). By creating an environment according to a test scenario and running the ADS under test in that environment, we can verify whether the ADS causes any safety violations (e.g., collisions with other vehicles) or not. Due to the high cost and risks associated with setting up test scenarios in the real world, simulation-based testing, which relies on driving simulators that can create various virtual driving environments, has gained significant attention. Since simulated environments can be more deterministic than the real world, simulation-based testing can provide non-flaky tests, i.e., the same test outcome for the same test scenario (and the same ADS), in theory. However, do we really have no flaky tests in simulation-based ADS testing? This paper empirically investigates flaky tests in simulation-based ADS testing using two widely used, open-source driving simulators: CARLA and MetaDrive. Our results show that, surprisingly, 31.3% of benchmark test scenarios are potentially flaky due to nondeterministic simulations in CARLA, whereas MetaDrive does not yield any flaky tests. We further discuss potential causes of nondeterministic simulations, implications of flaky tests in ADS testing, and practical strategies for mitigating flakiness in future works.
Authors
- Donghwan Shin (ORCID: https://orcid.org/0000-0002-0840-6449)
- Phil McMinn (ORCID: https://orcid.org/0000-0001-9137-7433)
- Olek Osikowicz
Institutions
- University of Sheffield (GB)
Publication Details
- Published
- 2025-04-27
- DOI
- https://doi.org/10.1109/ftw66604.2025.00009
- Citations
- 1
- Primary Topic
- Autonomous Vehicle Technology and Safety
- Type
- article
- Field-Weighted Citation Impact
- 0.68
Funders
- Engineering and Physical Sciences Research Council