update readme for WinAppDriver tests (#5927)

This commit is contained in:
Enrico Giordani 2020-08-13 13:08:36 +02:00 committed by GitHub
parent 1b8bb7c445
commit f36858d074
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,19 +4,18 @@ The PowerToys tests are implemented using Appium and use the [Windows Applicatio
## Prerequisites
- Install the latest stable version of Windows Application Driver in the test machine: [v1.1 Release](https://github.com/microsoft/WinAppDriver/releases/tag/v1.1)
- Install the ".Net desktop development" components in Visual Studio 2019. It should have support for "C#" and ".Net Framework 4.7.2".
- Install [PowerToys v0.15.2](https://github.com/microsoft/PowerToys/releases/download/v0.15.2/PowerToysSetup-0.15.2-x64.msix)
- Set Windows to "Developer Mode", by selecting `Developer mode` in `Settings > For developers > Use developer features` in Windows 10.
- Install the ".Net desktop development" components in Visual Studio 2019. It should have support for `C#` and `.Net Framework 4.7.2`.
- Install [PowerToys](https://github.com/microsoft/PowerToys/releases/)
- In Windows 10 Settings, turn on `Developer Mode` (open the Windows 10 Settings and search "Developer settings").
If you have `PowerToys v0.15.2 (MSIX)` installed, it can be launched automatically. Otherwise you should start `PowerToys` before running tests.
If you have `PowerToys` installed, it can be launched automatically. Otherwise, if you are testing a local build, you should start `PowerToys` before running the tests.
### Preparing the test machine
- Start `PowerToys` if it is necessary.
- Run the "Windows Application Driver" in Administrator mode in the test machine. By default you can find it in `C:\Program Files (x86)\Windows Application Driver`
- Start `PowerToys` if necessary (see the Prerequisites).
- Run `WinAppDriver.exe` in Administrator mode, on the test machine. By default it's installed in `C:\Program Files (x86)\Windows Application Driver\`
- **Note:** notifications or other application windows, that are shown above the PowerToys settings window or tray icon, can disrupt the testing process.
- Notice that notifications or other application windows that are shown above PowerToys settings window or tray can disrupt testing process.
When testing on a remote machine, Firewall exceptions must be added and the IP and port must be passed when starting "Windows Application Driver". Here's how to do it from the [Windows Application Driver FAQ](https://github.com/microsoft/WinAppDriver/wiki/Frequently-Asked-Questions#running-on-a-remote-machine):
When testing on a remote machine, a Firewall exceptions must be added and the IP and port must be passed when starting "Windows Application Driver". Here's how to do it from the [Windows Application Driver FAQ](https://github.com/microsoft/WinAppDriver/wiki/Frequently-Asked-Questions#running-on-a-remote-machine):
#### Running on a Remote Machine
@ -41,8 +40,8 @@ Windows Application Driver can run remotely on any Windows 10 machine with `WinA
3. Run `WinAppDriver.exe 10.X.X.10 4723/wd/hub` as **administrator** with command line arguments as seen above specifying local IP and port
4. On the *test runner* machine where the runner and scripts are, update the test script to point to the IP of the remote *test machine*
### Starting the tests in the Development Machine
- Open `powertoys.sln` in Visual Studio 2017.
### Starting the tests on the Development Machine
- Open `PowerToys.sln` in Visual Studio.
- Build the `PowerToysTests` project.
- Select `Test > Windows > Test Explorer`.
- Select `Test > Run > All` tests in the menu bar.