Faker is a tool to generate fake data.

https://github.com/fzaninotto/Faker support was added to Tiki18 as one of the Packages, allowing to generate fake tracker items to facilitate testing tracker or Unified Index performance, for instance.

How to use it

You can use it through the Console command line script.


php console.php faker:tracker [-f|--field [FIELD]] [-i|--items [ITEMS]] [-r|--random-status] [--reuse-files [REUSE-FILES]] [--] 

Added comments for Tiki 20:

php console.php faker:comments   []
  -i, --items[=ITEMS]          Number of comments (items) to generate [default: 100]
  -r, --replies[=REPLIES]      Percentage of comments as replies [default: 40]
  -a, --anonymous[=ANONYMOUS]  Percentage of anonymous posts if permitted [default: 20]
  -s, --minstart[=MINSTART]    Earliest start date for first comment [default: "-1 year"]
  -e, --maxstart[=MAXSTART]    Latest start date for first comment [default: "-11 months"]
      --mingap[=MINGAP]        Shortest gap between comments [default: "10 minutes"]
  -g, --maxgap[=MAXGAP]        Longest gap between comments [default: "5 days"]


Command to create 5 new items, with random tracker item status (open, pending or closed), on tracker 1:

php console.php faker:tracker -i 5 -r -- 1

Command to create 200 new comments on tracker item 42 starting from about 2 months ago with a maximum gap of 2 hours between each:

php console.php faker:comments -i200 -s'-2 months' -e'-6 weeks' -g'2 hours' 42 trackeritem

Created by: Last Modification: Monday 25 February, 2019 01:17:23 GMT-0000 by Jonny Bradley
List Slides
Show PHP error messages