For embedded systems, software has become more and more important. The scale of software has increased, and cost for software testing has also increased. Especially, integration tests should be made more efficient because they usually occupy most of testing cost. As well as web and office applications, automated executions with formal test scripts are effective for embedded systems. However, in case of embedded systems, it is necessary to reconfigure test environments by adjusting settings of a microcomputer and a simulator of external environments to test scripts. Then, it is important to reduce the cost of reconfigurations in terms of the efficiency of integration tests. In this paper, we propose a method to optimize the order of executions of test scripts and minimize the number of times of reconfigurations. We found that the differences of configurations comes from hardware requirements on the embedded systems. We introduce a feature tree to describe the hardware requirements and associate them to each test script. Based on given hardware requirements, test scripts that are executable on the same configuration are executed consecutively. The proposed method is evaluated with a part of integration tests for automotive software. We have the prospect that the number of reconfiguration is reduced from 328 to 187 to test 53,483 test scripts.