diff options
Diffstat (limited to 'import-layers/yocto-poky/bitbake/lib/toaster/tests/browser/README')
-rw-r--r-- | import-layers/yocto-poky/bitbake/lib/toaster/tests/browser/README | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/import-layers/yocto-poky/bitbake/lib/toaster/tests/browser/README b/import-layers/yocto-poky/bitbake/lib/toaster/tests/browser/README index 6b09d20d8..352c4fe3e 100644 --- a/import-layers/yocto-poky/bitbake/lib/toaster/tests/browser/README +++ b/import-layers/yocto-poky/bitbake/lib/toaster/tests/browser/README @@ -2,9 +2,9 @@ These tests require Selenium to be installed in your Python environment. -The simplest way to install this is via pip: +The simplest way to install this is via pip3: - pip install selenium==2.53.2 + pip3 install selenium==2.53.2 Note that if you use other versions of Selenium, some of the tests (such as tests.browser.test_js_unit_tests.TestJsUnitTests) may fail, as these rely on @@ -18,7 +18,7 @@ To run tests against Chrome: * On Windows, put chromedriver.exe in the same directory as chrome.exe To run tests against PhantomJS (headless): - +--NOTE - Selenium seems to be deprecating support for this mode --- * Download and install PhantomJS: http://phantomjs.org/download.html * On *nix systems, put phantomjs on PATH @@ -43,13 +43,30 @@ Marionette driver.) The test cases will instantiate a Selenium driver set by the TOASTER_TESTS_BROWSER environment variable, or Chrome if this is not specified. +To run tests against the Selenium Firefox Docker container: +More explanation is located at https://wiki.yoctoproject.org/wiki/TipsAndTricks/TestingToasterWithContainers +* Run the Selenium container: + ** docker run -it --rm=true -p 5900:5900 -p 4444:4444 --name=selenium selenium/standalone-firefox-debug:2.53.0 + *** 5900 is the default vnc port. If you are runing a vnc server on your machine map a different port e.g. -p 6900:5900 and connect vnc client to 127.0.0.1:6900 + *** 4444 is the default selenium sever port. +* Run the tests + ** TOASTER_TESTS_BROWSER=http://127.0.0.1:4444/wd/hub TOASTER_TESTS_URL=http://172.17.0.1:8000 ./bitbake/lib/toaster/manage.py test --liveserver=172.17.0.1:8000 tests.browser + ** TOASTER_TESTS_BROWSER=remote TOASTER_REMOTE_HUB=http://127.0.0.1:4444/wd/hub ./bitbake/lib/toaster/manage.py test --liveserver=172.17.0.1:8000 tests.browser + *** TOASTER_REMOTE_HUB - This is the address for the Selenium Remote Web Driver hub. Assuming you ran the contianer with -p 4444:4444 it will be http://127.0.0.1:4444/wd/hub. + *** --liveserver=xxx tells Django to run the test server on an interface and port reachable by both host and container. + **** 172.17.0.1 is the default docker bridge on linux, viewable from inside and outside the contianers. Find it with "ip -4 addr show dev docker0" +* connect to the vnc server to see the tests if you would like + ** xtightvncviewer 127.0.0.1:5900 + ** note, you need to wait for the test container to come up before this can connect. + Available drivers: * chrome (default) * firefox * marionette (for newer Firefoxes) * ie -* phantomjs +* phantomjs (deprecated) +* remote e.g. to run the test suite with phantomjs where you have phantomjs installed in /home/me/apps/phantomjs: |