使用,Centos的,阿帕奇,PHPUnit的,硒RC,硒RC測試(PHPUnit的)
我想測試它在我的服務器的一個運行硒RC。
Java的罐子硒的服務器獨立-2.4.0.jar
起初,我創造了Firefox的配置文件的錯誤,它亙古不變的負載任何東西,並給出錯誤。
其次我試着做給定的配置文件位置。
Java的罐子硒的服務器獨立-2.4.0.jar -firefoxProfileTemplate 「/root/.mozilla/firefox/」 &
它仍然顯示錯誤
錯誤 - 無法啓動新的瀏覽器會話,關機瀏覽器和 清除所有會話數據
INFO - 得到的結果:無法啓動新的瀏覽器會話:當會話空啓動瀏覽器
請分享你的觀點可能是什麼問題, 運行模擬,它是工作,測試的目的,但Firefox的錯誤,是無法中午瀏覽器會話。
注意:它不是GUI模式(NO x),它的Firefox版本3.6.18,
09:48:20.312 INFO - Got result: Failed to start new browser session: Error while launching browser on session null
09:48:39.659 INFO - Command request: getNewBrowserSession[*firefox3, http://google.co.uk] on session null
09:48:39.659 INFO - creating new remote session
09:48:39.660 INFO - Allocated session 17b9149077f648d3bc89b3f106466c6c for http://google.co.uk, launching...
09:48:39.860 INFO - Preparing Firefox profile...
09:49:00.017 ERROR - Failed to start new browser session, shutdown browser and clear all session data
java.lang.RuntimeException: Timed out waiting for profile to be created!
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:360)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:114)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:83)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:412)
at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:375)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:125)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:87)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:785)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:422)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:393)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:146)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
09:49:00.048 INFO - Got result: Failed to start new browser session: Error while launching browser on session null
我的測試suite.php如下所示:<?php require_once'PHPUnit/Extensions/SeleniumTestCase.php'; 類WebTest的延伸PHPUnit_Extensions_SeleniumTestCase的 { 保護功能設置() { $這 - > setHost( 「https://example.net/selenium-server/」); $ this-> setPort(4444); $ this-> setBrowser(「* firefox」); $ this-> setBrowserUrl(「http://google.co.uk」); } 公共函數testMyTestCase() { $這 - > setHost( 「https://example.net/selenium-server/」); $ this-> open(「/」); } } ?> – tike
給出的錯誤:1)WebTest :: testMyTestCase PHPUnit_Framework_Exception:無法連接到Selenium RC服務器。 失敗! 測試:1,斷言:0,錯誤:1. -------------------但我可以看到日誌出現在我的服務器,如上面粘貼。 – tike