Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to select the tests when running the docker container #374

Open
d-saravanan opened this issue Sep 15, 2021 · 3 comments
Open

Not able to select the tests when running the docker container #374

d-saravanan opened this issue Sep 15, 2021 · 3 comments

Comments

@d-saravanan
Copy link

d-saravanan commented Sep 15, 2021

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

@awasall
Copy link

awasall commented Sep 17, 2021

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

@linh-ngophuochoai
Copy link
Contributor

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

@patrikwm
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants