gpt4 book ai didi

android - 在单个测试用例中运行超过 70-80 条测试线时,它显示 “socket hang up error” 或 "ESOCKETTIMEDOUT"

转载 作者:太空狗 更新时间:2023-10-29 13:44:44 25 4
gpt4 key购买 nike

在测试用例中运行超过 70-80 条测试线时,它会显示“socket hang up error”或“ESOCKETTIMEDOUT”。测试突然停止执行测试代码,假设 15-20 分钟后它给出了错误。

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

我无法找出实际问题是什么。对我来说这似乎是一个 appium 问题。我已经尝试更新 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

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

最佳答案

重新安装 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 .

关于android - 在单个测试用例中运行超过 70-80 条测试线时,它显示 “socket hang up error” 或 "ESOCKETTIMEDOUT",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56524385/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com