在一个测试用例中运行超过70-80个测试行,则显示“套接字挂起错误”或“ ESOCKETTIMEDOUT”

时间:2019-06-10 10:14:29

标签: android appium katalon-studio

在一个测试用例中运行超过70-80条测试线时,它会显示“套接字挂起错误”或“ ESOCKETTIMEDOUT”。突然,测试停止执行测试代码,并且在说15至20分钟后,它给出了错误。

如果我制作2个单独的测试用例,每个用60行,那么它们都可以成功完成而不会出现任何错误,但是如果我合并两个测试用例并运行一个包含120行的测试用例,那么它通常会在70-第80行。同样,如果我在顶部注释掉10行,那么测试用例将运行到第80-90行,然后再次停止。

我找不到真正的问题是什么。对我来说,这似乎是个鸦片问题。 我曾尝试更新appium和katalon studio,但问题仍然存在,并且也在不同的android设备上进行了测试。

> com.kms.katalon.core.exception.StepFailedException: Cannot swipe on
> device. (Root cause: org.openqa.selenium.WebDriverException: An
> unknown server-side error occurred while processing the command.
> Original error: Could not proxy command to remote server. Original
> error: Error: ESOCKETTIMEDOUT Build info: version: '3.141.59',
> revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host:
> 'Subhajits-MacBook-Air.local', ip: '192.168.29.5', os.name: 'Mac OS
> X', os.arch: 'x86_64', os.version: '10.14.5', java.version:
> '1.8.0_181' Driver info:
> com.kms.katalon.core.appium.driver.SwipeableAndroidDriver Capabilities
> {app: /Users/iamsubho2/Downloads/..., appPackage:
> com.lc_seenit.elsie_dev, autoGrantPermissions: true, automationName:
> uiautomator2, databaseEnabled: false, desired: {app:
> /Users/iamsubho2/Downloads/..., autoGrantPermissions: true,
> automationName: uiautomator2, deviceName: OnePlus ONEPLUS A5000
> (Andr..., fullReset: false, newCommandTimeout: 1800, noReset: true,
> platform: ANDROID, platformName: android, platformVersion: 9, udid:
> 3d999502}, deviceApiLevel: 28, deviceManufacturer: OnePlus,
> deviceModel: ONEPLUS A5000, deviceName: 3d999502, deviceScreenDensity:
> 380, deviceScreenSize: 1080x1920, deviceUDID: 3d999502, fullReset:
> false, javascriptEnabled: true, locationContextEnabled: false,
> networkConnectionEnabled: true, newCommandTimeout: 1800, noReset:
> true, pixelRatio: 2.375, platform: ANDROID, platformName: Android,
> platformVersion: 9, statBarHeight: 57, takesScreenshot: true, udid:
> 3d999502, viewportRect: {height: 1863, left: 0, top: 57, width: 1080},
> warnings: {}, webStorageEnabled: false} Session ID:
> dc1a58af-f530-45b0-afad-6587fb500e00  at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
>   at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
>   at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
>   at
> org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
>   at
> io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
>   at
> org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
>   at
> io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
>   at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
>   at
> io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
>   at
> com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.execute(SwipeableAndroidDriver.java:1)
>   at
> io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:41)
>   at io.appium.java_client.TouchAction.perform(TouchAction.java:187)
>   at
> com.kms.katalon.core.mobile.helper.MobileCommonHelper.swipe(MobileCommonHelper.java:37)
>   at
> com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword$_swipe_closure1.doCall(SwipeKeyword.groovy:76)
>   at
> com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword$_swipe_closure1.call(SwipeKeyword.groovy)
>   at
> com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
>   at
> com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword.swipe(SwipeKeyword.groovy:71)
>   at
> com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword.execute(SwipeKeyword.groovy:66)
>   at
> com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
>   at
> com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.swipe(MobileBuiltInKeywords.groovy:153)
>   at
> com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$swipe$1.call(Unknown
> Source)   at PreBuild1.run(PreBuild1:194)     at
> com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)     at
> com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:342)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:333)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:312)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:304)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:238)
>   at
> com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
>   at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown
> Source)   at
> TempTestCase1560160422043.run(TempTestCase1560160422043.groovy:21) )
>   at
> com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)
>   at
> com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)
>   at
> com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)
>   at
> com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword.swipe(SwipeKeyword.groovy:71)
>   at
> com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword.execute(SwipeKeyword.groovy:66)
>   at
> com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
>   at
> com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.swipe(MobileBuiltInKeywords.groovy:153)
>   at
> com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$swipe$1.call(Unknown
> Source)   at PreBuild1.run(PreBuild1:194)     at
> com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)     at
> com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:342)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:333)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:312)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:304)
>   at
> com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:238)
>   at
> com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
>   at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown
> Source)   at
> TempTestCase1560160422043.run(TempTestCase1560160422043.groovy:21)
> Caused by: org.openqa.selenium.WebDriverException: An unknown
> server-side error occurred while processing the command. Original
> error: Could not proxy command to remote server. Original error:
> Error: ESOCKETTIMEDOUT Build info: version: '3.141.59', revision:
> 'e82be7d358', time: '2018-11-14T08:25:53' System info: host:
> 'Subhajits-MacBook-Air.local', ip: '192.168.29.5', os.name: 'Mac OS
> X', os.arch: 'x86_64', os.version: '10.14.5', java.version:
> '1.8.0_181' Driver info:
> com.kms.katalon.core.appium.driver.SwipeableAndroidDriver Capabilities
> {app: /Users/iamsubho2/Downloads/..., appPackage:
> com.lc_seenit.elsie_dev, autoGrantPermissions: true, automationName:
> uiautomator2, databaseEnabled: false, desired: {app:
> /Users/iamsubho2/Downloads/..., autoGrantPermissions: true,
> automationName: uiautomator2, deviceName: OnePlus ONEPLUS A5000
> (Andr..., fullReset: false, newCommandTimeout: 1800, noReset: true,
> platform: ANDROID, platformName: android, platformVersion: 9, udid:
> 3d999502}, deviceApiLevel: 28, deviceManufacturer: OnePlus,
> deviceModel: ONEPLUS A5000, deviceName: 3d999502, deviceScreenDensity:
> 380, deviceScreenSize: 1080x1920, deviceUDID: 3d999502, fullReset:
> false, javascriptEnabled: true, locationContextEnabled: false,
> networkConnectionEnabled: true, newCommandTimeout: 1800, noReset:
> true, pixelRatio: 2.375, platform: ANDROID, platformName: Android,
> platformVersion: 9, statBarHeight: 57, takesScreenshot: true, udid:
> 3d999502, viewportRect: {height: 1863, left: 0, top: 57, width: 1080},
> warnings: {}, webStorageEnabled: false} Session ID:
> dc1a58af-f530-45b0-afad-6587fb500e00  at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
>   at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
>   at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
>   at
> org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
>   at
> io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
>   at
> org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
>   at
> io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
>   at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
>   at
> io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
>   at
> com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.execute(SwipeableAndroidDriver.java:1)
>   at
> io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:41)
>   at io.appium.java_client.TouchAction.perform(TouchAction.java:187)
>   at
> com.kms.katalon.core.mobile.helper.MobileCommonHelper.swipe(MobileCommonHelper.java:37)
>   at
> com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword$_swipe_closure1.doCall(SwipeKeyword.groovy:76)
>   at
> com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword$_swipe_closure1.call(SwipeKeyword.groovy)
>   at
> com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
>   ... 16 more

预期结果是所有测试用例都应完成而不会显示该错误。

1 个答案:

答案 0 :(得分:1)

重新安装Appium软件包似乎是最可能的方法:

adb uninstall io.appium.uiautomator2.server
adb uninstall io.appium.uiautomator2.server.test
adb uninstall io.appium.unlock
adb uninstall io.appium.settings

GitHub上找到。