Run pytest on a selenium grid


I’m trying to set up a gitlab-ci.yml file to run pytest_bdd script in a selenium hub. That’s what I got :


  • Test

Selenium Test:

stage: Test

image: python


- pip install pytest

- pip install pytest_bdd

- pip install selenium

- docker-compose up -d

- python -m pytest tests/step_defs/ --html=report.html

It works on my machine but i don’t know why I have an error on the docker compose command.


It is difficult to assist without further data. If docker-compose up -d is failing on the runner, can you share the specific error it produces?

If you’re using the docker executor, see for instructions on how to use docker-compose through docker-in-docker configuration.