DBUnit with MSSQL and Maven2

We ran into a couple of problems using the maven dbunit plugin.  We have used it on several projects before, but always with MySQL.

Some things to look out for.

  • We used jailer to dump an existing test database out to a dbunit flatfile.  Make sure that in your plugin configuration you set the “format” to “flat”.
  • On our previous operations we used “CLEAN_INSERT” this time we needed “MSSQL_CLEAN_INSERT” in order to avoid this error “Cannot insert explicit value for identity column in table ‘tablename’ when IDENTITY_INSERT is set to OFF”

Jmeter is the best

In regards to web applications:  I have yet to find a tool that can do as much as JMeter can given the amount of time I can devote to testing.  Let me clarify that I am a developer and have had a real QA team for less than 5% of my career.

Smoke Test

I use JMeter to whip up quick scripts to make sure all my pages load without 500 or 400 type errors.  A script like this takes minutes to do and can go a long way.

Test First

I use JMeter to write a test that will “break” the web application first.  When I have fixed the bug, I already have test to use for regression and to insure my fix works.

Performance/Load Test

I can use the same smoke test script to test how many users my application/system architecture can handle.  I can also put an assertion on the test to require sub-second response time on all pages.

Continuous and Automated

There is a JMeter plugin that I can add to run all the tests during every build.

Problems

The biggest problem I face is trying to get others to use the tool.  It is a little bit clunky and doesn’t have a bunch of “smarts” plugged in.

Possible Solutions

I’ve always wanted to create a JMeter plugin that would walk-through (spider) a site automatically.  Perhaps I should stop wishing and start writing.