Friday, July 11, 2025
1 change · 17.0
Enhancements to existing features
Odoo's internal test system can now automatically label certain tests based on what they do, such as website tours or database query checks. This helps teams run and monitor the right tests more reliably, with no direct impact on end users.
Original PR description
This commit add the possibility to automatically add test-tag on a test method at runtime. A generic method `get_method_additional_tags` is added on `BaseCase` test class. That method can be overridden to return a list of test-tags that will be added on the test methods. With this mechanism, the `HttpCase` class override this method to add a `is_tour` test-tag when the `start_tour` method is used in the test method. Also, the `start_tour` method will now emit a warning when the method is called without being tagged `is_tour`. That way, all the tours can now be started with the `is_tour` test-tag. Forward-Port-Of: odoo/odoo#212315