1. Connect device to computer via USB.
2. Make sure device and computer are connected to the same Wi-Fi.
3. Run this command to restart adb and make it work over tcpip:
adb tcpip 5555
4. Disconnect device
5. Get IP address of your phone ("Settings" -> Wifi -> “Your connected network” -> Your IP address")
6. Run this command to connect adb to your device over Wi-Fi using IP address:
adb connect <your phones ip address>
7. Verify, that adb works remotely:
8. Run tests over Wi-Fi!