WDTF Architecture

To understand the architecture of WDTF, you should first read Windows Device Testing Framework Design Guide. The most important concept is that WDTF uses devices and the system by abstracting each of them into a target (an IWDTFTarget2 interface). The following illustration shows the core object model that WDTF provides.

Diagram illustrating the WDTF core object model, showing System and Device depot.

Your scenario can use some or all of the following WDTF objects and interfaces:

WDTF aggregation object
The WDTF aggregation object (IWDTF2) is the initial instantiation point for the entire framework. Everything in the framework must be accessed through this object.

SystemDepot property
The SystemDepot property (IWDTFSystemDepot2) contains only the local computer, which you can access through the ThisSystem property.

DeviceDepot property
The DeviceDepot property (IWDTFDeviceDepot2) represents a collection of all devices that are available on the computer. A scenario script can query (with the Query method) the DeviceDepot property for devices that meet one or more criteria that you specify in a search string by using the Simple Data Evaluation Language (SDEL). As shown in the previous figure, Query returns a collection of targets (IWDTFTargets2) that meet the criteria. Additionally, the DeviceDepot property has a RootDevice property that represents the logical device object that is the parent of all physically present (also known as non-phantom) devices in the computer.

IWDTFTarget2
The IWDTFTarget2 interface represents a target of testing activities. All activities that you perform with the framework involve at least one target. Targets can have one of the following forms:

  • A device-type target represents a hardware (or software) device that is attached to the computer.

  • A system-type target represents a computer as a whole.

A target contains attributes that describe the device or computer they represent.

IWDTFTargets2
The IWDTFTargets2 collection interface represents a collection of individual targets (IWDTFTarget2). The IWDTFTargets2::Query method enables you to retrieve another collection that contains a subset of the contained targets.

Action Plug-ins

WDTF includes a set of interfaces and implementations (action interfaces) that you can use in your test scenarios to control targets. Each implementation knows how to perform target-specific actions, such as enabling and disabling, or performing I/O operations. Your scripts can refer to these interfaces by their interface name, without understanding the specific implementation, as the following illustration shows.

Diagram illustrating the Target::GetInterface method.

For more information about these interfaces, see Controlling Targets.

Simple Data Evaluation Language (SDEL)

WDTF includes a simple query language, Simple Data Evaluation Language (SDEL), that is similar to XPath and that simplifies the task of collecting targets based on attributes or relationships. SDEL enables you to form brief query statements that define selection constraints based on both the attributes of each target and relationships between them. For more information about SDEL, see Simple Data Evaluation Language Overview.