QA/Execution/Web Testing/SUMO/Selenium/htaccess

From MozillaWiki
< QA‎ | Execution‎ | Web Testing‎ | SUMO‎ | Selenium
Jump to: navigation, search

Selenium Remote Control Script to test .htaccess rewrites

  • How to run/modify the script
    • 1. You need to have PHP,PEAR,PHPUnit & Selenium RC installed.
    • 2. Download the script and save it as TC_rewrites.php
    • 3. Launch Terminal (in MAC) and run the selenium remote control server
     java -jar MyApps/selenium-remote-control-1.0.1/selenium-server-1.0.1/selenium-server.jar
    • 4. Launch another terminal window and cd to /selenium-php-client-driver-1.0.1
      cd /Users/mozilla/MyApps/selenium-remote-control-1.0.1/selenium-php-client-driver-1.0.1/
    • 5. Make sure in this directory you have /PEAR
    • 6. run the php script
     phpunit /Users/mozilla/MyApps/AutomationTests/SUMO/TC_rewrites.php
    • 7. To add additional locales just add the locale ID to the end of the array,$localesArray
     for eg. if you want to add the French locale, then add this line to the end of the private $localesArray: 77=>array("fr") if there are already 76 locales
     put a comma "," after the previous array.
    • 8. If you want to add a locale that redirects to another url, for eg. es-AR redirects to es then you would add it to the array list as follows:
     76=>array("es-AR","redirectUrl"=>"es") if there are already 76 locales
     note: don't forget to put a comma "," at the end of the line of the previous array
    • 9. Currently this test runs for the combination VERSION=3.5.1 & ENVIRONMENT=Darwin. If you want to run it for more combination then un-comment the lines by removing the forward slashes "//"
     //private $_2         = array("/3.5.1","/3.0.12","/2.0.0.20","/3.5b99");
     //private $_3         = array("/Linux","/WINNT","/Darwin");

also, comment these two lines by adding forward slashes "//" in front of the following lines

     private $_2         = array("/3.5.1");
     private $_3         = array("/Darwin");