I'm focusing on a task where we're converted that old system to some completely new system. We're presently converted in the database from the old system towards the database from the new system, along with a team is focusing on creating some maps and transforms to operate in the finish of development to transform within the old system.
I must implement unit testing, to ensure that we are able to realize that new changes towards the maps and transforms, don't break existing work, and that we may use an evaluation driven development approach.
Any suggestions or tips on how to do that? I do not imagine there's a framework with this, but when there's I ought to want to learn about it.
It is really an Oracle database, that's most likely helpful information.
This really is Oracle specific, but when that's your database of preference, then you should attempt Ounit.
The very first factor you must do in cases like this is decide what your 'Unit' is. After which determine precisely what its functionality ought to be. Then you're able to test drive it like other things.
I suppose you will need to test that data inside your old product is still within the new system, which strikes me like a little large to become known as one test. You'll most likely wish to place data to your old database. Apply the mapping. Then choose it out of your new database, this a minimum of guarantees you will get back what you devote. This will have to be completed with every entity or group of organizations that you would like to check.
I have carried this out kind of factor previously I do not observe how testing all of your migration could be a "unit test". Maybe you can look at "Total of sales within the new database must that old database". Unit tests aren't actually a tight schedule here, unless of course you're writing individual PL/SQL functions to help using the conversion (ie. transforming from just one way of storing a column to a different). These ought to be trivial to unit test.
A few of the tests which i did previously:-
- Report Comparision Usually you will find a minimum of a few reviews that continue in one system towards the other. Compare the creation of these. 50 % of time you will find bugs within the old system.
- Totals Calculate totals and hash totals in your data to find out if it's correct. Split and dice your computer data diversely.
- Place Test Investigate in great particulars of random records.
Like a developer, it's very helpful with an abundance of test data while you write the machine. Unit tests the designers write ought to be run against both recently produced data in addition to historic data you have imported.
This does not really lend itself to unit testing.
The "new" database is generally realistically inconsistant until all of the changes are complete. Also most errors is going to be because of incongruencies within the mappings and exactly how they handle nulls foriegn secrets etc.
I would suggest you define a particular unit test teams of that old and new tables having a limited group of data to check specific cases along with a test for that correctness from the new tables, but, you'll still have to run the entire group of changes/mapping any time you change something. When you are running on the small group of data this shouldn't be too painful, plus, you can include in specific data to check for known/possible bugs.