Abstract. In this paper, we deal with model-based automatic test generation. We show how to use UML state machines, UML class diagrams, and OCL expressions to automatically derive partitions of input parameter value ranges for boundary testing. We present a test generation algorithm and describe an implementation of this algorithm. Finally, we discuss our approach and compare it to commercial tools.