Short product cycles and rapidly changing requirements are increasingly forcing developers to use agile development strategies like extreme programming and test–driven development. At the same time, hierarchical software design strategies such as component based software engineering are becoming necessary to overcome increasing software complexity. In this paper, we present a test–driven component development framework that encapsulates test code in a mirror component for automated testing during development, and as an executable semantic to simplify assessment and to increase trustworthiness of software systems.