How to test a driver at runtime from a Command Prompt
The WDK provides device testing components that enable you to test a driver on a test computer on your network. You can use these components outside of Visual Studio by copying and installing the necessary files. You can use these components to run the same collection of device driver tests that are available in Visual Studio to test the features and functions of your driver.
Starting in WDK 8.1, you can copy and run the HCK Test Suites on test computers using command scripts. See How to run the HCK Test Suites in WDK 8.1.
- Install Visual Studio and the WDK on the computer you use for development.
- From Visual Studio, you can configure and provision computers for testing. When you configure the test computer, the WDK driver test framework automatically enables the test computer for remote debugging and transfers the necessary test binaries and support files. If you have not already done so, follow the instructions in Provision a computer for driver deployment and testing (WDK 8.1)
- Although it is not recommended, you can also install the necessary test components manually. Follow the instructions to install the Test Authoring and Execution Framework (TAEF) and WDTF on the test computer. See Manually installing and uninstalling TAEF on a test computer and Manually installing WDTF on a test computer.
- Copy the Device Fundamentals Tests from the computer you use for development. Copy the folder %ProgramFiles%\Windows Kits\8.0\Testing\Tests\Device Fundamentals to the test computer.
The TAEF command to run the tests uses the following syntax:
Te.exe [/name:<Test Method>] [<Test Name>.dll | <Test Name.wsc> ] [/rebootStateFile=<file> ] [/enablewttlogging] [/P:"DQ= <>" ]
You must specify the test binary (.dll) or script (.wsc) file. The test method (/name:<test method>) is optional. For the test names and test methods, see the Device Fundamentals Tests. For information about specifying test parameters, see Device Fundamentals Test Parameters and Te.exe Command Options .
For example, to run all PnP tests in the Devfund_PnPDTest.dll on a device with a specific device ID.
Te.exe Devfund_PnPDTest.dll /P:"DQ=DeviceID='USB\ROOT_HUB\4&1CD5D022&0'"
For example, to run PnP Surprise Remove test on a device with a specific device ID.
Te.exe /name:"*PNPSurpriseRemoveAndRestartDevice" Devfund_PnPDTest.dll /P:"DQ=DeviceID='USB\ROOT_HUB\4&1CD5D022&0'"
- Device Fundamentals Tests
- Device Fundamentals Test Parameters
- How to run the HCK Test Suites in WDK 8.1
- Test Authoring and Execution Framework (TAEF)
- Te.exe Command Options