如何改变Genymotion端口 [英] How to change Genymotion port

查看:2810
本文介绍了如何改变Genymotion端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在同一时间不同Genymotion设备上运行automatized测试。为此,我必须给单独的端口号为每个设备。

I would like to run automatized test on different Genymotion devices in the same time. For this I have to give seperate port numbers for each device.

这可能吗?

推荐答案

从Genymotion启动,您可以启动多个虚拟机。虽然这些每次都会有相同的默认端口(5555),他们将获得由VirtualBox的唯一主机适配器不同的IP地址。比如,我刚刚推出的两款机器Genymotion现在 ADB设备显示:

From the Genymotion Launcher, you are able to start multiple VMs. Although these each will have the same default port (5555), they will get different IP addresses from the VirtualBox host-only adapter. For example, I just launched two Genymotion machines and now adb devices shows:

$ adb devices
List of devices attached 
192.168.56.101:5555 device
192.168.56.102:5555 device
$

每个可分别通过在TCP / IP套接字程序,指定IP地址和端口,或使用 ADB -s解决如果你正在做手工命令行工作或者编写脚本。我不会去到socket编程在这里,但这里使用亚行来看看位置服务是第二个设备上运行的选择性访问一个简单的例子:

Each can be addressed separately by specifying IP address and port in your TCP/IP socket program, or by using adb -s if you're doing manual command line work or writing scripts. I won't go into socket programming here, but here's a quick example of selective access using adb to see if the Location service is running on the second device:

$ adb -s 192.168.56.102:5555 shell service check location
Service location: found
$

这篇关于如何改变Genymotion端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆