Smoke tests
A smoke test is a narrow check that a component is present and can load in its prepared test environment. It is not a substitute for functional, security, integration, migration, or performance coverage.
For the current PMIVerse Odoo 18 runner, addon installation happens before pytest collection. A smoke test must therefore assert the prepared state; it must not install, uninstall, or update the addon from inside the test.
Typical safe assertions include:
- the addon is recorded as installed;
- expected models are available in the registry;
- fields extended by the addon are present.
import pytest
pytestmark = [pytest.mark.odoo]
def test_addon_is_installed(env):
addon = env["ir.module.module"].search([("name", "=", "my_addon")], limit=1)
assert addon and addon.state == "installed"
The shared scaffold template is
../../testkit/pytest/templates/test_smoke_installation.py.tmpl.
Runner and fixture navigation is available in the
testing and linting section.