Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```