Nov 25

Copy as DBUnit bundle for Sequel Pro

Category: Uncategorized

The other day I created a bundle for Sequel Pro that exports a series of rows in DB Unit format compatible with PHPUnit. This means that creating test data can be easy when you have existing data. Sequel Pro is a great extensible MySQL tool for Mac OS X and this bundle makes use of one of those extension points.

To use the bundle, download it from my consulting knowledge base, extract the zip and then double click the bundle to install it using Sequel Pro.

Once you get into Sequel Pro go to a query view or a content view for a table to get a result list. In the result list select your rows, right click and select “Bundles” then “Copy” and “Copy as DB Unit”. The generated data will be put on your clipboard and you can paste it into your favourite application.

The output looks roughly like the following:


Text values are automatically wrapped in CDATA tags and numbers are straight outputted. I haven’t done a lot of testing with this but for quick and simple creation of the XML files it’s coming in handy for myself. So I’m sharing this and hopefully it will come in handy for you!

1 comment

1 Comment so far

  1. andre February 18th, 2014 8:19 pm

    I recommend free MySQL-manager for OSX – Valentina Studio, check it out if you haven’t tried it yet:

Leave a comment

%d bloggers like this: