Skip to content
Chuck Walbourn edited this page Nov 3, 2026 · 37 revisions

This is a repository for the test suite for DirectX Tool Kit for DirectX 11 on GitHub.

Setup

  • Install git
  • Install and initialize git-LFS
  • Install CMake, Ninja, and MSVC or clang/LLVM for Windows
git clone https://github.com/Microsoft/DirectXTK.git
cd DirectXTK
git clone https://github.com/walbourn/directxtktest.git Tests
git clone https://github.com/Microsoft/DirectXTK.wiki.git wiki

Optionally some tests can also consume extra test image files from DirectXTex.

git clone https://github.com/walbourn/directxtexmedia.git  (requires git-LFS)

Create an environment variable DIRECTXTEX_MEDIA_PATH to point to the clone of directxtexmedia.

Running tests

CTest is supported

cd DirectXTK
cmake --preset=x64-Debug
cmake build out\build\x64-Debug
ctest --preset=x64-Debug

Coverage

CTest

These cover the entire library for Windows desktop (aka Windows classic) including DirectXTK for Audio using XAudio 2.8.

DirectXTK_Tests_Windows10

This covers GamePad, Keyboard, and Mouse when using the WinRT APIs as well as graphics components for Universal Windows Platform (UWP) apps.

When using UWP on Xbox One, it's recommended you set the option Treat UWP apps as games by default in the Device Portal for your development & testing Xbox One consoles. See this blog post for more information.

Command line options

The PC versions of the test suite support the following command-line switches:

  • -forcewarp Forces the use of the WARP software device. Normally this only gets used as a fallback if no hardware is found.

  • -minpower When run on Windows 10 April 2018 Update (Version 1803) or later, the test suite will prefer the use of DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE devices by default. If this switch is provided, then it will prefer the use of DXGI_GPU_PREFERENCE_MINIMUM_POWER instead. This primarily impacts hybrid graphics systems to force selection between AMD/NVIDIA and Intel Integrated devices.

  • -adapter:n Forces the use of a particular adapter at index n (0-based). If the adapter index is invalid, you'll end up with WARP.

Cleanup

The UWP tests are all deployed for testing, and will remain on your system until they are uninstalled. To remove them, you can use the following PowerShell script:

$directxtktests = @(
"db4076ae-14fb-4c16-95ea-b2894887ac6d",
"c8bf4ff0-2f8a-4254-9356-aa8f45ad8c7c",
"e18bb61b-c11e-4ac3-ba58-2d4abb4155fd",
"77504466-b4c0-44e3-a797-9bfc13334e85",
"ce2cb3e1-7586-4694-8623-672cc2988d7d",
"61adde96-80cc-4f86-95ae-40ac6659ac10",
"0978a727-17ec-42c5-b68d-8550f48717ea",
"8835D5FF-EA1B-40E0-A18E-5452E3E1EA69",
"64489900-f70d-4518-a754-30beeebc31cf",
"ff9f715c-e259-4e24-bdaa-bade5c02a44f",
"32F232AC-394B-4B7E-AF4E-F70084420491",
"09dda0bc-93bf-4bf8-a9db-38694ad9a361",
"3490dfd2-c964-4984-9a13-54d5697d971a",
"472ff739-cad7-4812-9a22-da579bfca412",
"251dee54-249d-41e0-8a41-90541f93dc40",
"2dc42269-b4ba-4b88-b7cf-6a8528a3792e",
"6eea623d-853c-4713-b7f2-22b44c877554",
"e3dbe4dc-54a3-4978-afe6-7bf1c27f0f41",
"eb13bc35-651b-406c-95bf-bc3c35c9b053",
"599ce94d-393a-471a-8511-4c6217ae6cc4"	
)
$directxtktests | % { Get-AppxPackage -Name $_ } | Remove-AppxPackage