For development I need to buy products, again and again, but one page checkout is a very long process and I don't like to do this every time.

Is there a one (click) solution to generate a test buy?


If you just developing / styling the success page and your are annoyed that you can only view it once, this is a duplicate of: How to test or style the order success page?

edit: In cases you need lots of different actual orders for other reasons, I was thinking about using the FOSS extension LimeSoda_SampleDataGenerator - unfortuantely it does not seem to support orders. So it looks like you need your own small script to create orders. There are various snippets around - which boil down to use the order API. One example is in this gist.

  • 1
    No, I really need to generate a new order to test my module connection to an ERP. But something like this might work... – PiTheNumber Sep 9 '13 at 13:44
  • Thanks. I used the gist example with some fixes: Mage::app()->getStore('default')->getId() did not work with my version so I set the ID manually. Also I needed to set region_id and setShippingMethod('flatrate_flatrate'), setPaymentMethod('checkmo'). – PiTheNumber Sep 9 '13 at 15:11
  • I used the example link. – PiTheNumber Sep 16 '13 at 13:47

If you do not need to test the checkout process in the frontend (i.e. you only need the orders to test something) you can reorder them very quickly using the backend. Go to "Sales" > "Orders" > choose an order and click on "Reorder".


If you really need to go through the checkout each time take a look at scripting it with Selenium 2.

If you want to take it a step further you can also use Behat and Mink. I am biased but you can use this project to integrate behat with Magento - the examples include one taking you through the checkout with one command php -f shell/behat.php


Here's an option for creating test orders: https://github.com/kalenjordan/magerun-addons#create-dummy-order

It's still in a pretty rough beta form, but I've used it for some testing similar to what it sounds like you need, and it got the job done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.