docker-robot-framework
docker-robot-framework copied to clipboard
Not able to select the tests when running the docker container
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:
- git clone
- docker build
- run the docker container
- See error
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
Hello is your folder where the tests are located called test? .
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
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