Our team (QA) is facing the following problem:
We have a database that is accessed only by our Core
application which is a WCF services
app. Our client applications are using the Core
to access the database.
At some point we were provided with a new Version of our Core application
and of our Database
. The Dev
department also gave us a sql script which is altering a big part of our database Core data
. The core data
are used by the Core Application
to describe the Logic of our system, so every change on that data may have affects on any of our client application's functionality.
My questions are:
I am looking for a quick validity/integrity testing of the database after running a migration script. That will prevent us losing time by testing it through the applications. If the validity/integrity testing is successful then we can test the apps.
From the description you gave:
We have a database that is accessed only by our Core application ... we were provided with a new Version of our Core application and of our Database ...
tells me it is not your team's responsibility to test the database in isolation, but you can test the Core service from your client's perspective and therefore assume the database is correct.
Treat the Core application and the database as a black box and test using Unit Tests. These test should not require you to go poking around in the database as for all intents and purposes any application using your Core application doesn't know, nor should care, that the information is actually stored in to a database. You development team could decide in 6 months they are going to store the data in the Cloud in which case all your database test will be broken.
If you do have to look in the database to check data has been stored correctly then there is a problem with your Core service's interface as any data you put in should be retrievable via the same interface (I just know someone is going to comment that their app does store data which cannot be read back but without a more detailed description of your app it's easier to generalise).
Back in the real world I am assuming you are part of the QA team and unless the database developers are doing some testing (they are, aren't they?) you are more than likely going to have to validate the database changes.
To the end you may be interested to read a question I posted on the DBA Stack Exchage site about performing a data comparison between two different schemas. Spoiler: there's no easy answer.