Download and install BlueStacks 5
- Install the apk in BlueStacks
- Enable ADB in BlueStacks
Settings > Advanced > Android Debug Bridge : enable
- Check that emulator is recognized and see on which port is listening
adb devices
- Setup in code port forwarding with port listening in emulator
For example
AltPortForwarding.ForwardAndroid(13000, 5037);
- Launch game in BlueStacks
- Setup AltTester connection port as seen in step 3