Guidelines for running and writing tests in this project.
Before running tests, always ask the user which site to use.
Use the following command format (note: --site goes before run-tests, not after):
bench --site <site> run-tests --app press --module press.press.doctype.site_update.test_site_updateTo run a single test:
bench --site <site> run-tests --app press --module press.press.doctype.site_update.test_site_update --test test_specific_thingIf the test site does not have all the doctypes, migrate it first. Use --skip-failing so that unrelated errors do not block the migration:
bench --site <site> migrate --skip-failingRead docs/code/testing to learn how to write tests for this project. The Frappe testing docs give the framework-level reference.
See guide-to-ui-testing.md for setup and conventions.
Quick reference — run from dashboard/:
# Headed (opens browser)
yarn test:e2e:headed
# Single file
npx playwright test tests-e2e/tests/dashboard/site-update-banner.test.ts --headedRequires a running bench (bench start) and dashboard/tests-e2e/.env with credentials.