Skip to content

Quality and tests

Lint addon sources

codoo lint python --addons "*" --report-dir qa-python
codoo lint python --addons helpdesk_tools --open-report
codoo lint xml --addons "*"
codoo lint js --addons "helpdesk_tools,portal_tools"

Python linting uses flake8 and flake8-html. JavaScript linting uses the runtime/checker expected by the project. Codoo reports a command error when a required executable is unavailable.

Generate tests

codoo tests python --name "Service Request Case" \
  --type TransactionCase --addons helpdesk_tools \
  --test-case '{"name":"test_create_request","summary":"A request can be created"}'

codoo tests js --name "Request UI" --addons helpdesk_tools \
  --test-case '{"name":"test_request_form","summary":"The form renders"}'

codoo tests tour --name "Request Onboarding" --url /web \
  --addons helpdesk_tools \
  --step '{"trigger":".o_app","content":"Open Helpdesk","position":"top"}'

These generators also accept --from-json FILE.

Run Odoo tests

codoo tests up --addons helpdesk_tools
codoo tests up --addons "helpdesk_tools,portal_tools"
codoo tests up --addons "*"

Codoo prepares a missing local test environment by default. Pass --no-auto-init to fail when it is not ready.