Determining inter-class test order is one of the most difficult tasks in cluster level testing. This paper proposes the concept of weighted object relation diagram (WORD) by extending the traditional object relation diagram (ORD). When generating the interclass test order based on WORD, minimizing the number of realistic stubs (not the number of classes to be stubbed) is regarded as optimization objective. Some heuristic rules, such as association intensity, cycling weight and direction factors of edges, are used as important criteria to cut association edges to break cycles. An improved algorithm AICTO is presented via analyzing some principles of the existing methods and overcoming some of their drawbacks. This algorithm has some merits such as the fewer number of classes to be stubbed, holding the association edges with higher RD and excellent stability. In practice, the algorithm AICTO has been applied to our C/C++ program testing prototype CppTest and produces favorable effects.