Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41421

Add a JMeter test plan generator based on a course contents

XMLWordPrintable

    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • MDL-41421_master
    • Hide

      Pre-requisite: A course without page activities, a course with page activities but without forum activity/ies and a course with page activity/ies and forum activity/ies with discussions and replies. All of them with, at least, 1 enrolled user.

      1. Set your debugging level to developer
      2. Edit config.php and add a new line with $CFG->tool_generator_users_password = 'imatest';
      3. Generate courses
        1. cd /to/your/moodle/dirroot && php admin/tool/generator/cli/maketestsite.php --size="S" --fixeddataset
      4. Browse to admin/tool/generator/maketestplan.php
      5. Test 1
        1. Select size XS
        2. Select the course without page activities
        3. Submit the form
        4. You SHOULD see an error message stating that there are no page activities
      6. Test 2
        1. Select size XS
        2. Select the course with page activities but without forum activities
        3. Submit the form
        4. You SHOULD see an error message stating that there are no forum activities
      7. Test 3
        1. Select size XS
        2. Select the course with page activities and with forum activity/ies
        3. Submit the form
        4. You SHOULD see a couple of links to download the test plan and the users file
      8. Test 4
        1. Download jmeter binaries from https://jmeter.apache.org/download_jmeter.cgi and store them in /opt/apache-jmeter-2.9 with fancy permissions
        2. cd /dir/inside/public/www
        3. git clone https://github.com/moodlehq/moodle-performance-comparison.git moodle-performance-comparison
        4. cd moodle-performance-comparison
        5. Follow https://github.com/moodlehq/moodle-performance-comparison/blob/master/README.md install instructions, filling the webserver_config.properties repository section with:
          1. a new site settings (dataroot, db data, wwwroot...)
          2. repository="git://git.moodle.org/integration.git"
          3. basecommit="d0b63cbde580750e116d2c4b2832eda4ae0db907"
          4. beforebranch="master"
          5. afterbranch="master"
          6. the services and the backup part according to your needs
        6. Follow usage instructions
          1. https://github.com/moodlehq/moodle-performance-comparison/blob/master/README.md#web-and-jmeter-servers-in-the-same-computer-usually-a-development-computer-1
          2. You don't really need to run restart_services.sh as this is not a serious performance comparison test
        7. Browse to http://path/to/moodle-performance-comparison
        8. Consider that this tool is not being tested here, it still has a few issues to solve
        9. You SHOULD see a web interface with a couple of drop down menus
        10. There SHOULD be a couple of options in each drop down
        11. Select a different option in each menu
        12. Press 'Load'
        13. You SHOULD see a few big percent numbers colored in red and green
        14. You SHOULD see the test plan steps in the left side, something like View course or Frontpage not logged
        15. You SHOULD see a few graphs
      9. Test 5
        1. Comment the $CFG->tool_generator_users_password = 'imatest'; line in config.php
        2. Open a CLI and cd /to/your/moodle/dirroot
        3. php admin/tool/generator/cli/maketestplan.php --size="S" --shortname="testcourse_12"
        4. You SHOULD see Error: You need to set $CFG->tool_generator_users_password in config.php to generate the test plan
      Show
      Pre-requisite: A course without page activities, a course with page activities but without forum activity/ies and a course with page activity/ies and forum activity/ies with discussions and replies. All of them with, at least, 1 enrolled user. Set your debugging level to developer Edit config.php and add a new line with $CFG->tool_generator_users_password = 'imatest'; Generate courses cd /to/your/moodle/dirroot && php admin/tool/generator/cli/maketestsite.php --size="S" --fixeddataset Browse to admin/tool/generator/maketestplan.php Test 1 Select size XS Select the course without page activities Submit the form You SHOULD see an error message stating that there are no page activities Test 2 Select size XS Select the course with page activities but without forum activities Submit the form You SHOULD see an error message stating that there are no forum activities Test 3 Select size XS Select the course with page activities and with forum activity/ies Submit the form You SHOULD see a couple of links to download the test plan and the users file Test 4 Download jmeter binaries from https://jmeter.apache.org/download_jmeter.cgi and store them in /opt/apache-jmeter-2.9 with fancy permissions cd /dir/inside/public/www git clone https://github.com/moodlehq/moodle-performance-comparison.git moodle-performance-comparison cd moodle-performance-comparison Follow https://github.com/moodlehq/moodle-performance-comparison/blob/master/README.md install instructions, filling the webserver_config.properties repository section with: a new site settings (dataroot, db data, wwwroot...) repository="git://git.moodle.org/integration.git" basecommit="d0b63cbde580750e116d2c4b2832eda4ae0db907" beforebranch="master" afterbranch="master" the services and the backup part according to your needs Follow usage instructions https://github.com/moodlehq/moodle-performance-comparison/blob/master/README.md#web-and-jmeter-servers-in-the-same-computer-usually-a-development-computer-1 You don't really need to run restart_services.sh as this is not a serious performance comparison test Browse to http://path/to/moodle-performance-comparison Consider that this tool is not being tested here, it still has a few issues to solve You SHOULD see a web interface with a couple of drop down menus There SHOULD be a couple of options in each drop down Select a different option in each menu Press 'Load' You SHOULD see a few big percent numbers colored in red and green You SHOULD see the test plan steps in the left side, something like View course or Frontpage not logged You SHOULD see a few graphs Test 5 Comment the $CFG->tool_generator_users_password = 'imatest'; line in config.php Open a CLI and cd /to/your/moodle/dirroot php admin/tool/generator/cli/maketestplan.php --size="S" --shortname="testcourse_12" You SHOULD see Error: You need to set $CFG->tool_generator_users_password in config.php to generate the test plan

      As described in http://docs.moodle.org/dev/index.php?title=User:David_Monlla%C3%B3_Oliv%C3%A9/Performance-comparison_proposal#How_can_we_code_it.3F could be good to have a script to generate a jmeter test plan (and a csv with the users) so we can compare runs results using different settings or different codebase (different releases or after applying patches)

            dmonllao David Monllaó
            dmonllao David Monllaó
            Sam Hemelryk Sam Hemelryk
            Marina Glancy Marina Glancy
            Damyon Wiese Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.