Skip to content
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

[IMP] New parameter 'tags' to enable filtering tests according to tags. #471

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

celm1990
Copy link
Contributor

When tags are specified, the module_list is ignored because Odoo executes tests with an OR condition, meaning all tests will be executed. See examples below.

Execute only test with tags MyTag
invoke test -m MyModule --tags=MyTag

Execute only a function called test_my_custom(Note use . to referral to function)
invoke test -m MyModule --tags=.test_my_custom

More examples
https://www.odoo.com/documentation/17.0/es/developer/reference/backend/testing.html#examples

TODO:

  • add test

@pedrobaeza could you take a look, what do you think?

@pedrobaeza
Copy link
Member

@josep-tecnativa can you check why the red CI?

When tags are specified, the `module_list` is ignored because Odoo executes tests with an OR condition, meaning all tests will be executed. See examples below.

Execute only test with tags `MyTag`
`invoke test -m MyModule --tags=MyTag`

Execute only a function called test_my_custom(Note use . to referral to function)
`invoke test -m MyModule --tags=.test_my_custom`

More examples
https://www.odoo.com/documentation/17.0/es/developer/reference/backend/testing.html#examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants