A model-driven framework for context-dependent testing of components (MD-CDCT) is the outcome of this research. Component-based Software Development (CSD) is a process in which software applications are developed by reusing existing components. Primarily, this research devises a technique for evaluating and extending the test adequacy of a component for its reuse in a new context (system). Secondly, it uses the Model-Driven Architecture (MDA) in the context of component testing and CSD. MDA is an emerging approach for developing software applications from high-level models. In MDA, models at various levels of abstraction are used to automate software development and testing activities.When a general-purpose component is used in a new context, it needs to be thoroughly tested for that context. MD-CDCT models the usage of a component, in a context of interest, using usage scenarios and interaction diagrams. From these scenarios, test cases for performing CDCT are automatically generated using a model-driven tool. We then evaluate and extend the adequacy of the generated test cases by comparing them with the test cases that were executed during This approach is novel in that it applies the emerging MDA technology to contextdependent testing of components. The proposed framework benefits from the advantages of an MDA-based approach, such as portability, interoperability and maintainability. Another novelty is the use of test cases, which are executed during component testing, to evaluate and extend the adequacy of component testing. We have developed two prototype tools (a tool for test case execution, and a tool for test suite comparison) to provide tool support for this approach.Five case studies are used to illustrate and evaluate the MD-CDCT. The first is a simulation of a Vending Machine system. This case study illustrates the application of MD-CDCT. The second is a simulation of an ATM system. This case study shows how to generate test cases from software models by making use of the model transformation technology. The third and fourth case studies show how the comparison of test suites can be used to evaluate and extend their test adequacy. The final case study evaluates the framework and the prototype tool support on a non-trivial system, which is Lucene (a search engine).iii