schemamule 1.0 released

We finally got around to open sourcing schemamule, a utility we wrote in the bioinformatics core at Northwestern. Schemamule copies the schema from one database to another (right now we support copying from Oracle to HSQLDB). We have used this tool for over two years now to set up an in-memory HSQDLB database to use for unit testing. This has at least a couple nice benefits:

  • Database-dependent tests (e.g. DAO tests) run much faster than when they are run against a database accessible only over the network, especially when working from home
  • Database-dependent unit tests can be run even if you aren’t on the network at all, very nice if you’re working on a plane, in an airport, or at the beach

We use schemamule primarily via its schemacopy Ant task, which has some nice configuration options if you just want to copy a subset of the table definitions from the schema, if you want to copy views, sequences, etc. Note that table records are never copied.

One of our apps does a number of funky custom-SQL queries for reporting (we have not yet taken the plunge and created a reporting data warehouse DB), and this meant that we had to fake a number of Oracle-specific features in HSQLDB. For example, in HSQLDB there is no DUAL table. We fake it by creating a table called DUAL that has one (and only one) row (the column names and record content being irrelevant). We also provide an HsqldbLibrary class to define other functions (e.g. TRUNC) not available in HSQLDB.

Anyway, if you do a lot of automated unit testing in Java, use Ant to automate your builds, and have slow database-dependent tests, try out schemamule, see if it helps, and let us know. Usage examples are available on the project website.

3 Responses to “schemamule 1.0 released”

  1. Schemamule: a tool for database-based unit tests…

    Have you ever wished that your java database-backed unit tests ran faster? Of course you have. Schemamule is for you.

    Schemamule is a utility that copies the schema from a JDBC database into a clean other database (e.g., in-memory HSQLDB) for testin…

  2. [...] I’m going to write an article covering the whole process when I get a chance, but for now, check out the examples. My collegue, Moses Hohman, has some info, too. [...]

  3. [...] Welcome to Schemamule. It’s a tiny jar file and has a single ant task which copies the entire Oracle Schema and generates a Hsqldb database. YES. It replicates an entire Oracle Schema into a hsqldb in seconds! You can either use it as an in memory database for your automated unit testing or as dev only local database for unit testing. For more details, read the original blog here. [...]

Leave a Reply

You must be logged in to post a comment.


  • order viagra
  • synthroid pills
  • buy cialis generic
  • viagra in uk
  • levitra online
  • cheap lasix
  • compare cialis prices
  • find viagra no prescription required
  • buying generic cialis
  • viagra for sale
  • soma prescription
  • order cialis online
  • buying generic viagra
  • buy propecia online
  • cialis discount
  • levitra sale
  • viagra tablets
  • discount viagra online
  • cialis in us
  • soma discount
  • viagra pill
  • compare viagra prices online
  • cialis side effects
  • cialis approved
  • cheap cialis in uk
  • cialis drug
  • acomplia online stores
  • viagra medication
  • lasix prices
  • lowest price soma
  • price of viagra
  • viagra bangkok
  • generic lasix
  • synthroid online
  • low cost cialis
  • cialis pills
  • order no rx viagra
  • cheap lasix online
  • accutane
  • order discount cialis
  • price of soma
  • buy cialis online cheap
  • discount synthroid
  • buy cheap propecia online
  • generic acomplia
  • cheapest zithromax
  • buy lasix online
  • synthroid cheap
  • online cialis
  • lowest price zithromax
  • zithromax online cheap
  • viagra cheap drug
  • viagra us
  • discount lasix
  • cialis canada
  • cialis online without prescription
  • buying cialis online
  • cheap soma online
  • cheap synthroid tablets
  • accutane no prescription
  • cheap clomid tablets
  • cialis india
  • generic viagra
  • acomplia for sale
  • where to buy accutane
  • lasix for sale
  • clomid no prescription
  • tablet viagra
  • fda approved viagra
  • cialis free sample
  • cost viagra
  • cialis online review
  • zithromax sale