-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's missing for feature parity with standard Odoo testing machinery? #67
Comments
Not so nice mention ;-) Regarding ignoring the warning, we have some safeguards in place to deal with the issues. And tests run with pytest-odoo are as stable as the tests on Odoo runbot / the default odoo tests. I feel the issues caused by not so fine demo data in Odoo are much worse than the issues caused by pytest-odoo. Our way of running the tests without pytest-odoo (that are also needed if running tests before the post_install "fixes")
The second step can be easily replaced with pytest-odoo. And pytest-odoo enables us to select a test_something.py in the PyCharm IDE and select "run tests" from the context menu (with some adaptions to the args needed/done by script when using doodba). And also we can now finely tune which tests to run in a PR/MR based on the changed files. Most issues i had with pytest-odoo where because of the tests written for Odoo not being compatible with pytest (and not with pytest-odoo):
|
Sorry I didn't mean to be rude 😅 Thanks a lot for your comments.
Well, in my case I wouldn't run tests like that. Tests tagged IIUC you're treating all tests as if they were I prefer to do all in one shot:
That will install all the dependencies and run all I wish there were some way to do that with pytest-odoo, but in reality all I need for it is the junit reports, so maybe https://github.com/orgs/OCA/discussions/167 is a better alternative. |
I'd like to add that I find that browser based tests won't run when running with the |
aaand just as I write this, I find that passing |
This is more a question than an issue, but it could become a feature request if feature parity is feasible.
AFAICS pytest-odoo had a gap to bridge years ago: running tests without installing or updating addons:
pytest-odoo/README.rst
Lines 7 to 13 in 9315331
Those sentences are no longer true. You can achieve the same with pure Odoo:
--test-file ./addon/tests/test_this.py
and it won't install or update, only test.--test-tags .test_name
and only the test with that name will run.So, we could say that the main goal of pytest-odoo is no longer an issue.
However, it still has the benefits of having the whole pytest ecosystem:
I pushed odoo/odoo#151728 some time ago to address these issues directly in Odoo, but it's clearly doomed for oblivion. So I'd be more than happy to entirely replace odoo testing machinery with pytest-odoo. But then...
pytest-odoo/README.rst
Line 17 in 9315331
Sadness.
People out there seem to ignore this warning. I'd like to ignore it too if possible. But I love my CI too much to feed it with unhealthy food.
So... what's missing to be able to remove that warning from the README? What's exactly the difference between pytest-odoo and
odoo --test-enable
that makes it not suitable for CI workloads?IIUC these 2 points:
Is it possible to reach feature parity and then reliably use pytest-odoo on CI workloads, entirely replacing (or wrapping) odoo?
Thanks!
@moduon MT-1075
The text was updated successfully, but these errors were encountered: