我正在开发一个DevOps项目。我使用Jenkins作为我的持续集成服务器,并将Selenium和JUnit作为我的测试模块。这是一个Maven项目。 JUnit工作正常并且构建成功。 Selenium没有说出以下错误。 有什么建议在这里缺少什么?
Running TestSuite
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Windows/system32/config/systemprofile/.m2/repository/org/slf4j/slf4j-log4j12/1.7.21/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Windows/system32/config/systemprofile/.m2/repository/org/slf4j/slf4j-nop/1.5.3/slf4j-nop-1.5.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Windows/system32/config/systemprofile/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0092,name=PBrowser::Msg_UpdateNativeWindowHandle) Channel error: cannot send/recv
###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 23.405 sec <<< FAILURE! - in TestSuite
testTwo on testTwo(bean.JunitTest)(bean.JunitTest) Time elapsed: 22.757 sec <<< FAILURE!
org.openqa.selenium.WebDriverException:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:22003 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'EC2AMAZ-5BK3MDM', ip: '10.0.0.10', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver
at bean.JunitTest.testTwo(JunitTest.java:26)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:22003 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at bean.JunitTest.testTwo(JunitTest.java:26)
Caused by: java.net.ConnectException: Connection refused: connect
at bean.JunitTest.testTwo(JunitTest.java:26)
Results :
Failed tests:
JunitTest.testTwo:26 » WebDriver org.apache.http.conn.HttpHostConnectException...
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0