51Testing软件测试论坛

标题: selenium+testng 运行出错,请指教 [打印本页]

作者: fengzhulin    时间: 2012-1-17 17:35
标题: selenium+testng 运行出错,请指教
[attach]77126[/attach]

运行一直报这个错误,不知道什么问题,请指教
[TestNG] Running:
  C:\Documents and Settings\yhd2\Local Settings\Temp\testng-eclipse-1389659918\testng-customsuite.xml

java.lang.NoClassDefFoundError: com/google/common/base/Charsets
    at com.thoughtworks.selenium.HttpCommandProcessor.getOutputStreamWriter(HttpCommandProcessor.java:138)
    at com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:165)
    at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:108)
    at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:90)
    at com.thoughtworks.selenium.DefaultSelenium.captureScreenshot(DefaultSelenium.java:719)
    at com.thoughtworks.selenium.ScreenshotListener.onTestFailure(ScreenshotListener.java:27)
    at com.thoughtworks.selenium.ScreenshotListener.onConfigurationFailure(ScreenshotListener.java:41)
    at org.testng.internal.Invoker.runConfigurationListeners(Invoker.java:1842)
    at org.testng.internal.Invoker.handleConfigurationFailure(Invoker.java:333)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:236)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
    at org.testng.TestRunner.beforeRun(TestRunner.java:637)
    at org.testng.TestRunner.run(TestRunner.java:605)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1142)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1067)
    at org.testng.TestNG.run(TestNG.java:979)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)
作者: fengzhulin    时间: 2012-1-18 13:46
求赐教啊,大家能帮忙吗?
作者: fengzhulin    时间: 2012-1-18 16:41
问题已经解决,是因为少了google下的Charsets类。自己下载了一个,然后放到com/google/common/base这个package下就可以了
作者: Test小猫    时间: 2012-3-7 16:56
本帖最后由 Test小猫 于 2012-3-7 17:13 编辑

回复 3# fengzhulin

具体放哪个位置呢? 这个包我没找到
作者: fengzhulin    时间: 2012-4-11 15:41
自己下载一个就可以了
作者: Alawn    时间: 2017-12-27 21:41





欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2