Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Sugar MMM (MeterMaid Maker) README Summary: SugarMMM (MeterMaid Maker) generates MeterMaid XML scripts to simulate typical usage of Sugar for each module you specify. The command line version accepts a module name as its argument and produces a standard script. The GUI version allows you to choose multiple modules, as well as MeterMaid files already existing on your filesystem, and combine them into a single script. Installation: Copy the SugarMMM folder into the root directory of your Sugar installation. Next, you must edit xml_strings.php, located in the metadata folder. Correct values must be set for the following variables: * $sugar_path - Path to your Sugar installation * $sugar_domain - Domain of your Sugar installation (localhost) * $metermaid_path - Absolute path to your MeterMaid installation * $gui_writedir - Absolute path to a directory where the GUI version can write its files and look for files to include * $login_name - Login name of Sugar user you want to login as * $login_pw - Password for user named in $login_name More information about how to customize the behavior of SugarMMM by editing this file is given below. Command Line Version: Usage: php sugarmmm_cli.php --module=module [--threads=threads] The argument module can be the name of any module in your Sugar installation, including custom modules. The threads argument is optional. It controls how many threads JMeter will generate to run your script. The default value is 1. If you supply an incorrect module name, SugarMMM will die after printing all the valid options. For custom modules you will have to use the name of the package, followed by an underscore, and then the name of the module. If the module argument is valid, SugarMMM will write several .xml files to your SugarMMM directory, copy these files to your MeterMaid directory, and run MeterMaid on the module main script, producing the JMeter .jmx file. The behavior of the script is as follows: * Log-in * Go to module's list view * Perform a search for a random character * 90% of the time: o Select a record and go to detail view o 5% of the time, delete the record o 5% of the time, run the Quick Create script o 10% of the time, run the Add Relationship script * 10% of the time, run the Create Record script Create Record script: * Request module EditView * Perform Save request Quick Create script: * Randomly choose a module from the Quick Create bar and request the Quick Create form * Perform Save request Add relationship script: * Randomly choose a related module from the DetailView * Request that module's subpanel relate popup * Do a search for a random character * Select a record, saving the relationship After each request, a JMeter Gaussian Random Timer will cause a delay of 40 seconds +- 20 seconds. GUI Version: To use the GUI version, point your browser to: localhost/SugarDirectory/SugarMMM Where SugarDirectory is the root directory of the Sugar installation, containing SugarMMM. You will be able to select as many modules as you like. Also, for each module, you can choose to include or exclude the Create Record, Quick Create, and Add Relationship sub-scripts. After selecting modules and scripts, you will be able to select any pre-existing MeterMaid scripts from the $gui_writedir directory to be included in the final generated script. After this step, when you click the Generate button, the new scripts will be written to the $gui_writedir directory. For each module, the behavior of the generated script is the same as for the command line version (described above). You must ensure that the web server has permission to read and write the $gui_writedir directory or the GUI Version won't work. xml_strings.php In addition to the variables listed above, you can modify several other settings in the xml_strings.php file. * $timer_delay - The delay (base value) of the Gaussian Random Timer * $timer_range - The range of the Gaussian Random timer * $testmode - If true, the Gaussian Random timer delay and range are set to 0, and the throughput controllers are set to 100% for all generated scripts. * $modules_with_email - When generating Save requests for any modules in this array, post data for the email widget will be included. If you are using a custom module with email, add it to this array to generate an email address in Save requests. Changing the following values isn't recommended as the results haven't been tested: * $modules - Controls what modules are supported. * $bad_modules - Controls what modules are excluded. * $quickcreate_modules - When generating the QuickCreate subscript, randomly chooses one of these. * $field_lookup - For save requests, this array controls what fields are handled by name and what values are generated for them. * $type_lookup - For save requests, this array controls what fields are handled by type and what values are generated for them. * other variables - These are the template MeterMaid XML for generated scripts.