Merge branch 'MDL-41913_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE
This commit is contained in:
@@ -113,6 +113,15 @@ class tool_generator_course_backend extends tool_generator_backend {
|
||||
parent::__construct($size, $fixeddataset, $progress);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relation between users and course sizes.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_users_per_size() {
|
||||
return self::$paramusers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of size choices supported by this backend.
|
||||
*
|
||||
@@ -282,6 +291,8 @@ class tool_generator_course_backend extends tool_generator_backend {
|
||||
* @param int $last Number of last user
|
||||
*/
|
||||
private function create_user_accounts($first, $last) {
|
||||
global $CFG;
|
||||
|
||||
$this->log('createaccounts', (object)array('from' => $first, 'to' => $last), true);
|
||||
$count = $last - $first + 1;
|
||||
$done = 0;
|
||||
@@ -296,6 +307,12 @@ class tool_generator_course_backend extends tool_generator_backend {
|
||||
// Create user account.
|
||||
$record = array('firstname' => get_string('firstname', 'tool_generator'),
|
||||
'lastname' => $number, 'username' => $username);
|
||||
|
||||
// We add a user password if it has been specified.
|
||||
if (!empty($CFG->tool_generator_users_password)) {
|
||||
$record['password'] = $CFG->tool_generator_users_password;
|
||||
}
|
||||
|
||||
$user = $this->generator->create_user($record);
|
||||
$this->userids[$number] = (int)$user->id;
|
||||
$this->dot($done, $count);
|
||||
@@ -313,7 +330,7 @@ class tool_generator_course_backend extends tool_generator_backend {
|
||||
// Create pages.
|
||||
$number = self::$parampages[$this->size];
|
||||
$this->log('createpages', $number, true);
|
||||
for ($i=0; $i<$number; $i++) {
|
||||
for ($i = 0; $i < $number; $i++) {
|
||||
$record = array('course' => $this->course->id);
|
||||
$options = array('section' => $this->get_target_section());
|
||||
$pagegenerator->create_instance($record, $options);
|
||||
@@ -370,7 +387,7 @@ class tool_generator_course_backend extends tool_generator_backend {
|
||||
return substr($data, -$length);
|
||||
}
|
||||
$length -= strlen($data);
|
||||
for ($j=0; $j < $length; $j++) {
|
||||
for ($j = 0; $j < $length; $j++) {
|
||||
$data .= chr(rand(1, 255));
|
||||
}
|
||||
return $data;
|
||||
@@ -448,13 +465,13 @@ class tool_generator_course_backend extends tool_generator_backend {
|
||||
|
||||
// Add discussions and posts.
|
||||
$sofar = 0;
|
||||
for ($i=0; $i < $discussions; $i++) {
|
||||
for ($i = 0; $i < $discussions; $i++) {
|
||||
$record = array('forum' => $forum->id, 'course' => $this->course->id,
|
||||
'userid' => $this->get_target_user());
|
||||
$discussion = $forumgenerator->create_discussion($record);
|
||||
$parentid = $DB->get_field('forum_posts', 'id', array('discussion' => $discussion->id), MUST_EXIST);
|
||||
$sofar++;
|
||||
for ($j=0; $j < $posts - 1; $j++, $sofar++) {
|
||||
for ($j = 0; $j < $posts - 1; $j++, $sofar++) {
|
||||
$record = array('discussion' => $discussion->id,
|
||||
'userid' => $this->get_target_user(), 'parent' => $parentid);
|
||||
$forumgenerator->create_post($record);
|
||||
|
||||
+22
-2
@@ -14,6 +14,14 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Course form.
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright 2013 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->libdir . '/formslib.php');
|
||||
@@ -26,8 +34,13 @@ require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/course
|
||||
* @copyright 2013 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class tool_generator_make_form extends moodleform {
|
||||
class tool_generator_make_course_form extends moodleform {
|
||||
|
||||
/**
|
||||
* Course generation tool form definition.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function definition() {
|
||||
$mform = $this->_form;
|
||||
|
||||
@@ -42,6 +55,13 @@ class tool_generator_make_form extends moodleform {
|
||||
$mform->addElement('submit', 'submit', get_string('createcourse', 'tool_generator'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Form validation.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $files
|
||||
* @return void
|
||||
*/
|
||||
public function validation($data, $files) {
|
||||
global $DB;
|
||||
$errors = array();
|
||||
@@ -49,7 +69,7 @@ class tool_generator_make_form extends moodleform {
|
||||
// Check course doesn't already exist.
|
||||
if (!empty($data['shortname'])) {
|
||||
// Check shortname.
|
||||
$error = tool_generator_course_backend::check_shortname_available($data['shortname']);
|
||||
$error = tool_generator_course_backend::check_shortname_available($data['shortname']);
|
||||
if ($error) {
|
||||
$errors['shortname'] = $error;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Test plan form.
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright 2013 David Monllaó
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->libdir . '/formslib.php');
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/testplan_backend.php');
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/course_backend.php');
|
||||
|
||||
/**
|
||||
* Form with options for creating large course.
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright 2013 David Monllaó
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class tool_generator_make_testplan_form extends moodleform {
|
||||
|
||||
/**
|
||||
* Test plan form definition.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function definition() {
|
||||
$mform = $this->_form;
|
||||
|
||||
$mform->addElement('select', 'size', get_string('size', 'tool_generator'),
|
||||
tool_generator_testplan_backend::get_size_choices());
|
||||
$mform->setDefault('size', tool_generator_testplan_backend::DEFAULT_SIZE);
|
||||
|
||||
$mform->addElement('select', 'courseid', get_string('targetcourse', 'tool_generator'),
|
||||
tool_generator_testplan_backend::get_course_options());
|
||||
|
||||
$mform->addElement('advcheckbox', 'updateuserspassword', get_string('updateuserspassword', 'tool_generator'));
|
||||
$mform->addHelpButton('updateuserspassword', 'updateuserspassword', 'tool_generator');
|
||||
|
||||
$mform->addElement('submit', 'submit', get_string('createtestplan', 'tool_generator'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the submitted data allows us to create a test plan.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $files
|
||||
* @return array An array of errors
|
||||
*/
|
||||
public function validation($data, $files) {
|
||||
global $CFG;
|
||||
|
||||
$errors = array();
|
||||
if (empty($CFG->tool_generator_users_password) || is_bool($CFG->tool_generator_users_password)) {
|
||||
$errors['updateuserspassword'] = get_string('error_nouserspassword', 'tool_generator');
|
||||
}
|
||||
|
||||
// Better to repeat here the query than to do it afterwards and end up with an exception.
|
||||
if ($courseerrors = tool_generator_testplan_backend::has_selected_course_any_problem($data['courseid'], $data['size'])) {
|
||||
$errors = array_merge($errors, $courseerrors);
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Test plan generator.
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright 2013 David Monllaó
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once(__DIR__ . '/backend.php');
|
||||
require_once(__DIR__ . '/course_backend.php');
|
||||
|
||||
/**
|
||||
* Generates the files required by JMeter.
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright 2013 David Monllaó
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class tool_generator_testplan_backend extends tool_generator_backend {
|
||||
|
||||
/**
|
||||
* @var The URL to the repository of the external project.
|
||||
*/
|
||||
protected static $repourl = 'https://github.com/moodlehq/moodle-performance-comparison';
|
||||
|
||||
/**
|
||||
* @var Number of users depending on the selected size.
|
||||
*/
|
||||
protected static $users = array(1, 30, 200, 1000, 5000, 10000);
|
||||
|
||||
/**
|
||||
* @var Number of loops depending on the selected size.
|
||||
*/
|
||||
protected static $loops = array(1, 1, 2, 3, 3, 5);
|
||||
|
||||
/**
|
||||
* @var Rampup period depending on the selected size.
|
||||
*/
|
||||
protected static $rampups = array(1, 6, 40, 100, 500, 800);
|
||||
|
||||
/**
|
||||
* Gets a list of size choices supported by this backend.
|
||||
*
|
||||
* @return array List of size (int) => text description for display
|
||||
*/
|
||||
public static function get_size_choices() {
|
||||
|
||||
$options = array();
|
||||
for ($size = self::MIN_SIZE; $size <= self::MAX_SIZE; $size++) {
|
||||
$a = new stdClass();
|
||||
$a->users = self::$users[$size];
|
||||
$a->loops = self::$loops[$size];
|
||||
$a->rampup = self::$rampups[$size];
|
||||
$options[$size] = get_string('testplansize_' . $size, 'tool_generator', $a);
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the list of courses that can be used used to generate a test.
|
||||
*
|
||||
* @return array The list of options as courseid => name
|
||||
*/
|
||||
public static function get_course_options() {
|
||||
$courses = get_courses('all', 'c.sortorder ASC', 'c.id, c.shortname, c.fullname');
|
||||
if (!$courses) {
|
||||
print_error('error_nocourses', 'tool_generator');
|
||||
}
|
||||
|
||||
$options = array();
|
||||
unset($courses[1]);
|
||||
foreach ($courses as $course) {
|
||||
$options[$course->id] = $course->fullname . '(' . $course->shortname . ')';
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for moodle-performance-comparison project URL.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_repourl() {
|
||||
return self::$repourl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the test plan file.
|
||||
*
|
||||
* @param int $courseid The target course id
|
||||
* @param int $size The test plan size
|
||||
* @return stored_file
|
||||
*/
|
||||
public static function create_testplan_file($courseid, $size) {
|
||||
$jmxcontents = self::generate_test_plan($courseid, $size);
|
||||
|
||||
$fs = get_file_storage();
|
||||
$filerecord = self::get_file_record('testplan', 'jmx');
|
||||
return $fs->create_file_from_string($filerecord, $jmxcontents);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the users data file.
|
||||
*
|
||||
* @param int $courseid The target course id
|
||||
* @param bool $updateuserspassword Updates the course users password to $CFG->tool_generator_users_password
|
||||
* @return stored_file
|
||||
*/
|
||||
public static function create_users_file($courseid, $updateuserspassword) {
|
||||
$csvcontents = self::generate_users_file($courseid, $updateuserspassword);
|
||||
|
||||
$fs = get_file_storage();
|
||||
$filerecord = self::get_file_record('users', 'csv');
|
||||
return $fs->create_file_from_string($filerecord, $csvcontents);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the test plan according to the target course contents.
|
||||
*
|
||||
* @param int $targetcourseid The target course id
|
||||
* @param int $size The test plan size
|
||||
* @return string The test plan as a string
|
||||
*/
|
||||
protected static function generate_test_plan($targetcourseid, $size) {
|
||||
global $CFG;
|
||||
|
||||
// Getting the template.
|
||||
$template = file_get_contents(__DIR__ . '/../testplan.template.jmx');
|
||||
|
||||
// Getting the course modules data.
|
||||
$coursedata = self::get_course_test_data($targetcourseid);
|
||||
|
||||
// Host and path to the site.
|
||||
$urlcomponents = parse_url($CFG->wwwroot);
|
||||
if (empty($urlcomponents['path'])) {
|
||||
$urlcomponents['path'] = '';
|
||||
}
|
||||
|
||||
$replacements = array(
|
||||
self::$users[$size],
|
||||
self::$loops[$size],
|
||||
self::$rampups[$size],
|
||||
$urlcomponents['host'],
|
||||
$urlcomponents['path'],
|
||||
get_string('shortsize_' . $size, 'tool_generator'),
|
||||
$targetcourseid,
|
||||
$coursedata->pageid,
|
||||
$coursedata->forumid,
|
||||
$coursedata->forumdiscussionid,
|
||||
$coursedata->forumreplyid
|
||||
);
|
||||
|
||||
$placeholders = array(
|
||||
'{{USERS_PLACEHOLDER}}',
|
||||
'{{LOOPS_PLACEHOLDER}}',
|
||||
'{{RAMPUP_PLACEHOLDER}}',
|
||||
'{{HOST_PLACEHOLDER}}',
|
||||
'{{SITEPATH_PLACEHOLDER}}',
|
||||
'{{SIZE_PLACEHOLDER}}',
|
||||
'{{COURSEID_PLACEHOLDER}}',
|
||||
'{{PAGEACTIVITYID_PLACEHOLDER}}',
|
||||
'{{FORUMACTIVITYID_PLACEHOLDER}}',
|
||||
'{{FORUMDISCUSSIONID_PLACEHOLDER}}',
|
||||
'{{FORUMREPLYID_PLACEHOLDER}}'
|
||||
);
|
||||
|
||||
// Fill the template with the target course values.
|
||||
return str_replace($placeholders, $replacements, $template);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the user's credentials file with all the course's users
|
||||
*
|
||||
* @param int $targetcourseid
|
||||
* @param bool $updateuserspassword Updates the course users password to $CFG->tool_generator_users_password
|
||||
* @return string The users csv file contents.
|
||||
*/
|
||||
protected static function generate_users_file($targetcourseid, $updateuserspassword) {
|
||||
global $CFG;
|
||||
|
||||
$coursecontext = context_course::instance($targetcourseid);
|
||||
|
||||
$users = get_enrolled_users($coursecontext, '', 0, 'u.id, u.username, u.auth', 'u.username ASC');
|
||||
if (!$users) {
|
||||
print_error('coursewithoutusers', 'tool_generator');
|
||||
}
|
||||
|
||||
$lines = array();
|
||||
foreach ($users as $user) {
|
||||
|
||||
// Updating password to the one set in config.php.
|
||||
if ($updateuserspassword) {
|
||||
$userauth = get_auth_plugin($user->auth);
|
||||
if (!$userauth->user_update_password($user, $CFG->tool_generator_users_password)) {
|
||||
print_error('errorpasswordupdate', 'auth');
|
||||
}
|
||||
}
|
||||
|
||||
// Here we already checked that $CFG->tool_generator_users_password is not null.
|
||||
$lines[] = $user->username . ',' . $CFG->tool_generator_users_password;
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $lines);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a tool_generator file record
|
||||
*
|
||||
* @param string $filearea testplan or users
|
||||
* @param string $filetype The file extension jmx or csv
|
||||
* @return stdClass The file record to use when creating tool_generator files
|
||||
*/
|
||||
protected static function get_file_record($filearea, $filetype) {
|
||||
|
||||
$systemcontext = context_system::instance();
|
||||
|
||||
$filerecord = new stdClass();
|
||||
$filerecord->contextid = $systemcontext->id;
|
||||
$filerecord->component = 'tool_generator';
|
||||
$filerecord->filearea = $filearea;
|
||||
$filerecord->itemid = 0;
|
||||
$filerecord->filepath = '/';
|
||||
|
||||
// Random generated number to avoid concurrent execution problems.
|
||||
$filerecord->filename = $filearea . '_' . date('YmdHi', time()) . '_' . rand(1000, 9999) . '.' . $filetype;
|
||||
|
||||
return $filerecord;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the data required to fill the test plan template with the database contents.
|
||||
*
|
||||
* @param int $targetcourseid The target course id
|
||||
* @return stdClass The ids required by the test plan
|
||||
*/
|
||||
protected static function get_course_test_data($targetcourseid) {
|
||||
global $DB, $USER;
|
||||
|
||||
$data = new stdClass();
|
||||
|
||||
// Getting course contents info as the current user (will be an admin).
|
||||
$course = new stdClass();
|
||||
$course->id = $targetcourseid;
|
||||
$courseinfo = new course_modinfo($course, $USER->id);
|
||||
|
||||
// Getting the first page module instance.
|
||||
if (!$pages = $courseinfo->get_instances_of('page')) {
|
||||
print_error('error_nopageinstances', 'tool_generator');
|
||||
}
|
||||
$data->pageid = reset($pages)->id;
|
||||
|
||||
// Getting the first forum module instance and it's first discussion and reply as well.
|
||||
if (!$forums = $courseinfo->get_instances_of('forum')) {
|
||||
print_error('error_noforuminstances', 'tool_generator');
|
||||
}
|
||||
$forum = reset($forums);
|
||||
|
||||
// Getting the first discussion (and reply).
|
||||
if (!$discussions = forum_get_discussions($forum, 'd.timemodified ASC', false, -1, 1)) {
|
||||
print_error('error_noforumdiscussions', 'tool_generator');
|
||||
}
|
||||
$discussion = reset($discussions);
|
||||
|
||||
$data->forumid = $forum->id;
|
||||
$data->forumdiscussionid = $discussion->discussion;
|
||||
$data->forumreplyid = $discussion->id;
|
||||
|
||||
// According to the current test plan.
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the selected target course is ok.
|
||||
*
|
||||
* @param int|string $course
|
||||
* @param int $size
|
||||
* @return array Errors array or false if everything is ok
|
||||
*/
|
||||
public static function has_selected_course_any_problem($course, $size) {
|
||||
global $DB;
|
||||
|
||||
$errors = array();
|
||||
|
||||
if (!is_numeric($course)) {
|
||||
if (!$course = $DB->get_field('course', 'id', array('shortname' => $course))) {
|
||||
$errors['courseid'] = get_string('error_nonexistingcourse', 'tool_generator');
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
|
||||
$coursecontext = context_course::instance($course, IGNORE_MISSING);
|
||||
if (!$coursecontext) {
|
||||
$errors['courseid'] = get_string('error_nonexistingcourse', 'tool_generator');
|
||||
return $errors;
|
||||
}
|
||||
|
||||
if (!$users = get_enrolled_users($coursecontext, '', 0, 'u.id')) {
|
||||
$errors['courseid'] = get_string('coursewithoutusers', 'tool_generator');
|
||||
}
|
||||
|
||||
// Checks that the selected course has enough users.
|
||||
$coursesizes = tool_generator_course_backend::get_users_per_size();
|
||||
if (count($users) < $coursesizes[$size]) {
|
||||
$errors['size'] = get_string('notenoughusers', 'tool_generator');
|
||||
}
|
||||
|
||||
if (empty($errors)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* CLI interface for creating a test plan
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright 2013 David Monllaó
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
define('NO_OUTPUT_BUFFERING', true);
|
||||
|
||||
require(dirname(__FILE__) . '/../../../../config.php');
|
||||
require_once($CFG->libdir. '/clilib.php');
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/testplan_backend.php');
|
||||
|
||||
// CLI options.
|
||||
list($options, $unrecognized) = cli_get_params(
|
||||
array(
|
||||
'help' => false,
|
||||
'shortname' => false,
|
||||
'size' => false,
|
||||
'bypasscheck' => false,
|
||||
'updateuserspassword' => false
|
||||
),
|
||||
array(
|
||||
'h' => 'help'
|
||||
)
|
||||
);
|
||||
|
||||
$testplansizes = '* ' . implode(PHP_EOL . '* ', tool_generator_testplan_backend::get_size_choices());
|
||||
|
||||
// Display help.
|
||||
if (!empty($options['help']) || empty($options['shortname']) || empty($options['size'])) {
|
||||
|
||||
echo get_string('testplanexplanation', 'tool_generator', tool_generator_testplan_backend::get_repourl()) .
|
||||
"Options:
|
||||
-h, --help Print out this help
|
||||
--shortname Shortname of the test plan's target course (required)
|
||||
--size Size of the test plan to create XS, S, M, L, XL, or XXL (required)
|
||||
--bypasscheck Bypasses the developer-mode check (be careful!)
|
||||
--updateuserspassword Updates the target course users password according to \$CFG->tool_generator_users_password
|
||||
|
||||
$testplansizes
|
||||
|
||||
Consider that, the server resources you will need to run the test plan will be higher as the test plan size is higher.
|
||||
|
||||
Example from Moodle root directory:
|
||||
\$sudo -u www-data /usr/bin/php admin/tool/generator/cli/maketestplan.php --shortname=\"testcourse_12\" --size=S
|
||||
";
|
||||
// Exit with error unless we're showing this because they asked for it.
|
||||
exit(empty($options['help']) ? 1 : 0);
|
||||
}
|
||||
|
||||
// Check debugging is set to developer level.
|
||||
if (empty($options['bypasscheck']) && !debugging('', DEBUG_DEVELOPER)) {
|
||||
cli_error(get_string('error_notdebugging', 'tool_generator'));
|
||||
}
|
||||
|
||||
// Get options.
|
||||
$shortname = $options['shortname'];
|
||||
$sizename = $options['size'];
|
||||
|
||||
// Check size.
|
||||
try {
|
||||
$size = tool_generator_testplan_backend::size_for_name($sizename);
|
||||
} catch (coding_exception $e) {
|
||||
cli_error("Error: Invalid size ($sizename). Use --help for help.");
|
||||
}
|
||||
|
||||
// Check selected course.
|
||||
if ($errors = tool_generator_testplan_backend::has_selected_course_any_problem($shortname, $size)) {
|
||||
// Showing the first reported problem.
|
||||
cli_error("Error: " . reset($errors));
|
||||
}
|
||||
|
||||
// Checking if test users password is set.
|
||||
if (empty($CFG->tool_generator_users_password) || is_bool($CFG->tool_generator_users_password)) {
|
||||
cli_error("Error: " . get_string('error_nouserspassword', 'tool_generator'));
|
||||
}
|
||||
|
||||
// Switch to admin user account.
|
||||
session_set_user(get_admin());
|
||||
|
||||
// Create files.
|
||||
$courseid = $DB->get_field('course', 'id', array('shortname' => $shortname));
|
||||
$usersfile = tool_generator_testplan_backend::create_users_file($courseid, !empty($options['updateuserspassword']));
|
||||
$testplanfile = tool_generator_testplan_backend::create_testplan_file($courseid, $size);
|
||||
|
||||
// One file path per line so other CLI scripts can easily parse the output.
|
||||
echo moodle_url::make_pluginfile_url(
|
||||
$testplanfile->get_contextid(),
|
||||
$testplanfile->get_component(),
|
||||
$testplanfile->get_filearea(),
|
||||
$testplanfile->get_itemid(),
|
||||
$testplanfile->get_filepath(),
|
||||
$testplanfile->get_filename()
|
||||
) .
|
||||
PHP_EOL .
|
||||
moodle_url::make_pluginfile_url(
|
||||
$usersfile->get_contextid(),
|
||||
$usersfile->get_component(),
|
||||
$usersfile->get_filearea(),
|
||||
$usersfile->get_itemid(),
|
||||
$usersfile->get_filepath(),
|
||||
$usersfile->get_filename()
|
||||
) .
|
||||
PHP_EOL;
|
||||
@@ -23,16 +23,7 @@
|
||||
*/
|
||||
|
||||
$string['bigfile'] = 'Big file {$a}';
|
||||
$string['coursesize_0'] = 'XS (~10KB; create in ~1 second)';
|
||||
$string['coursesize_1'] = 'S (~10MB; create in ~30 seconds)';
|
||||
$string['coursesize_2'] = 'M (~100MB; create in ~5 minutes)';
|
||||
$string['coursesize_3'] = 'L (~1GB; create in ~1 hour)';
|
||||
$string['coursesize_4'] = 'XL (~10GB; create in ~4 hours)';
|
||||
$string['coursesize_5'] = 'XXL (~20GB; create in ~8 hours)';
|
||||
$string['createcourse'] = 'Create course';
|
||||
$string['creating'] = 'Creating course';
|
||||
$string['done'] = 'done ({$a}s)';
|
||||
$string['explanation'] = 'This tool creates standard test courses that include many
|
||||
$string['courseexplanation'] = '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
|
||||
@@ -50,16 +41,38 @@ filesystem space (tens of gigabytes). You will need to delete the courses
|
||||
(To avoid accidental use, this feature is disabled unless you have also selected
|
||||
DEVELOPER debugging level.)';
|
||||
|
||||
$string['coursesize_0'] = 'XS (~10KB; create in ~1 second)';
|
||||
$string['coursesize_1'] = 'S (~10MB; create in ~30 seconds)';
|
||||
$string['coursesize_2'] = 'M (~100MB; create in ~5 minutes)';
|
||||
$string['coursesize_3'] = 'L (~1GB; create in ~1 hour)';
|
||||
$string['coursesize_4'] = 'XL (~10GB; create in ~4 hours)';
|
||||
$string['coursesize_5'] = 'XXL (~20GB; create in ~8 hours)';
|
||||
$string['coursewithoutusers'] = 'The selected course has no users';
|
||||
$string['createcourse'] = 'Create course';
|
||||
$string['createtestplan'] = 'Create test plan';
|
||||
$string['creating'] = 'Creating course';
|
||||
$string['done'] = 'done ({$a}s)';
|
||||
$string['downloadtestplan'] = 'Download test plan';
|
||||
$string['downloadusersfile'] = 'Download users file';
|
||||
$string['error_nocourses'] = 'There are no courses to generate the test plan';
|
||||
$string['error_noforumdiscussions'] = 'The selected course does not contain forum discussions';
|
||||
$string['error_noforuminstances'] = 'The selected course does not contain forum module instances';
|
||||
$string['error_noforumreplies'] = 'The selected course does not contain forum replies';
|
||||
$string['error_nonexistingcourse'] = 'The specified course does not exist';
|
||||
$string['error_nopageinstances'] = 'The selected course does not contain page module instances';
|
||||
$string['error_notdebugging'] = 'Not available on this server because debugging is not set to DEVELOPER';
|
||||
$string['error_nouserspassword'] = 'You need to set $CFG->tool_generator_users_password in config.php to generate the test plan';
|
||||
$string['firstname'] = 'Test course user';
|
||||
$string['fullname'] = 'Test course: {$a->size}';
|
||||
$string['maketestcourse'] = 'Make test course';
|
||||
$string['maketestplan'] = 'Make JMeter test plan';
|
||||
$string['notenoughusers'] = 'The selected course does not have enough users';
|
||||
$string['pluginname'] = 'Development data generator';
|
||||
$string['progress_createcourse'] = 'Creating course {$a}';
|
||||
$string['progress_checkaccounts'] = 'Checking user accounts ({$a})';
|
||||
$string['progress_coursecompleted'] = 'Course completed ({$a}s)';
|
||||
$string['progress_createaccounts'] = 'Creating user accounts ({$a->from} - {$a->to})';
|
||||
$string['progress_createbigfiles'] = 'Creating big files ({$a})';
|
||||
$string['progress_createcourse'] = 'Creating course {$a}';
|
||||
$string['progress_createforum'] = 'Creating forum ({$a} posts)';
|
||||
$string['progress_createpages'] = 'Creating pages ({$a})';
|
||||
$string['progress_createsmallfiles'] = 'Creating small files ({$a})';
|
||||
@@ -79,3 +92,33 @@ $string['sitesize_4'] = 'XL (~10GB; 1065 courses, created in ~5 hours)';
|
||||
$string['sitesize_5'] = 'XXL (~20GB; 4177 courses, created in ~10 hours)';
|
||||
$string['size'] = 'Size of course';
|
||||
$string['smallfiles'] = 'Small files';
|
||||
$string['targetcourse'] = 'Test target course';
|
||||
$string['testplanexplanation'] = 'This tool creates a JMeter test plan file along with the user credentials file.
|
||||
|
||||
This test plan is designed to work along with {$a}, which makes easier to run the test plan in a specific Moodle environment, gathers information about the runs and compares the results, so you will need to download it and use it\'s 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 = \'moodle\';). There is no default value for this password to prevent unintended usages 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 \'moodle\'
|
||||
* A page module instance
|
||||
* A forum module instance with at least one discussion and one reply
|
||||
|
||||
You might want to consider your servers capacity when running large test plans as the amount to load generated by JMeter
|
||||
can be specially big. The ramp up period has been adjusted according to the number of threads (users) to reduce this kind
|
||||
of issues but the load is still huge.
|
||||
|
||||
**Do not run the test plan on a live system**. This feature only creates the files to feed JMeter so is not dangerous by
|
||||
itself, but you should **NEVER** run this test plan in a production site.
|
||||
|
||||
';
|
||||
$string['testplansize_0'] = 'XS ({$a->users} users, {$a->loops} loops and {$a->rampup} rampup period)';
|
||||
$string['testplansize_1'] = 'S ({$a->users} users, {$a->loops} loops and {$a->rampup} rampup period)';
|
||||
$string['testplansize_2'] = 'M ({$a->users} users, {$a->loops} loops and {$a->rampup} rampup period)';
|
||||
$string['testplansize_3'] = 'L ({$a->users} users, {$a->loops} loops and {$a->rampup} rampup period)';
|
||||
$string['testplansize_4'] = 'XL ({$a->users} users, {$a->loops} loops and {$a->rampup} rampup period)';
|
||||
$string['testplansize_5'] = 'XXL ({$a->users} users, {$a->loops} loops and {$a->rampup} rampup period)';
|
||||
$string['updateuserspassword'] = 'Update course users password';
|
||||
$string['updateuserspassword_help'] = 'JMeter needs to login as the course users, you can set the users password using $CFG->tool_generator_users_password in config.php; this setting updates the course user\'s password according to $CFG->tool_generator_users_password. It can be useful in case you are using a course not generated by tool_generator or $CFG->tool_generator_users_password was not set when you created the test courses.';
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Generator tool functions.
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright David Monllaó
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Files support.
|
||||
*
|
||||
* Exits if the required permissions are not satisfied.
|
||||
*
|
||||
* @param stdClass $course course object
|
||||
* @param stdClass $cm
|
||||
* @param stdClass $context context object
|
||||
* @param string $filearea file area
|
||||
* @param array $args extra arguments
|
||||
* @param bool $forcedownload whether or not force download
|
||||
* @param array $options additional options affecting the file serving
|
||||
* @return void The file is sent along with it's headers
|
||||
*/
|
||||
function tool_generator_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) {
|
||||
|
||||
// Only for admins or CLI.
|
||||
if (!defined('CLI_SCRIPT') && !is_siteadmin()) {
|
||||
die;
|
||||
}
|
||||
|
||||
if ($context->contextlevel != CONTEXT_SYSTEM) {
|
||||
send_file_not_found();
|
||||
}
|
||||
|
||||
$fs = get_file_storage();
|
||||
$file = $fs->get_file($context->id, 'tool_generator', $filearea, $args[0], '/', $args[1]);
|
||||
|
||||
// Send the file, always forcing download, we don't want options.
|
||||
session_get_instance()->write_close();
|
||||
send_stored_file($file, 0, 0, true);
|
||||
}
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Script creates a standardised large course for testing reliability and
|
||||
* performance.
|
||||
* Script creates a standardised large course for testing reliability and performance.
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright 2013 The Open University
|
||||
@@ -31,10 +30,10 @@ require('../../../config.php');
|
||||
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/course_backend.php');
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/make_form.php');
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/make_course_form.php');
|
||||
|
||||
// Initialise page and check permissions.
|
||||
admin_externalpage_setup('toolgenerator');
|
||||
admin_externalpage_setup('toolgeneratorcourse');
|
||||
|
||||
// Start page.
|
||||
echo $OUTPUT->header();
|
||||
@@ -42,7 +41,7 @@ echo $OUTPUT->heading(get_string('maketestcourse', 'tool_generator'));
|
||||
|
||||
// Information message.
|
||||
$context = context_system::instance();
|
||||
echo $OUTPUT->box(format_text(get_string('explanation', 'tool_generator'),
|
||||
echo $OUTPUT->box(format_text(get_string('courseexplanation', 'tool_generator'),
|
||||
FORMAT_MARKDOWN, array('context' => $context)));
|
||||
|
||||
// Check debugging is set to DEVELOPER.
|
||||
@@ -53,7 +52,7 @@ if (!debugging('', DEBUG_DEVELOPER)) {
|
||||
}
|
||||
|
||||
// Set up the form.
|
||||
$mform = new tool_generator_make_form('maketestcourse.php');
|
||||
$mform = new tool_generator_make_course_form('maketestcourse.php');
|
||||
if ($data = $mform->get_data()) {
|
||||
// Do actual work.
|
||||
echo $OUTPUT->heading(get_string('creating', 'tool_generator'));
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Generates a JMeter test plan to performance comparison.
|
||||
*
|
||||
* @package tool_generator
|
||||
* @copyright 2013 David Monllaó
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require(__DIR__ . '/../../../config.php');
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/testplan_backend.php');
|
||||
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/generator/classes/make_testplan_form.php');
|
||||
|
||||
// Initialise page and check permissions.
|
||||
admin_externalpage_setup('toolgeneratortestplan');
|
||||
|
||||
// Start page.
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('maketestplan', 'tool_generator'));
|
||||
|
||||
// Information message.
|
||||
$context = context_system::instance();
|
||||
$markdownlink = '[' . tool_generator_testplan_backend::get_repourl() . '](' . tool_generator_testplan_backend::get_repourl() . ')';
|
||||
echo $OUTPUT->box(format_text(get_string('testplanexplanation', 'tool_generator', $markdownlink),
|
||||
FORMAT_MARKDOWN, array('context' => $context)));
|
||||
|
||||
// Check debugging is set to DEVELOPER.
|
||||
if (!debugging('', DEBUG_DEVELOPER)) {
|
||||
echo $OUTPUT->notification(get_string('error_notdebugging', 'tool_generator'));
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
// Set up the form.
|
||||
$mform = new tool_generator_make_testplan_form('maketestplan.php');
|
||||
if ($data = $mform->get_data()) {
|
||||
|
||||
// Creating both test plan and users files.
|
||||
$testplanfile = tool_generator_testplan_backend::create_testplan_file($data->courseid, $data->size);
|
||||
$usersfile = tool_generator_testplan_backend::create_users_file($data->courseid, $data->updateuserspassword);
|
||||
|
||||
// Test plan link.
|
||||
$testplanurl = moodle_url::make_pluginfile_url(
|
||||
$testplanfile->get_contextid(),
|
||||
$testplanfile->get_component(),
|
||||
$testplanfile->get_filearea(),
|
||||
$testplanfile->get_itemid(),
|
||||
$testplanfile->get_filepath(),
|
||||
$testplanfile->get_filename()
|
||||
);
|
||||
echo html_writer::div(
|
||||
html_writer::link($testplanurl, get_string('downloadtestplan', 'tool_generator'))
|
||||
);
|
||||
|
||||
// Users file link.
|
||||
$usersfileurl = moodle_url::make_pluginfile_url(
|
||||
$usersfile->get_contextid(),
|
||||
$usersfile->get_component(),
|
||||
$usersfile->get_filearea(),
|
||||
$usersfile->get_itemid(),
|
||||
$usersfile->get_filepath(),
|
||||
$usersfile->get_filename()
|
||||
);
|
||||
echo html_writer::div(
|
||||
html_writer::link($usersfileurl, get_string('downloadusersfile', 'tool_generator'))
|
||||
);
|
||||
|
||||
} else {
|
||||
// Display form.
|
||||
$mform->display();
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
@@ -25,8 +25,12 @@
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
if ($hassiteconfig) {
|
||||
$ADMIN->add('development', new admin_externalpage('toolgenerator',
|
||||
$ADMIN->add('development', new admin_externalpage('toolgeneratorcourse',
|
||||
get_string('maketestcourse', 'tool_generator'),
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/tool/generator/maketestcourse.php'));
|
||||
|
||||
$ADMIN->add('development', new admin_externalpage('toolgeneratortestplan',
|
||||
get_string('maketestplan', 'tool_generator'),
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/tool/generator/maketestplan.php'));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,885 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jmeterTestPlan version="1.2" properties="2.4">
|
||||
<hashTree>
|
||||
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
|
||||
<stringProp name="TestPlan.comments"></stringProp>
|
||||
<boolProp name="TestPlan.functional_mode">false</boolProp>
|
||||
<boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
|
||||
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="runtimestamp" elementType="Argument">
|
||||
<stringProp name="Argument.name">runtimestamp</stringProp>
|
||||
<stringProp name="Argument.value">${__time()}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="size" elementType="Argument">
|
||||
<stringProp name="Argument.name">size</stringProp>
|
||||
<stringProp name="Argument.value">{{SIZE_PLACEHOLDER}}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="host" elementType="Argument">
|
||||
<stringProp name="Argument.name">host</stringProp>
|
||||
<stringProp name="Argument.value">{{HOST_PLACEHOLDER}}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="sitepath" elementType="Argument">
|
||||
<stringProp name="Argument.name">sitepath</stringProp>
|
||||
<stringProp name="Argument.value">{{SITEPATH_PLACEHOLDER}}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="courseid" elementType="Argument">
|
||||
<stringProp name="Argument.name">courseid</stringProp>
|
||||
<stringProp name="Argument.value">{{COURSEID_PLACEHOLDER}}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="pageactivityid" elementType="Argument">
|
||||
<stringProp name="Argument.name">pageactivityid</stringProp>
|
||||
<stringProp name="Argument.value">{{PAGEACTIVITYID_PLACEHOLDER}}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="forumactivityid" elementType="Argument">
|
||||
<stringProp name="Argument.name">forumactivityid</stringProp>
|
||||
<stringProp name="Argument.value">{{FORUMACTIVITYID_PLACEHOLDER}}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="forumdiscussionid" elementType="Argument">
|
||||
<stringProp name="Argument.name">forumdiscussionid</stringProp>
|
||||
<stringProp name="Argument.value">{{FORUMDISCUSSIONID_PLACEHOLDER}}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="forumreplyid" elementType="Argument">
|
||||
<stringProp name="Argument.name">forumreplyid</stringProp>
|
||||
<stringProp name="Argument.value">{{FORUMREPLYID_PLACEHOLDER}}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="TestPlan.user_define_classpath"></stringProp>
|
||||
</TestPlan>
|
||||
<hashTree>
|
||||
<ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="Samples per minute" enabled="true">
|
||||
<stringProp name="calcMode">all active threads (shared)</stringProp>
|
||||
<stringProp name="throughput">${__property(throughput,throughput,120.0)}</stringProp>
|
||||
</ConstantThroughputTimer>
|
||||
<hashTree/>
|
||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Warm-up site" enabled="true">
|
||||
<stringProp name="TestPlan.comments">Used to fill the caches, logs in every user</stringProp>
|
||||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
||||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
||||
<boolProp name="LoopController.continue_forever">false</boolProp>
|
||||
<stringProp name="LoopController.loops">1</stringProp>
|
||||
</elementProp>
|
||||
<stringProp name="ThreadGroup.num_threads">${__P(users,{{USERS_PLACEHOLDER}})}</stringProp>
|
||||
<stringProp name="ThreadGroup.ramp_time">${__P(rampup,{{RAMPUP_PLACEHOLDER}})}</stringProp>
|
||||
<longProp name="ThreadGroup.start_time">1378187955000</longProp>
|
||||
<longProp name="ThreadGroup.end_time">1378187955000</longProp>
|
||||
<boolProp name="ThreadGroup.scheduler">false</boolProp>
|
||||
<stringProp name="ThreadGroup.duration"></stringProp>
|
||||
<stringProp name="ThreadGroup.delay"></stringProp>
|
||||
</ThreadGroup>
|
||||
<hashTree>
|
||||
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Default site request" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments"/>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain">${host}</stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}</stringProp>
|
||||
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
|
||||
</ConfigTestElement>
|
||||
<hashTree/>
|
||||
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV users data" enabled="true">
|
||||
<stringProp name="delimiter">,</stringProp>
|
||||
<stringProp name="fileEncoding"></stringProp>
|
||||
<stringProp name="filename">${__P(usersfile,YOU_FORGOT_TO_SPECIFY_USERS_CSV_FILE.csv)}</stringProp>
|
||||
<boolProp name="quotedData">false</boolProp>
|
||||
<boolProp name="recycle">true</boolProp>
|
||||
<stringProp name="shareMode">All threads</stringProp>
|
||||
<boolProp name="stopThread">false</boolProp>
|
||||
<stringProp name="variableNames">username,password</stringProp>
|
||||
</CSVDataSet>
|
||||
<hashTree/>
|
||||
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Test plan loop" enabled="true">
|
||||
<boolProp name="LoopController.continue_forever">true</boolProp>
|
||||
<stringProp name="LoopController.loops">1</stringProp>
|
||||
</LoopController>
|
||||
<hashTree>
|
||||
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
|
||||
<collectionProp name="CookieManager.cookies"/>
|
||||
<boolProp name="CookieManager.clearEachIteration">true</boolProp>
|
||||
<stringProp name="CookieManager.policy">rfc2109</stringProp>
|
||||
</CookieManager>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Frontpage not logged" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments"/>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path"></stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Login" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="username" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${username}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">username</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="password" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${password}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">password</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/login/index.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">POST</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Frontpage logged" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments"/>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path"></stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="View course" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="id" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${courseid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">id</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/course/view.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
<stringProp name="TestPlan.comments"> </stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree>
|
||||
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true">
|
||||
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
|
||||
<stringProp name="RegexExtractor.refname">SESSION_SESSKEY</stringProp>
|
||||
<stringProp name="RegexExtractor.regex">sesskey=([^"]+)"</stringProp>
|
||||
<stringProp name="RegexExtractor.template">$1$</stringProp>
|
||||
<stringProp name="RegexExtractor.default"></stringProp>
|
||||
<stringProp name="RegexExtractor.match_number">2</stringProp>
|
||||
<stringProp name="Sample.scope">all</stringProp>
|
||||
</RegexExtractor>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Logout" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="sesskey" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${SESSION_SESSKEY}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">sesskey</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/login/logout.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
</hashTree>
|
||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Moodle Test" enabled="true">
|
||||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
||||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
||||
<boolProp name="LoopController.continue_forever">false</boolProp>
|
||||
<stringProp name="LoopController.loops">${__property(loops,loops,{{LOOPS_PLACEHOLDER}})}</stringProp>
|
||||
</elementProp>
|
||||
<stringProp name="ThreadGroup.num_threads">${__property(users,users,{{USERS_PLACEHOLDER}})}</stringProp>
|
||||
<stringProp name="ThreadGroup.ramp_time">${__property(rampup,rampup,{{RAMPUP_PLACEHOLDER}})}</stringProp>
|
||||
<longProp name="ThreadGroup.start_time">1376636813000</longProp>
|
||||
<longProp name="ThreadGroup.end_time">1376636813000</longProp>
|
||||
<boolProp name="ThreadGroup.scheduler">false</boolProp>
|
||||
<stringProp name="ThreadGroup.duration"></stringProp>
|
||||
<stringProp name="ThreadGroup.delay"></stringProp>
|
||||
</ThreadGroup>
|
||||
<hashTree>
|
||||
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Default site request" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments"/>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain">${host}</stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}</stringProp>
|
||||
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
|
||||
</ConfigTestElement>
|
||||
<hashTree/>
|
||||
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV users data" enabled="true">
|
||||
<stringProp name="delimiter">,</stringProp>
|
||||
<stringProp name="fileEncoding"></stringProp>
|
||||
<stringProp name="filename">${__P(usersfile,YOU_FORGOT_TO_SPECIFY_USERS_CSV_FILE.csv)}</stringProp>
|
||||
<boolProp name="quotedData">false</boolProp>
|
||||
<boolProp name="recycle">true</boolProp>
|
||||
<stringProp name="shareMode">All threads</stringProp>
|
||||
<boolProp name="stopThread">false</boolProp>
|
||||
<stringProp name="variableNames">username,password</stringProp>
|
||||
</CSVDataSet>
|
||||
<hashTree/>
|
||||
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Test plan loop" enabled="true">
|
||||
<boolProp name="LoopController.continue_forever">true</boolProp>
|
||||
<stringProp name="LoopController.loops">1</stringProp>
|
||||
</LoopController>
|
||||
<hashTree>
|
||||
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
|
||||
<collectionProp name="CookieManager.cookies"/>
|
||||
<boolProp name="CookieManager.clearEachIteration">true</boolProp>
|
||||
<stringProp name="CookieManager.policy">rfc2109</stringProp>
|
||||
</CookieManager>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Frontpage not logged" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments"/>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path"></stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Login" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="username" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${username}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">username</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="password" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${password}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">password</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/login/index.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">POST</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree>
|
||||
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Logged in" enabled="true">
|
||||
<collectionProp name="Asserion.test_strings">
|
||||
<stringProp name="615717117"><div class="logininfo">You are logged in as</stringProp>
|
||||
</collectionProp>
|
||||
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
||||
<boolProp name="Assertion.assume_success">false</boolProp>
|
||||
<intProp name="Assertion.test_type">2</intProp>
|
||||
</ResponseAssertion>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Frontpage logged" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments"/>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path"></stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="View course" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="id" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${courseid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">id</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/course/view.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
<stringProp name="TestPlan.comments"> </stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="View a page activity" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="id" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${pageactivityid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">id</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/mod/page/view.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="View course again" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="id" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${courseid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">id</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/course/view.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="View a forum activity" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="id" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${forumactivityid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">id</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/mod/forum/view.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="View a forum discussion" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="d" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${forumdiscussionid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">d</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/mod/forum/discuss.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Fill a form to reply a forum discussion" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="reply" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${forumreplyid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">reply</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/mod/forum/post.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree>
|
||||
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Get session userid" enabled="true">
|
||||
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
|
||||
<stringProp name="RegexExtractor.refname">SESSION_USERID</stringProp>
|
||||
<stringProp name="RegexExtractor.regex">name="userid"\stype="hidden"\svalue="(\d+)"</stringProp>
|
||||
<stringProp name="RegexExtractor.template">$1$</stringProp>
|
||||
<stringProp name="RegexExtractor.default">0</stringProp>
|
||||
<stringProp name="RegexExtractor.match_number">1</stringProp>
|
||||
</RegexExtractor>
|
||||
<hashTree/>
|
||||
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Get session sesskey" enabled="true">
|
||||
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
|
||||
<stringProp name="RegexExtractor.refname">SESSION_SESSKEY</stringProp>
|
||||
<stringProp name="RegexExtractor.regex">name="sesskey"\stype="hidden"\svalue="([^"]+)"</stringProp>
|
||||
<stringProp name="RegexExtractor.template">$1$</stringProp>
|
||||
<stringProp name="RegexExtractor.default">0</stringProp>
|
||||
<stringProp name="RegexExtractor.match_number">1</stringProp>
|
||||
</RegexExtractor>
|
||||
<hashTree/>
|
||||
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Get forum form attachments" enabled="true">
|
||||
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
|
||||
<stringProp name="RegexExtractor.refname">SESSION_FORUMFORMATTACHMENTS</stringProp>
|
||||
<stringProp name="RegexExtractor.regex">value="(\d+)"\sname="attachments"\stype="hidden"</stringProp>
|
||||
<stringProp name="RegexExtractor.template">$1$</stringProp>
|
||||
<stringProp name="RegexExtractor.default">0</stringProp>
|
||||
<stringProp name="RegexExtractor.match_number">1</stringProp>
|
||||
</RegexExtractor>
|
||||
<hashTree/>
|
||||
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Get forum form itemid" enabled="true">
|
||||
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
|
||||
<stringProp name="RegexExtractor.refname">SESSION_FORUMFORMITEMID</stringProp>
|
||||
<stringProp name="RegexExtractor.regex">type="hidden"\sname="message\[itemid\]"\svalue="(\d+)"</stringProp>
|
||||
<stringProp name="RegexExtractor.template">$1$</stringProp>
|
||||
<stringProp name="RegexExtractor.default">0</stringProp>
|
||||
<stringProp name="RegexExtractor.match_number">1</stringProp>
|
||||
</RegexExtractor>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Send the forum discussion reply" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="course" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${courseid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">course</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="forum" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">0</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">forum</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="discussion" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${forumdiscussionid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">discussion</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="userid" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${SESSION_USERID}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">userid</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="groupid" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">0</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">groupid</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="edit" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">0</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">edit</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="reply" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${forumreplyid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">reply</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="sesskey" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${SESSION_SESSKEY}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">sesskey</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="_qf__mod_forum_post_form" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">1</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">_qf__mod_forum_post_form</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="subject" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">Re: I am the test plan reply subject</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">subject</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="message[itemid]" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${SESSION_FORUMFORMITEMID}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">message[itemid]</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="message[format]" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">1</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">message[format]</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="message[text]" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">I am the test plan reply message</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">message[text]</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="parent" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${forumreplyid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">parent</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="subscribe" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">1</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">subscribe</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="attachments" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${SESSION_FORUMFORMATTACHMENTS}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">attachments</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="timestart" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">0</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">timestart</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="timeend" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">0</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">timeend</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="submitbutton" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">Post to forum</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">submitbutton</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/mod/forum/post.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">POST</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="View course once more" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="id" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${courseid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">id</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/course/view.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="View course participants" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="id" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${courseid}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">id</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/user/index.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Logout" enabled="true">
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="sesskey" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">${SESSION_SESSKEY}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">sesskey</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain"></stringProp>
|
||||
<stringProp name="HTTPSampler.port"></stringProp>
|
||||
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.response_timeout"></stringProp>
|
||||
<stringProp name="HTTPSampler.protocol"></stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/login/logout.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">GET</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.monitor">false</boolProp>
|
||||
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<BeanShellListener guiclass="TestBeanGUI" testclass="BeanShellListener" testname="Create php array results" enabled="true">
|
||||
<stringProp name="filename">recorder.bsf</stringProp>
|
||||
<stringProp name="parameters"></stringProp>
|
||||
<boolProp name="resetInterpreter">false</boolProp>
|
||||
<stringProp name="script"></stringProp>
|
||||
</BeanShellListener>
|
||||
<hashTree/>
|
||||
<ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true">
|
||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
||||
<objProp>
|
||||
<name>saveConfig</name>
|
||||
<value class="SampleSaveConfiguration">
|
||||
<time>true</time>
|
||||
<latency>true</latency>
|
||||
<timestamp>true</timestamp>
|
||||
<success>true</success>
|
||||
<label>true</label>
|
||||
<code>true</code>
|
||||
<message>true</message>
|
||||
<threadName>true</threadName>
|
||||
<dataType>true</dataType>
|
||||
<encoding>false</encoding>
|
||||
<assertions>true</assertions>
|
||||
<subresults>true</subresults>
|
||||
<responseData>false</responseData>
|
||||
<samplerData>false</samplerData>
|
||||
<xml>true</xml>
|
||||
<fieldNames>false</fieldNames>
|
||||
<responseHeaders>false</responseHeaders>
|
||||
<requestHeaders>false</requestHeaders>
|
||||
<responseDataOnError>false</responseDataOnError>
|
||||
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
|
||||
<assertionsResultsToSave>0</assertionsResultsToSave>
|
||||
<bytes>true</bytes>
|
||||
</value>
|
||||
</objProp>
|
||||
<stringProp name="filename">runs_samples/data.${runtimestamp}.jtl</stringProp>
|
||||
</ResultCollector>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
</hashTree>
|
||||
</hashTree>
|
||||
</jmeterTestPlan>
|
||||
@@ -627,6 +627,19 @@ $CFG->admin = 'admin';
|
||||
// Example:
|
||||
// $CFG->behat_restart_browser_after = 7200; // Restarts the browser session after 2 hours
|
||||
//
|
||||
//=========================================================================
|
||||
// 12. DEVELOPER DATA GENERATOR
|
||||
//=========================================================================
|
||||
//
|
||||
// The developer data generator tool is intended to be used only in development or testing sites and
|
||||
// it's usage in production environments is not recommended; if it is used to create JMeter test plans
|
||||
// is even less recommended as JMeter needs to log in as site course users. JMeter needs to know the
|
||||
// users passwords but would be dangerous to have a default password as everybody would know it, which would
|
||||
// be specially dangerouse if somebody uses this tool in a production site, so in order to prevent unintended
|
||||
// uses of the tool and undesired accesses as well, is compulsory to set a password for the users
|
||||
// generated by this tool, but only in case you want to generate a JMeter test. The value should be a string.
|
||||
// Example:
|
||||
// $CFG->tool_generator_users_password = 'examplepassword';
|
||||
|
||||
//=========================================================================
|
||||
// ALL DONE! To continue installation, visit your main page with a browser
|
||||
|
||||
Reference in New Issue
Block a user