Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Download and install docker desktop at 

Once docker desktop is installed go to Settings>General and check 'Use the WSL 2 based engine'. Click apply and restart

...

Update package index

Code Block
languagebashtitleDocker compose command from sim folder
sudo apt update

Install Python3

Code Block
languagebashtitleDocker compose command from sim folder
sudo apt install python3

Install pip

Code Block
languagebashtitleDocker compose command from sim folder
sudo apt install python3-pip

Upgrade pip

Code Block
languagebashtitleDocker compose command from sim folder
sudo pip3 install --upgrade pip

Install Robot Framework

Code Block
languagebashtitleDocker compose command from sim folder
pip3 install robotframework

Install git

Code Block
languagebashtitleDocker compose command from sim folder
sudo apt install git

Install maven

Code Block
languagebash
titleDocker compose command from sim folder
sudo apt sudo apt install maven

Clone CPS and Dmi Plugin repos to home directory

...

Verify the docker daemon is accepting connections.

Code Block
title
languagebashDocker compose command from sim folder
docker ps

If you see this error

Code Block
languagebashtitleDocker compose command from sim folder
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied

Issue the following command

Code Block
title
languagebashDocker compose command from sim folder
sudo chmod 666 /var/run/docker.sock

...

Run the following script

Code Block
languagebash
titleDocker compose command from sim folder
sudo bash run-project-csit.sh

...

This issue may also appear when running the scripts from a windows WSL environment

Code Block
title
languagebashDocker compose command from sim folder
Error response from daemon: invalid IP address in add-host: ""

...

Issue the following command

Code Block
languagebash
titleDocker compose command from sim folder
sudo apt install net-tools


Code Block
languagebash
titleDocker compose command from sim folder
ifconfig

From the eth0 configuration take the inet address

...

If your tests don't run after doing this, as seen above check for this error.

Code Block
title
languagebashDocker compose command from sim folder
/tmp/tmp.rgIeMxiRCGrobot_venv/bin/python: Error while finding module specification for 'robot.run' (ModuleNotFoundError: No module named 'robot')

...

Look for the following line.

Code Block
languagebashtitleDocker compose command from sim folder
python -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}

Change this to

Code Block
languagebashtitleDocker compose command from sim folder
python3 -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}

Run scripts again

FAQ

How to fix "Error: could not open `{argLine}'when running unit tests from Intellij IDE ?

...