Я провел несколько тестов iOS Appium (Java TestNG) на устройствах iOS для моего приложения.
Некоторые тесты даже не устанавливают приложение на шести или семи из 22 устройств.Все с той же ошибкой, что и не создавать сеанс:
Trying to execute simple Appium Driver
Failed to invoke configuration method scenarios.ScreenshotsAppiumTest.setUp:
It is impossible to create a new session because
'createSession' which takes HttpClient,
InputStream and long was not found or it is not accessible
Тест работает и проходит на всех моих устройствах и почти на всех других устройствах в AWS Device Farm.В тех устройствах, где он выходит из строя, он ничего не делает.Приложение не устанавливается.
Я понятия не имею, как отладить этот тест или почему он не запущен.Google не помогает.
Я уверен, что тест работает, поскольку он работает на других устройствах.
Я хотел бы знать, как отладить или попытаться устранить эту ошибку.Как выполнить отладку Appium без установки приложения в AWS Device Farm?Что я могу сделать?Есть ли какая-либо команда для выполнения, чтобы получить больше журналов?Что-нибудь?Я задал этот же вопрос на форуме AWS без какой-либо удачи .... Спасибо.
Ошибка, которую я имею в журналах:
RUNNING: Suite: "test" containing "1" Tests (config: /private/tmp/scratchudZ8pO.scratch/testng_xml93e7D5/screenshotsTest.xml)
https://forums.aws.amazon.com/ Keeping method ScreenshotsAppiumTest.setUp()pri:0, instance:scenarios.ScreenshotsAppiumTest@4e04a765 for class http://TestClass name=class scenarios.ScreenshotsAppiumTest
https://forums.aws.amazon.com/ Invoking @BeforeClass ScreenshotsAppiumTest.setUp()pri:0, instance:scenarios.ScreenshotsAppiumTest@4e04a765
INVOKING CONFIGURATION: "test" - @BeforeClass scenarios.ScreenshotsAppiumTest.setUp()
Trying to execute simple Appium Driver
Failed to invoke configuration method scenarios.ScreenshotsAppiumTest.setUp:It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
System info: host: 'prod-osx-device-host-master-v18.local', ip: 'fe80:0:0:0:82:486b:ed14:4cef%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.2', java.version: '1.8.0_141'
Driver info: driver.version: AppiumDriver
FAILED CONFIGURATION: "test" - @BeforeClass scenarios.ScreenshotsAppiumTest.setUp() finished in 0 ms
org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
System info: host: 'prod-osx-device-host-master-v18.local', ip: 'fe80:0:0:0:82:486b:ed14:4cef%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.2', java.version: '1.8.0_141'
Driver info: driver.version: AppiumDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:182)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:196)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:218)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130)
at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:84)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:94)
at scenarios.TestSetup.prepareDriver(TestSetup.java:117)
at scenarios.ScreenshotsAppiumTest.setUp(ScreenshotsAppiumTest.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:254)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.TestNG.privateMain(TestNG.java:1364)
at org.testng.TestNG.main(TestNG.java:1333)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:172)
... 35 more
Caused by: java.io.IOException: unexpected end of stream on Connection{127.0.0.1:4723, proxy=DIRECT hostAddress=/127.0.0.1:4723 cipherSuite=none protocol=http/1.1}
at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:205)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall.execute(RealCall.java:77)
at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:105)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:101)
... 40 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:227)
at okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java:212)
at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
... 57 more
INVOKING: "test" - scenarios.ScreenshotsAppiumTest.screenshotsTest()
SKIPPED: "test" - scenarios.ScreenshotsAppiumTest.screenshotsTest() finished in 0 ms
browses the page the title
https://forums.aws.amazon.com/ Keeping method ScreenshotsAppiumTest.tearDown()pri:0, instance:scenarios.ScreenshotsAppiumTest@4e04a765 for class http://TestClass name=class scenarios.ScreenshotsAppiumTest
SKIPPED CONFIGURATION: "test" - @AfterClass scenarios.ScreenshotsAppiumTest.tearDown() finished in 0 ms