Sunday, January 01, 2006

Verify imported data

Just used Watir to verify some imported data.

The problem: We had business logic in java. It was much easier to do our imports in SQL. Our new logic had stricter controls than the old application in some areas.

How do we verify that our imported data is editable in the new system?

We wrote a simple script in watir to try editing every single piece of data. Nothing fancy, just open and save. The big trick is that you need a simple way to bring in the data easily. Our app allowed us to specify the surrogate key as a parameter to the editing webpage. From there watir hit the save button and then loaded the next piece of data.

Less than 50 lines of code. More than 24 hours to run. Found problems in .5% of the data.