2014-09-23 83 views
0

我正在使用testNG框架和ANT任务运行Selenium测试。该测试在我的Windows machine..I罚款运行,那么它部署到我的詹金斯CI服务器,并进行必要的配置,对于运行测试无头:在jenkins CI服务器上运行selenium webdriver/testng无头测试时出错

  • 在我的服务器上运行詹金斯

    安装VNC服务器(CentOS的)

  • 安装使用Xvnc插件詹金斯和启用了我的工作配置

“构建过程中运行的Xvnc”不过,我得到下面的错误 - 任何帮助吗?我已经走遍了网页,但我无法找到一个解决方案:“org.openqa.selenium.firefox.NotConnectedException:无法连接后45000毫秒到主机端口7055 127.0.0.1 Firefox的控制台。”

[workspace] $ /root/.jenkins/tools/hudson.tasks.Ant_AntInstallation/Ant/bin/ant 
 
Buildfile: /root/.jenkins/jobs/automationFramework/workspace/build.xml 
 

 
compile: 
 
    [javac] /root/.jenkins/jobs/automationFramework/workspace/build.xml:28: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds 
 
    [javac] Compiling 2 source files to /root/.jenkins/jobs/automationFramework/workspace/test-output 
 

 
test: 
 
    [testng] [TestNG] Running: 
 
    [testng] /root/.jenkins/jobs/automationFramework/workspace/src/automationFramework/testng.xml 
 
    [testng] 
 
    [testng] org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: 
 
    [testng] *** EM_LOG *** Item Installed via directory addition to Install Location: app-global Item ID: {972ce4c6-7e08-4474-a285-3208198ce6fd}, attempting to register... 
 
    [testng] *** EM_LOG *** Item Installed/Upgraded at Install Location: app-global Item ID: {972ce4c6-7e08-4474-a285-3208198ce6fd}, attempting to register... 
 
    [testng] *** Blocklist::_loadBlocklistFromFile: blocklist is disabled 
 
    [testng] *** EM_LOG *** ... success, item is compatible 
 
    [testng] *** EM_LOG *** Item Installed via directory addition to Install Location: app-profile Item ID: fx[email protected], attempting to register... 
 
    [testng] *** EM_LOG *** Item Installed/Upgraded at Install Location: app-profile Item ID: [email protected], attempting to register... 
 
    [testng] *** EM_LOG *** ... success, item is compatible 
 
    [testng] *** EM_LOG *** Item Installed via directory addition to Install Location: app-system-user Item ID: [email protected], attempting to register... 
 
    [testng] *** EM_LOG *** Item Installed/Upgraded at Install Location: app-system-user Item ID: [email protected], attempting to register... 
 
    [testng] *** EM_LOG *** ... success, item is compatible 
 
    [testng] 
 
    [testng] \t at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118) 
 
    [testng] \t at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246) 
 
    [testng] \t at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114) 
 
    [testng] \t at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193) 
 
    [testng] \t at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186) 
 
    [testng] \t at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182) 
 
    [testng] \t at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95) 
 
    [testng] \t at automationFramework.GoogleTest.testGoogle(Unknown Source) 
 
    [testng] \t at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
 
    [testng] \t at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
 
    [testng] \t at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
 
    [testng] \t at java.lang.reflect.Method.invoke(Method.java:606) 
 
    [testng] \t at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84) 
 
    [testng] \t at org.testng.internal.Invoker.invokeMethod(Invoker.java:714) 
 
    [testng] \t at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) 
 
    [testng] \t at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) 
 
    [testng] \t at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) 
 
    [testng] \t at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) 
 
    [testng] \t at org.testng.TestRunner.privateRun(TestRunner.java:767) 
 
    [testng] \t at org.testng.TestRunner.run(TestRunner.java:617) 
 
    [testng] \t at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) 
 
    [testng] \t at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) 
 
    [testng] \t at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) 
 
    [testng] \t at org.testng.SuiteRunner.run(SuiteRunner.java:240) 
 
    [testng] \t at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) 
 
    [testng] \t at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) 
 
    [testng] \t at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) 
 
    [testng] \t at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) 
 
    [testng] \t at org.testng.TestNG.run(TestNG.java:1057) 
 
    [testng] \t at org.testng.TestNG.privateMain(TestNG.java:1364) 
 
    [testng] \t at org.testng.TestNG.main(TestNG.java:1333)

硒版本2.43 火狐 - 3.6 詹金斯在CentOS - 5.5

感谢

回答

0

它通常发生由于INCOM兼容的FF和WD版本。所以,仔细检查你使用的版本是否正确。

相关问题