Testing
Run tests
Run Python unit tests for your Frappe application.--app- Run tests for specific app--doctype- Run tests for specific DocType--module- Run tests in a module--module-def- Run tests for all DocTypes in a Module--test- Run specific test (can be used multiple times)--case- Select particular TestCase--doctype-list-path- Path to .txt file with list of DocTypes--profile- Profile test execution--coverage- Generate coverage report--failfast- Stop on first error or failure--skip-before-tests- Skip before_tests hook--junit-xml-output- Path for JUnit XML report--test-category- Test category:unit,integration, orall(default:all)--lightmode- Skip full test environment setup--debug- Attach to pdb on breakpoint or exception
Run parallel tests
Run tests in parallel for faster execution.--app- App to test (default:frappe)--build-number- Build number for splitting tests (default: 1)--total-builds- Total number of builds (default: 1)--with-coverage- Generate coverage report--use-orchestrator- Use orchestrator for test distribution--dry-run- Show tests without running them--lightmode- Skip full test setup--failfast- Exit on first failure
Run UI tests
Run Cypress UI tests.--headless- Run in headless mode--parallel- Run tests in parallel--with-coverage- Generate coverage report--browser- Browser to use (default:chrome)--spec- Specific spec file to run--ci-build-id- CI build ID for parallel runs
Scheduler and background jobs
Enable scheduler
Enable the background job scheduler.Disable scheduler
Disable the background job scheduler.Scheduler control
Control scheduler state with more options.enable- Enable the schedulerdisable- Disable the schedulerpause- Pause the scheduler temporarilyresume- Resume paused schedulerstatus- Check scheduler status
--format, -f- Output format:jsonortext(default:text)--verbose, -v- Verbose output
Trigger scheduler event
Manually trigger a specific scheduler event.Start scheduler process
Start the scheduler background process.Start worker
Start a background worker process.--queue- Specific queue(s) to consume (comma-separated)--quiet- Hide log outputs-u, --rq-username- Redis ACL username-p, --rq-password- Redis ACL password--burst- Run in burst mode (exit when queue is empty)--strategy- Dequeuing strategy:round_robinorrandom
Start worker pool
Start a pool of background workers.--queue- Queue(s) to consume--num-workers- Number of workers to spawn (default: 2)--quiet- Hide log outputs--burst- Run in burst mode
Show pending jobs
View pending background jobs.Purge jobs
Purge pending background jobs.--site- Site name--queue- Specific queue:low,default, orhigh--event- Specific event:all,weekly,monthly,hourly,daily,weekly_long,daily_long
Doctor
Get diagnostic information about background workers and jobs.--site- Site name
Ready for migration
Check if a site is ready for migration (no pending jobs).Maintenance mode
Put a site in or out of maintenance mode.on- Enable maintenance modeoff- Disable maintenance mode
Permissions and search
Reset permissions
Reset permissions for all DocTypes.Rebuild global search
Rebuild the global search index.--static-pages- Rebuild for static pages instead of DocTypes
Build search index
Rebuild website search index.Translation commands
Build message files
Build translation message files.New language
Create a new language translation file.Get untranslated strings
Extract untranslated strings for a language.--app- Specific app (default: all apps)--all- Get all message strings
Update translations
Update translation files with translated strings.--app- Specific app (default: all apps)