navytest 发表于 2016-8-10 16:55:21

在eclipse中运行appium测试用例,eclipse报错,大家遇到过吗?

在eclipse中运行appium测试用例,eclipse报错,大家遇到过吗?检查了所有配置没问题。
eclipse报错信息如下:
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c ""D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s LGD857df9645ec shell "echo 'ready'""
error: unknown host service
) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8.51 seconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'USER-20150708VN', ip: '192.168.56.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_101'
Driver info: io.appium.java_client.android.AndroidDriver
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
        at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:43)
        at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
        at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
        at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:39)
        at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:69)
        at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:78)
        at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:67)
        at util.DriverManager.init(DriverManager.java:38)
        at util.AppiumTestBase.setUp(AppiumTestBase.java:21)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
        at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:298)
        at org.testng.SuiteRunner.run(SuiteRunner.java:261)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.run(TestNG.java:1048)
        at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
        at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)

wangruixia2017 发表于 2017-3-15 14:38:44

遇到过,你是怎么解决的?

flyinsky 发表于 2017-4-1 18:16:19

要么是未启动appium,要么就是启动超时,重启下appium就可以了
页: [1]
查看完整版本: 在eclipse中运行appium测试用例,eclipse报错,大家遇到过吗?