At present, the automated real-time embedded software testing is a hot topic. Automated testing is essentially based on user programming and how to build test script quickly and effectively is one of the key problems to be resolved. In this paper, the object-oriented and framework technologies are introduced into the real-time embedded software testing field and the real-time testing object framework (RT-TOF) is studied firstly. And then, the test script generation process based on RT-TOF is proposed. Furthermore, the design of RT-TOF is put forward. Finally, the test script sample of the avionics embedded software system testing is given. Practical application of RT-TOF in engineering shows that the method proposed in this paper can improve the efficiency of automated testing greatly and the test script based on RT-TOF has better maintainability and reusability.