This document walks through various tools available for testing the functionality and stability of new drivers for Windows IoT Core.
The Windows Hardware Lab Kit (Windows HLK) is a test framework used to test hardware devices for Windows 10. A subset of the tests is available for use on Windows IoT Core devices.
- A machine dedicated solely for HLK testing purposes running Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, or Windows Server 2016. This can also be a dedicated virtual machine.
- Network connectivity with the device under test.
1. (Option A) Download the preconfigured VHLK image and run in Hyper-V
This is the preferred method because it's easier to setup. Use the RS5 VHD and follow the instructions in the below links:
https://www.microsoft.com/en-us/evalcenter/evaluate-virtual-hardware-lab-kit
https://docs.microsoft.com/en-us/windows-hardware/test/hlk/getstarted/getstarted-vhlk
1. (Option B) Set up the HLK on your own Windows Server install:
If you need to use your own Windows Server 2016 machine you can follow this setup. Make sure to use Version 1809 of the HLK:
2. Machine Pool Setup
- Open HLK Studio on the HLK server.
- Click Configuration in the top menu and navigate to the Machine Management tab.
- Create and name a new machine pool for your device.
3. WTT Proxy Setup
In order to connect your IoT Core device to your HLK server, it will need to connect through a WTT Proxy service. The easiest way to do this is to setup the WTT Proxy on your HLK server directly.
(Full documentation: https://docs.microsoft.com/en-us/windows-hardware/test/hlk/getstarted/proxy-step-2--setup-an-hlk-proxy-system)
- On your HLK server run \\localhost\HLKInstall\ProxyClient\setup.exe
- After WWT Proxy setup completes, open an administrator command prompt and run
"%ProgramFiles(X86)%\WTTMobile\Client\WTTProxy.exe -console"
- Ensure that network sharing and discovery is enabled on your HLK server
4. Onboard your IoT Core device
- Open another administrator command prompt and navigate to WTTMobile\Tools
cd "%ProgramFiles(X86)%\WTTMobile\Tools"
- Find the UniqueId by looking for your system's IP address in the output of:
KitsDeviceDetector.exe /rundevicediscovery
REM example output: Name: 000EC687A555 | UniqueId: 00000000-0000-0000-0000-000ec687a555 | Address: 10.123.123.46 | Connection: SirepBroadcast2 | Location:
REM Note: If you have multiple matching results and the first doesn't work, try the UniqueID that is mostly zeroes.
# You can also run the following in PowerShell to search for just your IP address
./KitsDeviceDetector.exe /rundevicediscovery | Select-String "10.123.123.46"
- Modify the DeviceName, DeviceID, and machinepool values and run the following command to onboard the device. DeviceID = UniqueId from above, machinepool should match the name from step 2, DeviceName is a unique name of your choice.
KitsDeviceDetector.exe /Physical:Fake_PC.dll /DeviceName:HB_000EC687A555 /DeviceId:00000000-0000-0000-0000-000ec687a555 /machinepool:$\PoolName /SkipFFUCheck
- Onboarding takes a few minutes, don’t be alarmed when it stalls on the FFU step.
- If your device fails to onboard, ensure that the device and the proxy can ping each other, restart your Proxy and HLK server, and try again.
- After your device is onboarded, close WTTProxy.exe and run it again as administrator.
"%ProgramFiles(X86)%\WTTMobile\Client\WTTProxy.exe -console"
1. Running an HLK test
- Ensure that your WTTProxy console is running.
- Open HLK Studio.
- Create a new project.
- Under the Selection tab, select the machine pool that you onboarded your device to.
- If your system isn't visible in the systems tab, go to the configuration tab, select your machine pool, and right click your device to Change Machine Status to Ready.
- Select individual devices in the device manager section, or the whole system in the systems section.
- Select tests from the Tests tab, then run selected.
- Resource Hub proxy device
- i.MX UART Device
- i.MX I2C Device
- i.MX GPIO Controller
- i.MX ECSPI Controller
- i.MX PWM Controller
- i.MX Ultra Secure Digital Host Controller (uSDHC)
- Microsoft Optee TrEE Device
- i.MX Ethernet Adapter (NDIS 6.30)
- IMX6 Display Only Driver
- IMX6 Audio Device
- Sgtl5000AudioCodec Device
- Selecting any of the devices in the above list will expose a set of Device Fundamentals tests prefixed with "DF". These tests are a good baseline for the general robustness of a Windows driver.
- Selecting "Resource Hub proxy device" will expose GPIO, I2C, and SPI stress tests that will test your low level IO exposure in Windows. Most of these tests require additional hardware, more information is available in the following documentation:
Many of the tests run through the HLK are built on the Test Authoring and Execution Framework (TAEF). Depending on their complexity some of these tests can easily be run directly using TE.exe.
Copy the following two folders from your HLK server to your IoT Core device:
C:\Program Files (x86)\Windows Kits\10\Hardware Lab Kit\Tests\arm\iot
C:\Program Files (x86)\Windows Kits\10\Testing\Runtimes\TAEF\arm\MinTe
SSH into your IoT Core device and run the following:
cd <Parent directory of MinTE and iot>
# List all the tests in the DLL
MinTE\TE.exe iot\windows.devices.lowlevel.unittests.dll -list
# List just the PWM tests
MinTE\TE.exe iot\windows.devices.lowlevel.unittests.dll /name:Pwm* -list
# Run just the PwmTests namespace
MinTE\TE.exe iot\windows.devices.lowlevel.unittests.dll /name:PwmTests::*
# Run a specific test
MinTE\TE.exe iot\windows.devices.lowlevel.unittests.dll /name:PwmTests::VerifyControllerAndPinCreationConcurrent
The diskspd utility is an open source disk measurement utility that works on IoT Core and ARM.