화물을 사용하여 컨테이너를 배치하고 시작한 다음 (잘 작동 함) 셀렌을 사용하여 일부 UI 테스트를 실행하려고합니다. 이Selenium Maven Cargo 도움말
Launching Selenium Server
Waiting for Selenium Server...
[INFO]Redirecting output to
[INFO]User extensions
를 말합니다하지만 내 통합 테스트가 확실한으로 실행되지는 결코 곳
내가 (MVN 깨끗한 통합 테스트)를 실행하려고 할 때마다
, 나는 지점에 도착. 어떤 도움이라도 대단히 감사합니다. Selenium Server가 시작되지 않는 것 같습니다.한 빠른 참고, 나는 내가 셀레늄 서버를 복사하고 그런 식으로 셀레늄을 시작하는 대신 ANT를 사용
의 JUnit 4.4을 시도 사용하고 있습니다. 그렇게하면 통합 테스트가 실행되지만 다음과 같은 오류가 발생합니다. 이것이 내가 셀렌 -maven-plugin을 사용하려고했던 이유입니다.
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.3 sec <<< FAILURE!
testAllCriticalPagesLoadWithoutError(com.adminserver.pas.test.SimpleSmokeTest) Time elapsed: 0.29 sec <<< ERROR!
java.lang.RuntimeException: Could not start Selenium session: NUL
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:89)
at com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:123)
at com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:104)
at com.thoughtworks.selenium.SeleneseTestCase.setUp(SeleneseTestCase.java:78)
at com.adminserver.pas.test.BaseSeleniumTest.setUp(BaseSeleniumTest.java:69)
at com.adminserver.pas.test.SimpleSmokeTest.setUp(SimpleSmokeTest.java:22)
at junit.framework.TestCase.runBare(TestCase.java:132)
at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:212)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
여기
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>start-selenium</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
</execution>
</executions>
<configuration>
<timeout>30</timeout>
<background>true</background>
<port>4444</port>
<logOutput>true</logOutput>
<verifyBrowser>*iexplore</verifyBrowser>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
여기 셀레늄이 server.log 파일에서 출력 내 pom.xml 파일의 관련 조각입니다 :
11:35:51,542 INFO [org.openqa.selenium.server.SeleniumServer] Java: Sun Microsystems Inc. 1.5.0_19-b02
11:35:51,542 INFO [org.openqa.selenium.server.SeleniumServer] OS: Windows 2003 5.2 x86
11:35:51,592 INFO [org.openqa.selenium.server.SeleniumServer] v1.0.1 [2697], with Core [email protected]@ [@[email protected]]
11:35:51,712 INFO [org.mortbay.http.HttpServer] Version Jetty/5.1.x
11:35:51,712 INFO [org.mortbay.util.Container] Started HttpContext[/,/]
11:35:51,722 INFO [org.mortbay.util.Container] Started HttpContext[/selenium-server,/selenium-server]
11:35:51,722 INFO [org.mortbay.util.Container] Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:35:51,732 INFO [org.mortbay.http.SocketListener] Started SocketListener on 0.0.0.0:4444
11:35:51,732 INFO [org.mortbay.util.Container] Started [email protected]
구성이 정상적으로 보입니다. IE가 비표준 위치에 설치되어 있습니까? 명령 줄 옵션을 사용하여 실행하면 어떻게됩니까? * -Ddebug = true * –
셀렌 종속성에 문제가 있습니까? com.adminserver.pas.test.SimpleSmokeTest'가 IDE에서 제대로 실행됩니까? –
의견을 보내 주셔서 감사합니다. 나는 IE 설치와 디버깅을 점검 할 것이다. 파스칼, 셀레늄 의존성에 대해 알지 못합니다. 분명히 나는 단지 "Selenium Server Started"를 결코 얻지 못할 것이다. 그것은 내가 기대할 수있는 것이다; 그냥 멈추고 돌아 오지 않습니다. 개미를 사용하여 사전 통합 테스트에서 셀렌 서버를 실행했을 때, 테스트는 적어도 실행되었지만 실패했습니다. 실행을 포크하고 생성했기 때문에 추측됩니다. 서버가 아직 시작되지 않았으므로 실패했을 수 있습니다. – noplay