Fake Data

Generate fake data for testing.

Compatible with Flarum v1.3.0

Latest release 1.2.0

2,974 downloads

released on Aug 28, 2019

Tags

Fake Data by MigrateToFlarum

MIT license Latest Stable Version Total Downloads Donate

This extension allows you to generate fake data to test your forum.

You choose the number of new users, discussions and posts.

If you do not create new users, random existing users will be picked as authors for new discussions and posts. Alternatively, a list of user-provided user IDs can be used (REST API and command line only).

If you do not create new discussions, random existing discussions will be picked for new posts. Alternatively, a list of user-provided discussion IDs can be used (REST API and command line only).

A new button is added on discussions if you want to generate replies to that discussion only.

The date seed is made of two options: start date will be parsed by Carbon::parse(), so it accepts dates in many formats (example 2021-01-01 15:00:00) as well as human time (example 2 days ago). Date interval is in seconds. Every time the seed needs a date, the interval will be used to make it unique (user join date, discussion creation time, reply time, ...) If you generate many records at once with the default date settings, part of the content will end up a few minutes or hours in the future.

The extension can be used via 3 different methods:

  • Via the Flarum frontend, in the admin panel (global seed) or in the discussion action dropdown (discussion seed).
  • Via the command line. Run php flarum help migratetoflarum:fake-data to view the list of options.
  • Via the REST API. Perform a POST request to /api/fake-data. The body can be JSON or any format recognized by Flarum. The parameters have the same name as the command line, for example user_count.

Even though the feature is restricted to admin accounts, It's probably best to not install this on a production forum!

There is no way to mass delete the generated data.

Installation

composer require migratetoflarum/fake-data:*

A MigrateToFlarum extension

This is a free extension by MigrateToFlarum, an online forum migration tool (launching soon). Follow us on Twitter for updates https://twitter.com/MigrateToFlarum

Need a custom Flarum extension ? Contact Clark Winkelmann !

Links

© 2022 Hyn by DaniĆ«l "Luceos" Klabbers. All rights reserved. · Extensions and extension information is provided by the respective (copyright holding) authors. · Extiverse is not affiliated to the Flarum project or Flarum foundation. · Images on Extiverse pages are from Unsplash.