-
Notifications
You must be signed in to change notification settings - Fork 49
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 | php
Useful docs: https://getcomposer.org/doc/00-intro.md
Inside project (as dependency)
$ composer require sugarcrm/tidbit
Global installation (to User home directory)
$ composer global require sugarcrm/tidbit
Make sure, you’ve added global available packages to your PATH
export PATH=~/.composer/vendor/bin:$PATH
To download Tidbit, first `cd` to the root directory of your Sugar installation. Then:
$ git clone git://github.com/sugarcrm/Tidbit.git
This will create a ‘Tidbit’ directory in your Sugar installation’s root directory.
Install composer dependencies inside Tidbit directory
$ composer install
Please note that examples are using
./bin/tidbit
tidbit
./vendor/bin/tidbit
First, ‘cd’ to your Tidbit directory. The command-line interface script for Tidbit is ./bin/tidbit. Here’s a simple usage example:
$ ./bin/tidbit -l 10
This 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/installation
Tidbit 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 —allrelationships
Like 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 -h
Documentation 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