-
Improvement
-
Resolution: Fixed
-
Major
-
2.5.4, 2.6, 2.7
-
MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
-
MOODLE_26_STABLE
-
MDL-43837_master -
Behat and fast seems opposite words, we should run steps as fast as possible but on the other hand we should keep compatibility with slow servers where loading a page + all JS & CSS dependencies requires more than behat_base::TIMEOUT.
There are many places where we can and should improve the performance of the suite, most of the time the issue is the same, we should be sure that all the elements are there, places where some work can be done:
- I should not see "ASD" is waiting until behat_base::TIMEOUT expires!! Last week I counted 284 appearances of the step in the code base; 6 seconds * 284 calls = 1704 seconds = 28.4 minutes!! An option would be to create a new constant for I should not see steps and reduce it's value to a couple of seconds
- We look for the link to expand all fieldsets when we fill any form (not any field though) I'm not 100% sure, but we should be able to use a reduced timeout here also
The most important point here would be to detect the bootlenecks, counting the time elapsed in each step (before and after hooks with microtime on each) and see which steps are requiring more time, checking if it makes sense or not that that much time is spend there.