How dkishordev/pytest-juice-shop works
This repository is a pytest/Playwright automation framework for testing OWASP Juice Shop across UI, API, database, security, and integration layers. A typical flow uses shared fixtures to create test users and clients, drives the application through page objects or API calls, and checks application state through a read-only SQLite helper. The README also documents cross-layer checks, SQL-injection coverage, and a Dockerised target. Test and integration relationships are based on README descriptions; unsampled test implementations are not inspected.
Main entry points: base_page.py Base page · conftest.py Shared fixtures · api_client.py API client · database.py Database helper
Components 20
Shared runtime
- Shared fixtures
conftest.py - Test settings
config/settings.py - Test helpers
utils/helpers.py
Browser testing
- UI tests
tests/ui - Base page
pages/base_page.py - Home page
pages/home_page.py - Login page
pages/login_page.py - Registration page
pages/register_page.py - Basket page
pages/basket_page.py - Product page
pages/product_page.py - Contact page
pages/contact_page.py
API testing
- API tests
tests/api - API client
api/api_client.py
State and security checks
- Cross-layer tests
tests/integration - Database tests
tests/db - Database helper
db/database.py - Juice Shop SQLite
data/juiceshop.sqlite - Security tests
tests/security
Other components
- Test run
- Juice Shop
Connections 27
- Test run → Shared fixtures: starts fixtures
conftest.py - Shared fixtures → Test settings: reads settings
conftest.py - Shared fixtures → API client: creates client
conftest.py - Shared fixtures → Database helper: creates helper
conftest.py - Shared fixtures → Test helpers: generates users
conftest.py - Shared fixtures → Login page: logs in browser
conftest.py - Shared fixtures → Juice Shop: opens browser context
- UI tests → Base page: uses page objects
README.md - Base page → Test settings: reads URL
pages/base_page.py - Home page → Base page: inherits from
pages/home_page.py - Login page → Base page: inherits from
pages/login_page.py - Registration page → Base page: inherits from
pages/register_page.py - Basket page → Base page: inherits from
pages/basket_page.py - Product page → Base page: inherits from
pages/product_page.py - Contact page → Base page: inherits from
pages/contact_page.py - Contact page → Test helpers: uses CAPTCHA helper
pages/contact_page.py - Base page → Juice Shop: drives browser
README.md - API tests → API client: uses client
README.md - API client → Test settings: reads API URL
api/api_client.py - API client → Juice Shop: sends requests
README.md - Database tests → Database helper: checks state
README.md - Database helper → Test settings: reads DB path
db/database.py - Database helper → Juice Shop SQLite: queries read-only
README.md - Cross-layer tests → UI tests: combines UI checks
README.md - Cross-layer tests → API tests: combines API checks
README.md - Cross-layer tests → Database tests: verifies DB state
README.md - Security tests → Juice Shop: tests injection
README.md