This paper presents an approach for extending the constraint model defined for conformity testing of a given method of class to its overriding method in subclass using inheritance principle. The first objective of the proposed work is to find the relationship between the test model of an overriding method and its overridden method using the constraint propagation. In this context the approach shows that the test cases developed for testing an original method can be used for testing its overriding method in a subclass and then the number of test cases can be reduced considerably. The second objective is the use of invalid data which do not satisfy the precondition constraint and induce valid output values for introducing a new concept of test called secure testing. The implementation of this approach is based on a random generation of test data and analysis by formal proof.
 B. K. Aichernig and P. A. P. Salas, “Test Case Generation by OCL Mutation and Constraint Solving,” Proceedings of the International Conference on Quality Software, Melbourne, September 19-20, 2005, 2005, pp. 64-71.
 M. Benattou, J.-M. Bruel and N. Hameurlain, “Generating Test Data from OCL Specification,” Proceedings of the ECOOP’2002 Work-Shop on Integration and Transformation of UML Models (WITUML’2002), 2002.
 K. Benlhachmi, M. Benattou and J.-L. Lanet, “Génération de Données de Test Sécurisé à Partir d’une Spécification Formelle par Analyse des Partitions et Classification,” Proceedings of the International Conference on Network Architectures and Information Systems Security (SAR-SSI 2011), La Rochelle, 18-21 May 2011, pp. 143-150.
 K. Benlhachmi and M. Benattou, “A Formal Model of Similarity Testing for Inheritance in Object Oriented Software,” Proceedings of the IEEE International Conference (CIST’2012), Fez, 24-26 October 2012, pp. 38-42.
 K. Benlhachmi and M. Benattou, “Similarity Testing by Proof and Analysis of Partition for Object Oriented Specifications,” Journal of Theoretical and Applied Information Technology, Vol. 46, No. 11, 2012, pp. 461-470.
 Y. Cheon and C. E. Rubio-Medrano, “Random Test Data Generation for Java Classes Annotated with JML Specifications,” Proceedings of the 2007 International Conference on Software Engineering Research and Practice, Volume II, 25-28 June 2007, Las Vegas, pp. 385-392.
 B. H. Liskov and J. M. Wing, “A Behavioral Notion of Subtyping,” MIT Laboratory for Computer Science, Carnegie Mellon University, ACM Transactions on Programming Languages and Systems, Vol. 16, No. 6, 1994, pp. 1811-1841.
 G. T. Leavens and K. K. Dhara, “Concepts of Behavioral Subtyping and a Sketch of their Extension to Component-Based Systems,” In: G. T. Leavens and M. Sitaraman, Eds., Foundations of Component-Based Systems, 2000, pp. 113-135.