The automation test scripts will be executed inside the containers.
- Python 2.14
- Java 8
- ChromeDriver 75.0.3770.90
- Google Chrome 75.0.3770.100
- Firefox
- Geckodriver
The command below will be executed in headless mode.
robot --variable BROWSER:chrome -x junit.xml --outputdir Results --timestampoutputs project/google/google-search.robot && rebot --outputdir Results --output output.xml --merge results/output-*.xml
Below command is configured through Jenkins.
$ java -jar agent.jar -jnlpUrl http://localhost:8080/computer/cotainer-build-01/slave-agent.jnlp -secret 75c7c48273db32fdcb0e72d8032cc28f80348974c5fc9e88012df9fa7b6f8e7e
java -jar {agent.jar} -jnlpUrl {Url of your Jenkins/name of the node/slave-agent.jnlp} -secret {secret key here}
When updating the Global Setup and Teardown robot file to be able to run test scripts on local machines, run the following command (this command is used in order to tell Git to ignore changes on the file being mentioned):
git update-index --assume-unchanged resources/keywords/setup/Global_Setup_and_Teardown.robot
When pulling updates from the repository, run the following command in order to remove the error regarding the Global Setup and Teardown robot file (this command resets your changes on the Global Setup and Teardown file to enable you to pull changes from the repository):
git checkout resources/keywords/setup/Global_Setup_and_Teardown.robot
Rebuilding the images and containers
$ docker-compose build
$ docker-compose up -d
Make sure you have Jenkins installed in your local machine or server.
Environment variables
- Name: BROWSER
- Value: name of browser to used. e.g. chrome
Run robot script using execute shell.
$ rm -rf Results/*.xml && \
$ robot --variable BROWSER:$BROWSER -x junit.xml --outputdir results --timestampoutputs project/google/google-search.robot && rebot --outputdir results --output output.xml --merge results/output-*.xml && \
Python version directory - (https://www.python.org/ftp/python)
$ wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
$ tar xzf Python-3.7.2.tgz
$ cd Python-3.7.2 && ./configure && make install
$ pip3 install robotframework
$ robot --version
Robot Framework 3.1.1 (Python 3.7.2 on linux)
1. git clone https://github.com/nottyo/robotframework-jsonlibrary
2. cd robotframework-jsonlibrary
3. Edit the _init.py in the JSONLibrary directory so the imports on line 2 & 3 as follow:
from JSONLibrary.JSONLibraryKeywords import JSONLibraryKeywords
from JSONLibrary.version import VERSION
and also edit JSONLibraryKeywords.py in line 4:
JSONLibrary.version import VERSION
4. python3 setup.py install
5. pip3 install ../robotframework-jsonlibrary