  Elevator systems are one kind of Cyber-Physical Systems (CPSs), and as such,
test cases are usually complex and long in time. This is mainly because
realistic test scenarios are employed (e.g., for testing elevator dispatching
algorithms, typically a full day of passengers traveling through a system of
elevators is used). However, in such a context, when needing to reproduce a
failure, it is of high benefit to provide the minimal test input to the
software developers. This way, analyzing and trying to localize the root-cause
of the failure is easier and more agile. Delta debugging has been found to be
an efficient technique to reduce failure-inducing test inputs. In this paper,
we enhance this technique by first monitoring the environment at which the CPS
operates as well as its physical states. With the monitored information, we
search for stable states of the CPS during the execution of the simulation. In
a second step, we use such identified stable states to help the delta debugging
algorithm isolate the failure-inducing test inputs more efficiently.
  We report our experience of applying our approach into an industrial elevator
dispatching algorithm. An empirical evaluation carried out with real
operational data from a real installation of elevators suggests that the
proposed environment-wise delta debugging algorithm is between 1.3 to 1.8 times
faster than the traditional delta debugging, while producing a larger reduction
in the failure-inducing test inputs. The results provided by the different
implemented delta debugging algorithm versions are qualitatively assessed with
domain experts. This assessment provides new insights and lessons learned, such
as, potential applications of the delta debugging algorithm beyond debugging.
