GithubHelp home page GithubHelp logo

petrovets / tidbit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sugarcrm/tidbit

0.0 2.0 0.0 898 KB

Tidbit is a tool to create massive amounts of data for a SugarCRM instance

Home Page: http://developers.sugarcrm.com/opensource

License: Other

PHP 100.00%

tidbit's Introduction

Tidbit v3.0 (bleeding edge) -- Tidbit v2.0 (stable)

Master Develop
Build status Build status
Coverage Status Coverage Status

Tidbit is random data generator for Sugar versions 7.8 and later. By optimizing the communications with the database, large amounts of data can be inserted into the system for testing without manual intervention.

Documentation in the wiki!

Please visit the wiki for detailed documentation on using and configuring Tidbit.

Requirements

PHP 5.6+ Sugar Already installed (7.8+ versions)

Installation

To install Tidbit, unpack the Tidbit-v###.tar.bz2 file, and place the Tidbit/ directory within your SugarCRM installation (Tidbit Directory need to be created inside SugarCRM Installation folder).

Download composer

curl -sS https://getcomposer.org/installer | php

Install composer dependencies inside Tidbit directory

./composer.phar install

The only other requirement of Tidbit is that you have an installed and properly configured copy of Sugar in the directory above it.

Installation of Vagrant Stack (Example):

  1. SSH into vagrant stack you are using via command line.

    $ vagrant ssh
    
  2. Navigate to Sugar directory.

    $ cd /
    $ cd var/www/html/ (sugar instance).
    
  3. Download zip file from repo (master.zip) into the sugar instance. e.g. /SugarEnt-Full-7.6.0.0/.

    $ wget (url to zip file)
    
  4. Unzip file (master.zip). Directory created by zip file is called Tidbit-master.

    $ unzip master.zip
    
  5. Change Directory to /Tidbit e.g., mv /Tidbit-master /Tidbit.

    $ mv /Tidbit-master /Tidbit
    
  6. Navigate to /Tidbit and follow instructions under usage, below, from within /Tidbit directory.

    $ cd /Tidbit
    
  7. Install Composer dependencies

    $ ./composer.phar install
    

Configuration

Tidbit has default config files in tidbit_root/config/ folder.
Here:
    - config.php          -- main config file
    - data/*.php          -- customization of filling for separate fields if
                             bean tables
    - relationships/*.php -- customization of filling for separate fields if
                             bean relation tables
Tidbit settings can be fully overrided in tidbit_root/custom/config.php file
by php arrays in the same manner as in original configs

Usage

NOTES:

  • Usage of Tidbit could affect your data in DB Please make sure you have a backup, before running data Generation commands

  • In case of generation csv (--storage csv) We suppose what csv-dump will be used on empty DB, so for speed up, we'll generate values (integer starting with 1) for autoincrement-type fields.

Tidbit uses a command line interface. To run it from the Tidbit directory:

$ ./bin/tidbit (or ./vendor/bin/tidbit for package dependency installation)

Various options are available to control the number of entries generated. To view them:

$ ./bin/tidbit -h

Example usages:

* Clean out existing seed data when generating new data set:
  $ ./bin/tidbit -c

* Insert 500 users:
  $ ./bin/tidbit -u 500
  
* Generate data into csv (mysql is default):
  $ ./bin/tidbit --storage csv

* Generate records for all out-of-box and custom modules, plus find all relationships
  $ ./bin/tidbit --allmodules --allrelationships

* Obliterate all data when generating new records with 400 users:
  $ ./bin/tidbit -o -u 400

* Use profile (pre-existing one: simple, simple_rev2, average, high) file to generate data
  $ ./bin/tidbit -o --profile simple --sugar_path /some/sugar/path

* Use custom profile (located in /path/to/profile/file)
  $ ./bin/tidbit -o --profile /path/to/profile --sugar_path /some/sugar/path

* Generate TeamBasedACL action restrictions for chosen level (check level options in config files)
  $ ./bin/tidbit -o --tba -tba_level full
  
* Controlling INSERT_BATCH_SIZE (MySQL Support only for now)
  $ ./bin/tidbit -o --insert_batch_size 1000

* Setting path to SugarCRM installation
  $ ./bin/tidbit -o --sugar_path /some/sugar/path

* Using DB2 storage example (mysql/oracle/db2 can be used, depending on Sugar installation and DB usage)
  $ ./bin/tidbit -o --sugar_path /some/sugar/path --storage db2

Contributing:

See CONTRIBUTING for how you can contribute changes back into this project.

All Pull Requests should be targeted to "develop" branch and follow PSR2 Code Style Standard To run quick code check use

$ ./composer.phar check-style

or call PHP CS directly

$ ./vendor/bin/phpcs --standard=./ruleset.xml

to run PHPUnit tests locally please use

$ ./composer.phar tests

or call PHPUnit directly

$ ./vendor/bin/phpunit -c ./phpunit.xml.dist

There are automated PR checks enabled on TravisCI (https://travis-ci.org/sugarcrm/Tidbit) For each PR code-style and phpunit tests will be executed for verification

tidbit's People

Contributors

asorokin-sugar avatar dmulitsa avatar sstarikov avatar emitya avatar ramanenka avatar jbarlowsugar avatar dstiblo-sugarcrm avatar mmarum-sugarcrm avatar ezhdan-sugarcrm avatar rsennewald avatar dcluniecrm avatar skingry avatar chicks avatar asuharev avatar 40min avatar mcarroll83 avatar rzhou avatar xye avatar

Watchers

James Cloos avatar Alexander Petrovets avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.