This Magento extension enables you to generate entities for tests :
- Generate Customers with fake data using FAKE library
- Generate orders for registred customers
- orders uses randomly Checkmo and banktransfer payment methods
- orders uses flaterate_flaterate shipping method
- Automatically assign created customers to website, store and group
- Based on payment methods, order invoice and shipment can created
-
This extension uses the PHP library "Faker".
-
IMPORTANT !!! To create orders, this extension uses "Check", "Bank Transfer" as payment methods and "Flatrate" as shipping method, please make sure those methods are enabled
- First Install the PHP library FAKE :
-
In your Magento root folder, dowload composer by running :
curl -sS https://getcomposer.org/installer | php
-
Or, if you don't have curl :
php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
-
Or download it manually from : Composer Website
-
Once it is downloaded, create (always in your root folder) a json file called composer.json and put in it the following content :
{
"require":{
"fzaninotto/faker" : "*"
}
}
-
Finally run :
php composer.phar install
This will install the latest version of Faker library in a folder named "vendor" in your root directory and will also generate the autoloader automatically
- Install "Entity Generator" extension :
- Install it with modman
- Or download and install it manually
- Refresh your magento cache :
Log in in your magento Backend and configure the extension
When you generate an entity you can see the generation details in real time :
tail -f var/log/maverick_generator.log
You can also create entities by using Shell Command Line
Examples :
- Create 100 customers
cd /path/to/magento/
cd shell/
php generator.php create --type customer --nbr 100
- Display entities that can be created
php generator.php info
- Show Help
php generator.php help
Tested on Magento :
- Community >= 1.7
- Enterprise >= 1.12
If you have any issues with this extension, please open an issue on Github.
Any contributions are highly appreciated. If you want to contribute, please open pull request on GitHub.
License : OSL - Open Software Licence 3.0.
Copyright : (c) 2013 Mohammed NAHHAS