All Projects → camptocamp → pytest-odoo

camptocamp / pytest-odoo

Licence: AGPL-3.0 License
pytest plugin to run Odoo tests

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pytest-odoo

anthem
make your odoo scripts sing
Stars: ✭ 19 (-58.7%)
Mutual labels:  business, odoo-tooling
RevBusinessCardGen
Easily Generate And Save Revolut Business Cards
Stars: ✭ 32 (-30.43%)
Mutual labels:  business
wtm-udacity-scholars-nanodegree-resources
A List of Resources for Udacity Nanodegrees
Stars: ✭ 15 (-67.39%)
Mutual labels:  business
corebos
core Business Operating System. An OPEN SOURCE business application that helps small and medium business handle all the day to day tasks.
Stars: ✭ 128 (+178.26%)
Mutual labels:  business
Airspace-Bootstrap-Agency-Template
Airspace is a clean, unique, and free Bootstrap website template.
Stars: ✭ 43 (-6.52%)
Mutual labels:  business
finance-news-aggregator
A news aggregator in python, that focuses primarily on business and market news sources.
Stars: ✭ 59 (+28.26%)
Mutual labels:  business
odooly
Python library and CLI to interact with Odoo and OpenERP.
Stars: ✭ 53 (+15.22%)
Mutual labels:  odoo-tooling
jdg
Гайд-путеводитель по JDG (ИП) в Польше
Stars: ✭ 84 (+82.61%)
Mutual labels:  business
open-hours
⏰ Hours of operation
Stars: ✭ 20 (-56.52%)
Mutual labels:  business
open-expenses
A curated list of (private) businesses publicly sharing their expenses.
Stars: ✭ 46 (+0%)
Mutual labels:  business
bloc
A predictable state management library that helps implement the BLoC design pattern
Stars: ✭ 12 (-73.91%)
Mutual labels:  business
crump
A parser for the Virginia State Corporation Commission's business registration records.
Stars: ✭ 18 (-60.87%)
Mutual labels:  business
fortune500
Fortune 500 company lists since 1955 in CSV format, mostly parsed using Beautiful Soup
Stars: ✭ 78 (+69.57%)
Mutual labels:  business
gadael
nodejs leaves management application
Stars: ✭ 52 (+13.04%)
Mutual labels:  business
docker-odoo-project
Base images for Odoo projects
Stars: ✭ 118 (+156.52%)
Mutual labels:  business
server-monitor-ui
Server Operation Monitor
Stars: ✭ 17 (-63.04%)
Mutual labels:  business
PT-Tracking
Aplicação para registo e acompanhamento de encomendas da CTT Expresso, automatiza a consulta online do estado de tracking para várias remessas e mantém um registo dos pagamentos referentes aos envios à cobrança. As remessas que requerem atenção, devido a atrasos na entrega ou na receção do pagamento correspondente, bem como os cheques cuja data …
Stars: ✭ 18 (-60.87%)
Mutual labels:  business
onex-utils
Web business development general tool library 通用业务工具库 🥷
Stars: ✭ 23 (-50%)
Mutual labels:  business
WorkGroup
Self-Hosted private Social Media-Intranet for Companies.
Stars: ✭ 21 (-54.35%)
Mutual labels:  business
vtiger
🐯 Vtiger is the #1 business automation software. Try it with Docker!
Stars: ✭ 59 (+28.26%)
Mutual labels:  business

pytest-odoo

pytest plugin to run Odoo tests

This lib allows to run the tests built in Odoo addons which are using Python's unittest, but with the comfort of the pytest CLI. Also allowing to run tests without updating given module.

Odoo's --test-enable machinery and pytest-odoo do not cover exactly the same scope. The Odoo's test runner runs the tests during the upgrades of the addons, that's why they need the "at install" and "post install" markers.

Running tests during upgrades of addons is waaay too slow to work efficiently in a TDD mode, that's where pytest-odoo shines. Consider that all the tests are running post-install with pytest-odoo, as you must run the upgrade of the addon before (but only when needed vs each run).

At the end of the day, its beneficial to run the Odoo tests with --test-enable because, as in very rare conditions, a test can pass with pytest-odoo but not with the "at install" tests run during the upgrade (or the oposite). Pytest-odoo can be considered a development tool, but not the tool that should replace entirely --test-enable in a CI.

See also the official Odoo documentation on writing tests.

Usage

install via:

pip install pytest-odoo

usage:

pytest -s --odoo-database=test --odoo-log-level=debug_sql

The custom options are:

  • --odoo-database: name of the database to test.
  • --odoo-log-level: log level as expected by odoo. As time of writing: info, debug_rpc, warn, test, critical, debug_sql, error, debug, debug_rpc_answer. The default is critical to have a clean output.
  • --odoo-config: path of the odoo.cfg file to use.

Alternatively, you can use the OPENERP_SERVER environment variable using an odoo configuration file, containing at least the database option with the name of the database to test:

export OPENERP_SERVER=/path/to/odoo/config.cfg
pytest ...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].