Skip to content

Testing

Bedrock and Springfield run several different types of tests to ensure quality.

Test Frameworks

Framework Purpose When Run
Pytest Python unit tests and redirects PRs and commits to main
Jasmine JavaScript unit tests PRs and commits to main
Playwright Integration tests CI deployment to dev/stage/prod
Axe Accessibility integration tests Daily against dev
Selenium Legacy IE11 smoke tests CI pipeline

Browser Automation

Jasmine, Playwright and Selenium all require a browser to run. To automate browsers such as Firefox and Chrome, you may need to have the appropriate drivers installed.

geckodriver (Firefox)

Download geckodriver and add it to your system path:

mv geckodriver /usr/local/bin/

Or on macOS with Homebrew:

brew install geckodriver

chromedriver (Chrome)

Download chromedriver and add it to your system path:

mv chromedriver /usr/local/bin/

Or on macOS with Homebrew:

brew install chromedriver

Where to Find Test Files

  • ./bedrock/*/tests/ or ./springfield/*/tests/ - Pytest (Python unit tests)
  • ./tests/redirects/ - Pytest (redirect tests)
  • ./tests/unit/ - Jasmine tests
  • ./tests/playwright/ - Playwright tests
  • ./tests/playwright/specs/a11y/ - Axe tests
  • ./tests/functional/ - Selenium tests

Note

New integration tests should be written using Playwright.