Hi ,
Today we want to install java, eclipse and selenium server rc 3 on ubuntu 16.04 to have a small testenviroment to test our applications in different browsers.
At fisr we need the openjdk 8 and the server application
1) openjdk-8-jdk
follow this tutorial:
http://magento2-tuts.blogspot.de/2016/08/ubuntu-1604-istall-openjdk-8.html
2) eclipse
follow this tutorial:
http://magento2-tuts.blogspot.de/2016/08/install-eclipse-on-ubuntu-1604.html
3) download Seleniumserver rc (remote control)
http://www.seleniumhq.org/download/
my current version is selenium-server-standalone-3.0.0-beta2.jar
3.2 create a folder:
/usr/lib/selenium
/var/log/selenium
chmod a+x /var/log/selenium
3.3 move downloaded server jar to
/usr/lib/selenium
3.3 install selenium as a service
save following shell script to:
Add startscript to runlevel, to start on reboot
$ update-rc.d selenium defaults
Configure a chrome webdriver
We want to use chrome as the standard webdriver.
Download chrome webdriver.
- http://chromedriver.storage.googleapis.com/index.html?path=2.22/
- move the zip to /usr/bin/selenium
- unzip the package there.
- after that you have an executable file under /usr/bin/selenium/chromedriver
$ mkdir -p /var/log/selenium
$ touch /var/log/selenium/selenium-output.log
type:
/etc/init.d/selenium start
Thats. It.
In the next tutorial we want to use java, eclipse and selenium ide to create our first automated browsertests.
create first seleniumtest in java with eclipse
If you want to use firefox as testbrowser, you have to download and install webdriver.gecko.driver from:
https://github.com/mozilla/geckodriver/releases
- move the zip to /usr/bin/selenium
- unzip the package there.
- after that you have an executable file under /usr/bin/selenium/geckodriver
Keine Kommentare:
Kommentar veröffentlichen