pos
pos copied to clipboard
[RFC] adding test framework
Hi all,
Is your feature request related to a problem?
we regurlarly needs to makes python test, regarding PoS. for exemple, https://github.com/OCA/pos/blob/12.0/pos_session_closing_stock_error/tests/test_pos.py by @ivantodorovich, https://github.com/OCA/pos/blob/12.0/pos_multiple_control/tests/test_pos_multiple_control.py#L10 by @quentinDupont and Me. The test are very verbose. It requires lot of lines of code, just to open a session, make a sale, add payment, etc... and it's quite a mess.
Describe the solution you'd like
Add a module pos_test_framework
, that could provide test function like def open_session()
, def sale(product=False, qty=False)
, def close_session()
, etc... and make new modules, in V15 depends on that module.
We could also provide helper also for js scripts.
Thanks for your point of view.
CC : @OCA/pos-maintainers
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
It may make sense for older odoo versions, but testing the pos is getting easier and easier.
For >= 15.0
is actually pretty straightforward IMO.
It may make sense for older odoo versions, but testing the pos is getting easier and easier.
You're right. seems that there is PoS Test framework in new version, so maybe it's obsolete. I'll develop some module for V16. I'll think if it's interesting to have extra OCA framework, or not.
thanks.
Note : could you take a look on #811 ?