Software testing and metrics are key issues to improve software quality. They are important issues in the research of software engineering. In line with the methodologies of object-oriented analysis and design widely developed, many testing and metrics techniques have been proposed. However, not many focus on the testing criteria and metrics evaluation of an inheritance hierarchy. In this paper, we introduce a concept named unit repeated inheritance (URI) in Z to realize object-oriented testing and object-oriented metrics. The approach describes an inheritance level technique (ILT) method as a guide to test and measure the software complexity of an inheritance hierarchy. The measurement of inheritance metrics and some testing criteria thus can be formed based on the proposed mechanism.