In test_mail there are performance tests involving several followers and give
counters for some heavy real-life-like use cases. Purpose of this commit is to
have more basic performance tests for main mail features, like simple post,
simple subscription of one follower. It allows to have an idea of the basic
cost of various features.
Adding use cases for message_post includes
* posting without followers (aka, no notification)
* posting with a ping (by email or by inbox)
* logging a note with optimized method _message_log or with message_post
Adding use cases for activities includes setting an activity as done. This
action posts a message and is therefore interesting to evaluate.
Adding use cases for subscription includes
* adding and re-adding one follower, with default or specified subtypes
* updating responsible field triggering a simple tracking and an assignation
email or notification (not completely supported in saas 11.2 meaning this
counter will increase when forward-ported)
* note that some subscription tests have already been added at a01933c9b4
Finally some heavier tests are added for assignation and tracking based
on QWeb view.
This commit is related to task ID 1824965 . This one is an ongoing task
and several commits may be linked to that task.
Creating data directly in tests was done when tests were located in mail
module to avoid creating real data or demo. Now that mail tests have their
own module we can create demo data and use them in tests. It is simpler to
have demo data for things like subtype and email templates to ease
understanding and reuse.
Test performance will now hold the base class for performance tests as
well as tests related to the ORM, depending only on base. A new module
test_mail is introduced at this commit that contains performance tests
related to mail module. This commit contains only code move and should
not impact anything.
Future commits will move mail tests into test_mail so that all mail
related tests are located in the same optional module. This allows
notably to avoid creating a lot of unnecessary tables when installing
mail module on production databases.