【发布时间】:2018-10-28 12:19:13
【问题描述】:
我们使用 Appium-TestNG 创建了我们的自动化框架,我们在其中通过 RestFul API 从外部访问我们的后端服务器。后端服务器也基于 AWS,并将设备场 IP 列入白名单。当我们在本地执行测试时它工作正常,但是当我们在 AWS Device Farm 上执行它时,它在尝试通过我们的 api 访问后端服务器时给出“套接字异常”。
谁能给我们一个如何通过 Device Farm 访问外部 Rest APIS 的解决方案?
【问题讨论】:
-
您是从测试中进行这些调用还是来自设备的请求?您还可以提供套接字异常的堆栈跟踪吗?
-
我们正在通过测试进行此调用。以下是堆栈跟踪:“测试”-@BeforeMethod Android.Regression.EditPersonalInformation.setup() wawa_api.commons.ApiException: java.net.SocketTimeoutException: connect timed out at wawa_api.commons.ApiClient.execute(ApiClient.java:840)在 wawa_api.mobagteway.AuthenticationControllerV4Api.getClientCredentialsUsingPOST1WithHttpInfo(AuthenticationControllerV4Api.java:134) 在 wawa_api.mobagteway.AuthenticationControllerV4Api.getClientCredentialsUsingPOST1(AuthenticationControllerV4Api.java:118)