[RFC] adding test framework

Open
#725 3 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
8/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, python
Domain
testing

Research direction

This is an RFC proposing a new shared test module, pos_test_framework, with helpers such as open_session(), sale() and close_session(). Read the existing Python tests linked in the issue, tests/test_pos.py in pos_session_closing_stock_error and test_pos_multiple_control.py in pos_multiple_control, to see the repeated setup. Done means a design agreed by maintainers, since the issue has no assignee, no linked pull request, and no reply in about 1552 days.

Written by the indexing model from the issue text.

Description

enhancement no stale

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

Dominant language
HTML
Stars
362
Forks
702
Avg merge
4d 2h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OCA/pos

All issues in OCA/pos

Similar issues

More Testing & QA issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.