-
Notifications
You must be signed in to change notification settings - Fork 47
Home
Tidbit is a data generation tool for the Sugar application.
This tutorial will guide you step-by-step through the process of installing and running Tidbit. The only requirement is a working installation of Sugar.
Download and install composer (as phar)
$ curl -sS https://getcomposer.org/installer | phpUseful docs: https://getcomposer.org/doc/00-intro.md
Inside project (as dependency)
$ composer require sugarcrm/tidbitGlobal installation (to User home directory)
$ composer global require sugarcrm/tidbitMake sure, you’ve added global available packages to your PATH
export PATH=~/.composer/vendor/bin:$PATHTo download Tidbit, first `cd` to the root directory of your Sugar installation. Then:
$ git clone git://github.com/sugarcrm/Tidbit.gitThis will create a ‘Tidbit’ directory in your Sugar installation’s root directory.
Install composer dependencies inside Tidbit directory
$ composer installPlease note that examples are using
./bin/tidbittidbit./vendor/bin/tidbitFirst, ‘cd’ to your Tidbit directory. The command-line interface script for Tidbit is ./bin/tidbit. Here’s a simple usage example:
$ ./bin/tidbit -l 10This uses a ‘load’ factor of 10, meaning that 10 Accounts will be created, and records in other modules will be created in proportion to that number of accounts. The ratios are controlled by the values in the $modules array, located in config/config.php.
$modules is an array that maps module names to integer values. The default settings map ‘Accounts’ to 1000 and ‘Contacts’ to 4000, so 4 Contacts will be created for every 1 Account.
Another example:
$ ./bin/tidbit -o —profile simple —sugar_path /path/to/your/sugar/installationTidbit will use existing “simple” config to get amount of records for each module, that need to be generated.
—sugar_path is used to specify Sugar installation location.
$ ./bin/tidbit -l 50 -o —allmodules —allrelationshipsLike in the prior example, we use a ‘load’ argument. The ‘-o’ flag is for ‘obliterate’ mode. This will erase all data in tables populated by Tidbit before creating new data.
The ‘—allmodules’ flag tells Tidbit to generate records for any custom modules built using Module Builder. The ‘—allrelationships’ flag tells Tidbit to generate relationships between the records it creates whenever possible.
For a complete listing of command line options, you can display the usage string with the following:
$ ./bin/tidbit -hDocumentation of command line options can be found in this article.
If you now open Sugar in your browser you will see it is populated with CRM data. It is ready for you to perform your testing!
Please submit your questions or documentation issues in Issues section