Bewerken

Delen via


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.

Prerequisites

Instructions

Step 1: Copy the tests to the 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.

Step 2: Run the tests

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= <>" ]  

Remarks

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'"