Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
php
python
README.md

README.md

These tests use Selenium and WonderProxy to make sure a location-aware WonderNetwork website looks the way it's supposed to from a few different places around the world.

Setup

  1. You'll need a (local) Selenium server. The simplest way to get one is to grab one of the stand-alone JARs from http://selenium-release.storage.googleapis.com/index.html and run it with no arguments:

    $ wget http://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar
    $ java -jar selenium-server-standalone-3.4.0.jar
    
  2. You'll also need PhantomJS. Follow the download instructions, and make sure the phantomjs executable ends up in your PATH (e.g. symlink it to /usr/bin/phantomjs).

  3. The Selenium test demos will pull your WonderProxy credentials from environment variables:

    $ export WONDERPROXY_USER=<your WonderProxy username>
    $ export WONDERPROXY_PASS=<your WonderProxy password>
    

Running the tests

PHP (./php)

The PHP demo has been tested on PHP 5.6 and 7.1.

  1. The PHP demo uses Composer to organize its dependencies:

    $ cd path/to/locale-testing-demo/selenium/php
    $ curl -sS https://getcomposer.org/installer | php
    $ php composer.phar install
    
  2. Spin up your Selenium server and fire away!

    $ cd path/to/locale-testing-demo/selenium/php
    $ ./vendor/bin/phpunit
    

Credit

This PHP demo was shamelessly ripped from @DavertMik's php-webdriver-demo for Selenium, which he blogged about at http://codeception.com/11-12-2013/working-with-phpunit-and-selenium-webdriver.html.

Python (./python)

  1. The Python demo runs on Python 3.2+. It might work on earlier versions, but it's not tested!

  2. Follow Selenium's instructions to set up the Python/Selenium bindings.

  3. Make sure your Selenium server is still running, and off you go!

    $ cd path/to/locale-testing-demo/selenium/python
    $ python3 test_wonderproxy.py
    

Other languages

Coming soon!

You can’t perform that action at this time.