docker-robot-framework icon indicating copy to clipboard operation
docker-robot-framework copied to clipboard

Not able to select the tests when running the docker container

Open d-saravanan opened this issue 3 years ago • 3 comments

Describe the bug Hi, I have checkedout the git repository in my machine (centos-7). I did the docker build and when i try to run the docker container, I am getting the below error

To Reproduce Steps to reproduce the behavior:

  1. git clone
  2. docker build
  3. run the docker container
  4. See error image

I have the files in the following location /home/ec2-user/tmp/test This directory has a file in the name of login.robot

I also have the same file present in /opt/robotframework/test directory

sudo docker run \ -v ${PWD}/reports:/home/ec2-user/tmp/reports:Z \ -v ${PWD}/test:/opt/robotframework/tests:Z \ -e BROWSER=chrome \ -i -t c00aebb39abc

for this command, I am getting below error, [ ERROR ] Suite 'Tests' contains no tests or tasks.

The same is the case with the command executed using the docker image as given in readme file

sudo docker run \ -v pwd/reports:/opt/robotframework/reports:Z \ -v pwd/test:/opt/robotframework/tests:Z \ -e BROWSER=chrome \ ppodgorsek/robot-framework:3.1.1

Kindly help me fix this issue, as I am unable to execute the sample scenario to get started

d-saravanan avatar Sep 15 '21 06:09 d-saravanan

Hello is your folder where the tests are located called test? .

awasall avatar Sep 17 '21 11:09 awasall

I am not good at command lines so what I did is:

  • Build image from Docker file of this project
  • Use the image in docker-compose.yml
  • Mount my local test files to test directory of the container This setup allows me to simply drop the test file to a defined location only local machine and run it with just docker-compose up

The following is an example docker-compose.yml

version: "3"

services: robotframework: image: rflocal:latest container_name: robotframework environment: - ROBOT_OPTIONS=--loglevel INFO shm_size: 2g volumes: # Mount test directory as below - ./tests/101_Test_Application_End_To_End:/opt/robotframework/tests/101_Test_Application_End_To_End

Hope this will help

linh-ngophuochoai avatar Nov 05 '21 11:11 linh-ngophuochoai

It is also possible to us the ROBOT_TESTS_DIR variable. and point it to a specific test instead of a directory.

-e ROBOT_TESTS_DIR=/my/test/dir/tests/chrometests.robot

patrikwm avatar Sep 28 '23 12:09 patrikwm