2023-10-27 17:42:10 +02:00
# FancyZones UI tests
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
UI tests are implemented using [Windows Application Driver ](https://github.com/microsoft/WinAppDriver ).
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
## Before running tests
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
- Download and run Windows Application Driver installer from https://github.com/Microsoft/WinAppDriver/releases
- Enable Developer Mode in Windows settings
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
## Running tests
- Run WinAppDriver.exe from the installation directory (E.g. `C:\Program Files (x86)\Windows Application Driver` )
- Open `PowerToys.sln` in Visual Studio and build the solution.
- Run tests in the Test Explorer (`Test > Test Explorer` or `Ctrl+E, T` ).
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
>Note: notifications or other application windows, that are shown above the window under test, can disrupt the testing process.
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
## Extra tools and information
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
**Test samples**: https://github.com/microsoft/WinAppDriver/tree/master/Samples
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
While working on tests, you may need a tool that helps you to view the element's accessibility data, e.g. for finding the button to click. For this purpose, you could use [AccessibilityInsights ](https://accessibilityinsights.io/docs/windows/overview ) or [WinAppDriver UI Recorder ](https://github.com/microsoft/WinAppDriver/wiki/WinAppDriver-UI-Recorder ).
2019-12-12 12:25:19 +03:00
2023-10-27 17:42:10 +02:00
>Note: close helper tools while running tests. Overlapping windows can affect test results.