- 21 Jun 2022
- 3 Minutes to read
- Updated on 21 Jun 2022
- 3 Minutes to read
You might also find our public developer documentation helpful, as it contains a number of useful guides and resources for developers.
Below you can find explanations about what each of these tools do (except for experimental features and debugging, as these are slightly more complex and therefore have their own dedicated pages).
Web service test client
The web service test client executes the functions for real, so you should not test functions that you don't know.
All existing web service functions are not yet implemented into the test client. In order to check that a user cannot access some functions, you can test some functions that you didn't allow. To see clearer error messages set the debugging to NORMAL: Show errors, warnings and notices in Debug messages.
Purge all caches
Purge all caches can be accessed via the Administration block within Quick-access menu > Development > Purge all caches.
Make test course
This tool creates standard test courses that include many sections, activities, and files. This is intended to provide a standardised measure for checking the reliability and performance of various system components (such as backup and restore).
This test is important because there have been many cases previously where, faced with real-life use cases (e.g. a course with 1,000 activities), the system does not work. Courses created using this feature can occupy a large amount of database and file system space (tens of gigabytes). You will need to delete the courses (and wait for various cleanup runs) to release this space again.
Make JMeter test plan
This tool creates a JMeter test plan file along with the user credentials file.
This test plan is designed to work along with https://github.com/moodlehq/moodle-performance-comparison, which makes it easier to run the test plan in a specific Totara environment, gathers information about the runs, and compares the results. You will need to download it and use its test_runner.sh script or follow the installation and usage instructions.
You need to set a password for the course users in config.php (e.g. $CFG->tool_generator_users_password = 'totara';). There is no default value for this password to prevent unintended usage of the tool. You need to use the update passwords option in case your course users have other passwords, or they were generated by tool_generator but without setting a $CFG->tool_generator_users_password value.
It is part of tool_generator so it works well with the courses generated by the courses and the site generators, it can also be used with any course that contains, at least:
- Enough enrolled users (depends on the test plan size you select) with the password reset to 'totara'
- A page module instance
- A forum module instance with at least one discussion and one reply
You might want to consider your server's capacity when running large test plans, as the amount to load generated by JMeter can be especially big. The ramp up period has been adjusted according to the number of threads (users) to reduce this kind of issue, but the load is still huge.
Other development tools
There is also a range of other tools for developers to utilise including:
- Third-party libraries
- Acceptance testing
- PHPUnit tests
- Template library
- XMLDB editor
- Web API
© Copyright 2022 Totara Learning Solutions. All rights reserved. Some content originally obtained via GPLv3 license and continues to be available under GPLv3. All other content is the sole copyright of Totara Learning Solutions.