2010-04-07 11 views
0

Je reçois un ERREUR: Commande inconnue: 'echo' l'exécution d'un script de sélénium avec phpunit. Basé sur la sortie que la commande echo devrait être incluse dans ma version de PHPUnit. Le script sélénium s'exécute avec succès dans l'IDE de firefox selenium.commande echo introuvable lors du test du sélénium avec phpunit

mkdir_build: 

phpunit: 
    [exec] PHPUnit 3.4.12 by Sebastian Bergmann. 
    [exec] 
    [exec] . 
    [exec] TestFull 
    [exec] E 
    [exec] 
    [exec] Time: 11 seconds, Memory: 6.50Mb 
    [exec] 
    [exec] There was 1 error: 
    [exec] 
    [exec] 1) TestFull::testNumberOne 
    [exec] PHPUnit_Framework_Exception: Response from Selenium RC server for testComplete(). 
    [exec] ERROR: Unknown command: 'echo'. 
    [exec] 
    [exec] 
    [exec] /directory/to/tests/TestFull.php:14 
    [exec] 
    [exec] FAILURES! 
    [exec] Tests: 1, Assertions: 0, Errors: 1. 

Et la sortie du serveur RC:

$ java -jar selenium-server.jar -port 4445 -debug 
13:23:08.426 INFO - Java: Sun Microsystems Inc. 14.2-b01 
13:23:08.428 INFO - OS: Linux 2.6.28-15-server i386 
13:23:08.439 INFO - v2.0 [a2], with Core v2.0 [a2] 
13:23:08.439 INFO - Selenium server running in debug mode. 

13:25:05.661 DEBUG - ---------retrieving CommandQueue for sel_93352 
13:25:05.662 DEBUG - Browser 2c8b3b5657a640db9fb278ecbd01049e/:top sel_93352 posted ERROR: Unknown command: 'echo' 
13:25:05.662 DEBUG - ---------retrieving CommandQueue for sel_93352 
13:25:05.662 DEBUG - putting command: ERROR: Unknown command: 'echo' 
13:25:05.662 DEBUG - ..command put?: true 
13:25:05.662 DEBUG - sel_93352 commandHolder sel_93352 getCommand() called 
13:25:05.662 DEBUG - waiting for data for at most 10 more s 
13:25:05.662 DEBUG - data from polling: ERROR: Unknown command: 'echo' 
13:25:05.662 DEBUG - sel_93352 commandResultHolder sel_93352 getResult() -> ERROR: Unknown command: 'echo' 
13:25:05.663 DEBUG - Got result: ERROR: Unknown command: 'echo' on session 2c8b3b5657a640db9fb278ecbd01049e 
13:25:05.663 INFO - Got result: ERROR: Unknown command: 'echo' on session 2c8b3b5657a640db9fb278ecbd01049e 
13:25:05.663 DEBUG - Handled by org.openqa.selenium.server.SeleniumDriverResourceHandler in HttpContext[/selenium-server,/selenium-server] 
13:25:05.663 DEBUG - RESPONSE: 
HTTP/1.1 200 OK 
Date: Wed, 07 Apr 2010 20:25:05 GMT 
Server: Jetty/5.1.x (Linux/2.6.28-15-server i386 java/1.6.0_16 
Cache-Control: no-cache 
Pragma: no-cache 
Expires: Thu, 01 Jan 1970 00:00:00 GMT 
Content-Type: text/plain 
Connection: close 

Répondre

1

La commande Selenium IDE echo est pas pris en charge dans Selenium RC, au contraire, vous devez utiliser votre langue client pour faire écho à déposer/console. Par exemple, les éléments suivants doivent être imprimés sur la console en PHP:

print("Print this!" . "\n");