Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcgibbons/django-selenium-docker
Example of Django Selenium testing w/ Docker
https://github.com/marcgibbons/django-selenium-docker
django docker pytest pytest-django selenium tests ui
Last synced: 3 months ago
JSON representation
Example of Django Selenium testing w/ Docker
- Host: GitHub
- URL: https://github.com/marcgibbons/django-selenium-docker
- Owner: marcgibbons
- Created: 2017-11-26T16:13:34.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2023-11-06T12:37:09.000Z (about 1 year ago)
- Last Synced: 2024-10-03T12:42:05.474Z (3 months ago)
- Topics: django, docker, pytest, pytest-django, selenium, tests, ui
- Language: Python
- Homepage: https://marcgibbons.com/posts/2023/testing-django-selenium-pytest-docker
- Size: 9.77 KB
- Stars: 31
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example: Django Selenium Tests with Docker
## Requirements
- Docker & Docker compose
## Installation
```bash
docker compose build
```## Start Selenium
```bash
docker compose up -d selenium
```## Connect to browser using noVNC
On your host, open http://localhost:7900 and click "Connect".
## Run tests
```
docker compose run --rm --use-aliases django pytest
```You can interact with the browser using breakpoints.
Example: drop into pdb at the beginning of each test with `--trace`.
```
docker compose run --rm --use-aliases django pytest --trace
```