Test automation supports organizations in developing better products as they gain quick feedback and thus lower the risk of bottlenecks and service disruptions that hinder customer experience. Nevertheless, software testing has always been a time-consuming task. Furthermore, the feedback gained from test execution results has to be accurate to be beneficial. Testing software product lines is particularly time-consuming, as different software variants are needed to reach good coverage. Maintaining separate test suites for different variants is hard. In this paper, we present an approach, that matches the capabilities of available test environments with the requirements of test cases and executes only those test cases that are relevant for a given variant. The approach is meant to reduce execution times by skipping those tests that will never be able to be executed in a given environment and avoid false-negative test execution results. The framework was developed in the context of systems for public transportation, where different hard- and software setups are used depending on the use case (e.g., SIM-Card, GPS-Antenna, Voice-Radio).